more useful options | |
PerlMonks |
Re^4: RS232 and Tk with threadsby afoken (Chancellor) |
on Jan 05, 2022 at 14:53 UTC ( [id://11140173]=note: print w/replies, xml ) | Need Help?? |
The typical limitation is that voltage swing is only +-5 volts where "real" RS-232 requires +-12 volts. Um, no. RS232 is specified as +3..15 V for 0 ("space") and -3..-15V for 1 ("mark"), and allows for open circuit voltages of up to ±25 V. The voltage range from -3 V to +3 V is unspecified (neither 0 nor 1). See RS232. PC hardware originally used MC1488/MC1489 level converters supplied by ±12 V from the PSU, and so had ±12 V levels. Some old laptops are rumored to have used ±5 V levels instead. Modern level converters (like the MAX232 or MAX3232) often use charge pumps powered by the logic supply voltage, resulting in RS232 levels of about ±10 V for a logic supply of +5 V, and ±5 V for a logic supply of +3.3 V. When receiving, PCs usually read any voltage above +3 V as 0 ("space") and anything close to 0 V and below that as 1 ("mark"). All of these variants are expected to interoperate flawlessly, and they do. Some PC peripherals, especially all serial port mice, and serial port LIRC receivers and simple transmitters, abuse some of the RS232 lines as a power supply. RS232 was never designed for that, and while almost PC serial ports could deliver tens of mA per pin, this is not guaranteed. RS232 is defined by voltages, not current. Alexander
-- Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
In Section
Seekers of Perl Wisdom
|
|