I like to share my opinions and my blog posts are not usually of a technical nature. However, I am forced to blog on a specific piece of equipment that plagues me every time I attempt to use it.
The bit in question is the SparkFun.com RS232 Level Shifter. It allows you to use 12V RS232 serial equipment with 5V, 3.3V and 2.8V TTL logic that modern microcontrollers like to talk (as of November 2012).
This is a hobbiest bit of kit, I am using it whilst prototyping some hardware. It’s always good to plug in my 20 year old serial terminal to see what’s coming out of whatever modem etc I am dealing with. My main problem is that every time I pick the level shifter up, I can never remember which way around the pins go. This may sounds silly, but it takes me about half a day each time I pick one up to use it.. so, here we go, documenting it.
From the microcontroller: RX (pin 9 on the Teensy3), TX (pin 10 on the teensy3). This relates to Serial2 if you are programming using Arduino.
From the spark fun box:
VCC -> 3.3V.
GND -> GND (3.3v GND rail on the Teensy3).
TX-O -> pin 9 on the Teensy3
RX-I -> pin 10 on the Teensy3.
For the DB9 connector (looking at it with the 3.3v side away from you on the top right).
You can see two rows of pins where the DB9 plugs in. The top row has five holes, the bottom four holes. Connect top left to signal GND for the RS232. Next one is blank. Next one goes to pin 2 RS232. The next one goes to pin 3 RS232. All others are blank.
When data moves between the interfaces RX will be red when the Teensy3 is transmitting and the TX line will light up green when the RS232 device is transmitting.
I hope this helps someone. You can find out more about the SparkFun RS232 Level Shifter following this link.