Date: Fri, 16 Dec 2005 04:40:42 -0600 (CST) Subject: serial interfacing X-UID: 112 No pictures this morning. In fact, I'm just about to go to bed and catch 90 minutes of sleep before work. And I think I'll do nothing but sleep this next night. I'm so tired that I'm dangerous. I'll break something. The reason is that I just thought I burned out more I/O pins on one of my computer boards. Not the end of the world but a sick feeling. I mirror-image flipped two wires and wasn't seeing good signal on the scope. Instead of strong 3.3 volt pulses, I was seeing very noisy pulses of several hundred millivolts. The I/O pins on the computer board for the TTL serial are arranged this when viewed from above. GND RXD <-- CONNECT DATA OUT CONNECT DATA IN --> TXD GND What happens when you mirror-image flip the wires around? RXD GND <-- CONNECT DATA OUT CONNECT DATA IN --> GND TXD So instead of connecting to TXD and RXD, you connect to GND. This is typically safe and won't cause damage. I had wondered why the pins were arranged this way. There is a good reason. The interesting thing is the bad signal on the oscilloscope. When I mirror-image flipped the wires, the scope's probe was connected with reversed polarity like the following. PROBE SIGNAL --> COMPUTER GROUND PROBE GROUND --> COMPUTER SIGNAL Naively, you'd think that this would just invert the waveform. It doesn't. I think there are two things going on. One is that there are reverse biased diodes, actual or effective, between COMPUTER SIGNAL and COMPUTER GROUND. Polarity does matter. Two is that ground is fundamentally different from other levels in a system. It is assumed to be stable. If ground changes, then everything else is affected, both signals and power. But there are no such requirements on signaling levels. They can be noisy. So I think that the noisy voltage on COMPUTER SIGNAL when taken as ground confused the oscilloscope. The last thing is that I realized yesterday that the Garmin 18 LVC GPS receivers are not TTL serial devices. The datasheet never says they are. I remember reading the datasheet with a slight sense of confusion. I should have paid attention. The GPS receivers are RS-232 devices with voltages limited to TTL levels. But they do not use 5 volt TTL serial. The Garmin 18 LVC can receive full serial voltages. But it limits output to positive and negative 5 volts. The advantage is that these receivers interface directly to a standard RS-232 serial port (typical for industrial equipment) and yet with two inverters will also interface to 5 volt TTL serial (typical for embedded microcontrollers and computers). This is a very useful web page. http://www.lammertbies.nl/comm/info/RS-232_specs.html After reading this, it made sense.