Sony Clie RS232 to PIC Problem- Need Advice

I want to use my Sony Clie PEG SJ-20 to talk to a PIC breadboarded project, but it does not work.
I have tested my breadboarded project via the Com1 port of my desktop
PC and it works fine. I send data from the PC to the PIC via a MAX233 and get replies from the PIC via the same chip.
So: PC to PIC via MAX233 is OK.
I also tested the PDA program by coupling it to the COM1 port of my desktop and it works properly.
So: PC to PDA works OK.
Now, the problem is that the connection from PDA to PIC via the MAX233 does not work.
So: PDA to PIC is no good.
I bought a cable from eBay that plugs into the Clie and ends in a DB9. I know that the Clie uses 3.3V "RS232" levels and requires level shifters to work as true RS232, but the cable must have this built in to one of the connectors or it would not allow comms with the PC. Is that correct? I cannot measure RS232 levels on the DB9, only about 1 volt, yet the PDA works with the PC!
Has anyone got the answer?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Ron Ciren wrote:

Are you sure you don't have rx and tx crossed? If the PC works BOTH to the PIC and the PDA without a null modem in between somewhere, this seems like a distinct possibility.
In other words, make sure that rx on the PDA is connected to tx on the PIC, and that tx on the PDA is connected to rx on the PIC.
Hope that helps -- tAfkaks
--
(Replies: cleanse my address of the Mark of the Beast!)

Teleoperate a roving mobile robot from the web:
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I tried it, but no luck. I even connected the serial cable to the PDA and just tried to measure voltages on the pins of the DB9, but got nothing. I have seen tantalizing bits of info on the 'Net about disabling the USB and enabling the serial port by soldering certain pins together, but am reluctant to dig in there yet, for obvious reasons.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I am trying to interface a Sony Clie SJ-20 to any RS232 device. I cracked open the cable and found some surface mount resistors and transistors, which probably shift levels when it is working properly.
But it just does not work when connected to the Transmit and Receive pins of a MAX233. I think that some of the other pins must be connected somehow in order to enable the RS232 level shifting.
wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Ron,
Here it is:
http://astro1.panet.utoledo.edu/~igor/GPS2Clie.html
--TE

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Ron,
Your PC serial port is pinned-out as a DTE (Data Termination Equipment) device, both your PIC (via the MAX232) and the PDA are pinned-out as DCE (Data Channel Equipment) devices. You need to swap the TX, RX lines and any flow control lines you are using (CTS, RTS, DTR, DSR, etc.) In general the easiest thing to do is just use a NULL MODEM CABLE, and turn off flow control on both sides so you only have to worry about TX and RX. Then add the flow control back in once you get data flowing. The problem most people run into with null-modem cables is that the connectors often don't match up, so they go through some gender changers and size adapters (9pin <-> 25pin). These adapters often re-introduce the TX-RX twist and you have turned your null-modem-cable back into a regular cable. The other problem is that most people have a box of serial cables from many past modems etc. You may think you have a null-modem-cable when you in fact have a straight through cable. Serial is the simplest communication to use, but the cable and flow control are always the hardest part to get right. Once you get that magic cable that works, do yourself a favor and put some kind of tag on it with a label telling yourself what it is good for, so next year when you dig it out of a box, you'll know where it came from and what it's good for.
--TE
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Thank you all for your rapid responses.
I tried the GPS2Clie.html link
http://astro1.panet.utoledo.edu/~igor/GPS2Clie.html
and it had valuable information. I tried things out right away, but still had no luck. Here are the results:
- on opening the case of the HotSync cable, I noticed surface mount components- the inside of the cable looked exactly the same as in the picture in section 3 of the URL
- on the DB9 I connected pin 5 to ground, and 6 volts to pin 4, as instructed, and later tried pins 7 and 8 both individually and together with pin 4, with the same results, namely, that the output on the TX pin (3) changed between 0 and 2.1 volts when sending data. This was enough, when I connected pins 2 and 3 together, to enable the PDA to send data to itself- the data was sent and received by the PDA itself.
- when I tried to plug the PDA into the breadboarded project via the MAX233, the voltage levels were of course not RS232 level, and there was no response from the PIC. When I cut out the middleman MAX233 and fed the signals directly into the PIC serial inputs, I got an erratic response. The approximately 2.1 volts of the PDA output was apparently too "gray" to get reliable communications.
I tried boosting the voltage on pin 4 to 9v, and got no better response either through the MAX233 or directly to the PIC.
This leaves me with several questions. 1. Why are the level shifters (I assume that is what the SMD components on the HotSync cable are) not working when I power them up through pin 4? Are they supposed to transform the PDA voltages into RS232? They certainly seem to when connected to a PC! 2. I connected my PC serial cable to the breadboarded project and measured the voltage comming out of pin 4 without anything connected to pin 4. The voltage was -11v (!). I am sure that the polarity was correct on my meter. -11v was coming out of the PC on pin 4. What gives? I am supposed to put +6v on this pin to feed power to the level shifter circuits in the cable. I am missing something basic but I don't know what.
That is where it stands. I look forward to your responses. Thank you.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Oops. The something basic was that the voltage on pin 4 is -11 volts when the program (Visual Basic) is not running and +11v when it is running.
However, I am still not getting any PDA-PIC comms. I may have to get a MAX3232 or something like that and build the whole schlemozzle. I know I do this because it is fun but just once I would like to be able to get somewhere directly!
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.