Hi Chris - you've mixed it up again. The chip does USB to serial at TTL levels. You would only need another device if you wanted to use real RS232 levels for your serial data.
It looks from the datasheet that if you want true RS232 (such as you would see from a computer) you would need to add a driver that includes inversion. So if your cable only has the Prolific chip, then you can simply connect directly to your PIC without setting any special bits even if the PIC supports it, and you should be good to go. (you will be transmitting and receiving inverted RS232 at TTL levels)
So now it's time to focus on your code and circuit.
The RX pin needs TRIS set, the TX does NOT.
I've found the easiest way to start is to create a loop in the PIC code that sends "Hello", waits for a second, then sends it again. This will let you get the link from PIC to computer going and give yourself confidence. The link in the other direction is a bit trickier, so start with PIC to PC first. Connecting a LED through a resistor to ground on the TX pin of the PIC will let you see some blinking once per second so you know you are sending. Then remove it and connect your cable.
The only pins you need connected are TX, RX, GND. GND is always GND, but depending on who made the cable, you might need to connect the PIC TX to the cable RX or to the cable TX. It's easy enough to swap back and forth when the PIC is sending in a loop, and see which one lets the data through. Once you get to this point, life will get simpler ;-)
If you are seeing garbage, The baud rates on both ends do not match, so double check. You may also see trash if your ground is poor.
Bookmarks