Author Topic: Serial data transmission confusion  (Read 509 times)

0 Members and 1 Guest are viewing this topic.

Offline bborisov567Topic starter

  • Regular Contributor
  • *
  • Posts: 94
  • Country: bg
Serial data transmission confusion
« on: October 22, 2021, 04:08:46 pm »
Recently i ve been looking into cables for connecting to lpg controllers. Most of them use simple serial communication (RX and TX pins connected directly to adapters with ft232 or pl2303 do the job). But a group of contollersare supposed to use this kind of wiring:



On other places on the internet i found a schematic with max232 for voltage level conversion:



As far as i understand from the datasheet of the max ic all it does is converting given RX and TX levels to +5V.

But then why people are going into all of the hassle of soldering the max232 schematic if you connect it directly?

And my second questions is how the communication takes place only through one wire with two resistors at the end?

Also if you can recommend me some article on serial communication to shed some light.
 

Offline mon2

  • Frequent Contributor
  • **
  • Posts: 463
  • Country: ca
Re: Serial data transmission confusion
« Reply #1 on: October 22, 2021, 05:03:55 pm »
If you use the MAX232, the voltage swings will be bipolar with positive & negative voltages on the TX & RX lines. Respectively, if using RS232 levels, you must interface the other side of the wiring with another RS232 transceiver (TX & RX). The transceiver (MAX232 or equivalent) will take your CPU CMOS levels (often CMOS levels are @ 3v3) and shift to +5 / -5V. Typically, these days, RS232 transceivers are operating @ 3v3 but they feature a capacitor voltage doubler for the I/O. So this translates to about +6 / -6 volt swings on the RS232 pins.

You CANNOT safely interface RS232 directly to CMOS pins on the CPU. Again, RS232 to RS232 transceivers must be used. With RS232 transceivers you can drive the cable longer than if you do NOT use RS232 transceivers. Varying directly with the baud rate (speed of the serial port) and the quality of your RS232 wiring, you can run say 20-50ft with 9600bps / 19200bps. There are many articles on this topic but if you must run very long cables then consider RS422 or RS485 transceivers instead. With the differential signals of RS422 / RS485 transceivers, you can run upto 4000ft at the slower baud rates.

MAX232 is an old school transceiver but a stable one. Consider devices with 15kv ESD protection to protect against carpet zaps, etc. - static does KILL the parts.
 
The following users thanked this post: bborisov567

Offline bborisov567Topic starter

  • Regular Contributor
  • *
  • Posts: 94
  • Country: bg
Re: Serial data transmission confusion
« Reply #2 on: October 22, 2021, 07:08:19 pm »
So i need max232 only if i am connecting to a physical RS 232, for example on a old pc and also for protection? According to PL2303's datasheet leves depend on VCC so when using 5v to supply the 2303 i dont need max232? And last what about the one wire and the two 180 ohm resistors, how is the magic happening?
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5869
  • Country: de
Re: Serial data transmission confusion
« Reply #3 on: October 22, 2021, 07:40:35 pm »
And last what about the one wire and the two 180 ohm resistors, how is the magic happening?
No magic. Some kind of half-duples X-on/X-off signalling, but this is firmware-related.
 
The following users thanked this post: bborisov567


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf