PDA

View Full Version : RS232 problem



JohnP
- 22nd April 2006, 10:16
I'm confused. I'm trying to send simple ascii data to a video multiplexer that is looking for data in three bytes like:
/01 display camera 1
/02 display camera 2
/pp display picture in picture
/22 display cameras 2 x 2

I have my 16F877 sending the data to the MUX but it does not respond. If I send the same data to the mux on the same cabling via Hyperterminal(on my laptop) the MUX responds correctly.
If I send the data from 18F877 to the same Hyperterminal
the data appears correct. Does anyone know anything special about Hyperterminal output that would make different from the Pic output?
Specs are: PIC 16F877 & Max 232cpe transmitting at 9600,8,n,1. I know the PIC device works because I can communicate to the cameras.
Any input would be appreciated.

John P

mister_e
- 22nd April 2006, 10:31
Even if Hyperterminal if the worst piece of crap i've never ever met on the whole PC software world since 30 years(including all Mac software + computers, windows millenium, Comodore Vic20, MSDos 3.1 and how many others... ), it seems your software is OK. Or at least, your hardware is OK. About your baudrate... ???

Let us know your video mux model, specs, datasheet. For now, we can just bet...

keithdoxey
- 22nd April 2006, 12:20
Hyperterminal to MUX = OK
Hyperterminal to PIC = OK

PIC to MUX = NOT WORKING.

Is it something as basic as TX and RX reversed. Try reversing TX and RX between the PIC and MUX

DynamoBen
- 22nd April 2006, 17:27
It could be something as simple as swapping TX/RX. Are you using a serial level converter like a MAX232/233? If not you may want to, the 5V serial signal might not be enough for the device to recognize. With the level converter the voltage will get bumped up to 12V.

JohnP
- 23rd April 2006, 03:28
The cabling is correct since I can transmit to & from Hyperterminal from the PIC (Max232cpe). The data there all looks OK. I've tried various forms of sending the ascii; one character at a time, all characters in one burst, hex bytes representing the ascii codes, straight ascii characters.... I've also reversed Rx & Tx by use of a null modem module. DynamoBen mentioned a level converter. Can you explain exactly what a level converter is? I'm about to put my "pen" oscilloscope on the Tx line to check waveforms and amplitudes. problem is.... I'm not at home where all of my test "stuff" is so I have to dance with what I brung!!

JohnP