PIC16F628 UART trouble shooting

The purpose is to provide troubleshooting hints for the 16F628 UART circuit described elsewhere on this homepage.

Check the software in the PIC
Have you loaded the proper hex-file into the PIC programmer?
Does the programmer report "Succes" when you are done burning the PIC?
Can the programmer read the code, which has been burned into the PIC? (use the button "Read PIC")

Check the PIC and associated hardware
Is the PIC connected exactly as shown in the circuit diagram?
Apply power and use a voltmeter to verify, that Vcc measures 5.0 V (relative to ground) on the PIC (16F628 pin 14) and on the RS232 level converter (MAX232 pin 16).
Does the PIC reset when pressing down the reset button? (measure 16F628 pin 4, it should display 5 V when in service, and 0 V when reset).

Check the RS232 circuit
Is the proper cable used to connect the PIC circuit board and the COM-port on the PC? (the cable should not be the null-modem-type with reversed wiring).
Does the MAX232 deliver the necessary voltages for RS232 level conversion? (measure and compare with the tables below)

Voltage readings
The following tables display the voltage reading as measured on my K4 test board using a digital voltmeter (Fluke 75 II).

The voltages measured on the 16F628 in your circuit should closely match those in the following table.
Pin Label Idle 1000 ohm resistor connected 
between pin and ground
Reset button 
pushed down
4 reset 4.97 V 0.38 V 0.00 V
5 Vss 0.00 V 0.00 V 0.00 V
7 RX 4.97 V 4.02 V 4.97 V
8 TX 4.97 V 4.67 V 4.97 V
14 Vdd 4.97 V 4.97 V 4.97 V

The voltages you'll measure on the MAX232 can deviate somewhat, depending on the chip vendor and the RS232 chipset used in the PC. It is important is to verify the voltage change on MAX232 pins 13 and 14 (compare the measured values when not connected, and when connected to the PC).
Pin Label Circuit not connected 
to the PC
Circuit connected to the COM-port,
HyperTerminal running
1 C1+ 8.24 V 8.06 V
2 V+ 9.71 V 9.44 V
3 C1- 3.40 V 3.39 V
4 C2+ 6.65 V 6.45 V
5 C2- -3.01 V -2.81 V
6 V- -9.59 V -9.04 V
11 T1in 4.97 V 4.97 V
12 R1out 4.97 V 4.97 V
13 RS1in 0.00 V -10.74 V
14 RS1out -9.58 V -8.00 V
15 GND 0.00 V 0.00 V
16 Vcc 4.97 V 4.97 V

Back to PIC experiments

Created 7-Jan-2007 by Lars Petersen, OZ1BXM.