So  the  serial  comms  aren't  working  to  your  microcontroller  eh?
Step 0: Does the power supply work?
  1. Make sure your circuit is getting proper power, between pins 15 and 16 should be 5V. DONT USE BATTERIES WHEN TESTING A CIRCUIT. batteries tend to die when you least expect it. Use a 'wall wart' or other plug in supply for building and testing your circuit.

Step 1:  Does the computer work?

  1. Open up a terminal program on the computer
  2. Set it for 2400 baud rate with no handshaking at all
  3. Type something, note if it prints out what you type (this is called local echo, probably off, in which case you wont see anything, if its on, just remember that for step 5)
  4. Jumper (short) togethor pins 2 and 3 of the computers serial connector in any way you like (this loops back the data)
  5. Jumper pins 7 and 8 of the serial connector. (this is hardware handshaking if the hardware insists on it)
  6. Type something, you should see it printed back on the screen to you
If this didn't work, you must have the wrong port, or a dead comm port, or the handshaking is not really turned off. You need that step to work, really, really you really do.

Step 2: Does the microcontrollers buffer work?
  1. Connect your circuit to the computer.
  2. Remove the microcontroller, if you cant remove it, set both of the serial pins to be inputs.
  3. Short the recieve serial and the transmitt serial of the microcontroller.
  4. Type something as in step 1, you should see the characters echoed back to you.
If this step dosn't work,
  1. Try lowering the baud rate on the computer to 2400, any buffer should be able to work at that rate. If this fixed it, the buffer cannot handle the baud rate you were using. Bring up the baud rate until characters start to get mauled, then bring it down 2 notches.
  2. If you are using a MAX232 or equivilent, go to step 10
  3. Your on your own.
Step 3: What REALLY is the baud rate of my microntroller?

  1. Set the computer for the baud rate that you expect the microcontroller is using
  2. Set up the controller with a program that continiously sends the character U to the computer (needs to be upper case)
  3. Watch the terminal program, depending on teh characters you get back, you can tell is there is a buad rate problem.



Step 10: Is the max232 wired right and working properly?

  1. If your serial connector is a db9, make sure the voltage from ground to pin 5 of the db9  is 0V and that the voltage from pin 5 of the db9 to Vcc is about 5V, if it isn't make sure pin 5 is properly grounded.
    If your serial connector is a db25, make sure the voltage from ground to pin 7 of the db9  is 0V and that the voltage from pin 7 of the db9 to Vcc is about 5V, if it isn't make sure pin 7 is properly grounded.
    -- The following pins references refer to the max232 or equiv --
  2. The voltage from ground to pin 15 should be 0V, if its not check that this pin is properly wired to ground.
  3. The voltage from ground to pin 16 should be from 4.5V to 5.5V, if it isn't make sure this pin is wired to your 5V supply, and that the supply is working properly (no dead batteries etc)
  4. The voltage from ground to pin 2 should be about 10V, if it isn't be sure the polarity of the capacitors conntected to pins 1 and 3, 4 and 5, 2, and 6 is right. Negitive of the capacitors should be on pin 1, pin 5, PIN 6 (this is not a typo) and on the capacitor from 5V to pin 2, the negitive should be on 5V (this is not a typo)
  5. The voltage from ground to pin 6 should be about negitive 10V, if it isn't be sure the polarity of the capacitors conntected to pins 1 and 3, 4 and 5, 2, and 6 is right. Negitive of the capacitors should be on pin 1, pin 5, PIN 6 (this is not a typo) and on the capacitor from 5V to pin 2, the negitive should be on 5V (this is not a typo)
  6. The voltage from pin 3 to pin 1 should be 5V or a little less, if its not, be sure the capacitors polarity is correct.
  7. The voltage from pin 5 to pin 4 should be 10V or a little less, if its not, be sure the capacitors polarity is correct.
If the capacitors are all definitly the right way around and these voltages are not right, the chip is not working, only you may have a clue as to wh. Check for shorted solder joints, or shorted wires, possibly try ONE more chip.

DO NOT TRY ALL YOUR CHIPS AS YOU MAY HAVE A WIRING ERROR THATS BURNING THEM OUT THAT YOU HAVN'T NOTICED YET!!!

The computer should be connected to pins 7, 8, 13 or 14 only.
The microcontroller should be connected to pins 9, 10, 11, 12 only.

If your here from step 2.2, your voltages are good, but it still wont echo back data, you most likley have the rs232 pins 2 and 3 reversed.

If you have all this working, go back to the step you were working on.