Saturday, October 18, 2008

Serial Module

This week I had the task of soldering the Serial Module to my board.
The serial module consists of the following:

  • Max232 IC
  • 3 1uF capacitors
  • Db9 Serial connector
Things did not go smoothly, but in the end I managed to pull it off. Below is a picture of the finished module:

Now, a short description of why I need MAX232 and how it works. This IC (integrated circuit) converts TTL/CMOS voltage levels for 1 and 0 to RS-232 voltage levels. Here is a quick comparison to show you what I mean : "1" in TTL is roughly 5V, and 11V in RS-232, while "0" in TTL is 0V and -11V in RS-232. When I add the fact that my PIC16F870 knows only TTL voltage levels and any computer knows only RS-232 when it comes to simple serial communication, you understand the need for such a IC.

It works by the aid of 3 charge pumps, which in our case are 3 1uF capacitors, one for the internal voltage doubler, one for the voltage inverter and the last is placed in my case, between the +10V pin and the 5V rail of the board. All is made even clearer by the datasheet.

I tested this module by connecting the board to my computer, to COM1, fired up Hyperterminal, and joined pins 11 and 12 of MAX232 IC, essentially making a loop back, the bytes sent from the computer where converted to TTL levels, and then converted back (pins 11 and 12) to Rs232 levels, then sent back to the computer. It worked fine as I could see the characters I inputted in the terminal where bouncing back on the screen. Job done!

I have only the main microcontroller part to solder on and the eureka moment is finally approaching. Happy me!!

No comments: