skip navigational linksPJRC
Shopping Cart Checkout Shipping Cost Download Website
Home Products Teensy Blog Forum
You are here: 8051 Tools Development Board Troubleshooting Serial Transmit

PJRC Store
8051 Board, $79
LCD 128x64 Pixel, $29
LCD 16x2 Char, $14
Serial Cable, $5
9 Volt Power, $6
More Components...
8051 Tools
Main Page
Development Board
Code Library
89C2051 Programmer
Other Resources

Serial Port Transmitter Test

The PAULMON2 monitor only transmits once it has successfully received a carriage return character and used it to detect the baud rate that your PC is using to communicate. The first two tests are simple DC voltage measurements without data flow, which can be done at any time. However, to verify signals with data flow, the receiver circuitry should be verified first because of this automatic baud rate detection requirement.

DC Voltages With No Cable Connected

The first and simplest test is to measure the DC voltage on pin 2 of the serial port without any cable attached, and also the voltages on pins 2 and 6 of the MAX232 chip. The exact voltages will depend on which chip is installed on the board, and the voltage output of the 7805 voltage regulator. This table gives typical values to should see:

Installed ChipDB9, Pin 2 MAX232, Pin 2MAX232, Pin 6
ST Microelectronics "ST232ACN" -9.9 V   +9.93 V   -9.9 V  
Texas Instruments "MAX232N" -8.5 V   +8.9 V   -8.5 V  
Maxim "MAX232CPE" -9.5 V   +9.7 V   -9.5 V  
Typical voltages with different MAX232-compatible chips

The RS-232 standard requires serial ports to transmit high and low using at least +5 volts for high, and at least -5 volts for low. The MAX232 chips include a "charge pump" power supply circuit which creates these higher voltages on pin 2 and 6. If you measure a positive voltage significantly higher than +5 volts, and a negative voltage signifiantly greater than -5 volts, then the charge pump circuit is working. With no cable connected, pin 2 of the serial port should measure approximately the same voltage at pin 6 on the MAX232 chip.

DC Voltage Change With Cable Connected

When you connect the serial cable to your PC and the board, the voltage measurement on pin 2 should change.

You should see less voltage, because the RS-232 standard requires all transmitters to implement a series output impedance, and all receivers to implement a parallel input impedance.

A typical drop may be -9.9 volts without the cable to -9.0 volts with the cable attached, using the ST232 chip. Some chips may drop even more, as much as 2 volts, depending on the combination of the MAX232 chip on the 8051 development board and the chip inside your PC. The exact drop is not important, as long as the output is still greater than -5 volts.

If you do not see any drop in voltage, it's quite likely the transmit signal is not connecting to a receiving input on your PC. If you see the voltage grow to a larger value, it's very likely your cable is a "null modem" cable, and the higher voltage is from another transmitter in your PC's serial port.

These simple DC voltage measurements can establish that your MAX232 chip is producing correct signal levels and driving a receiver in the PC, but to truely verify all the circuitry, a data flow is necessary.

AC and DC Voltages With Data Flow

If the 87C52 is transmitting data from its TxD pin, but you can not receive it on your PC, then this section will help you trace the data flow from the TxD pin to your serial cable. Figure 1 shows a simplified schematic of the transmit data path.

simplified schematic diagram
Figure 1: Transmit Signal Path

This test requires the receive path to work. All measurements in this section are 1200 baud, with enter key held down. 1200 baud is recommended for this test, because many multimeters do not have bandwidth to measure higher speed waveforms on their AC voltage mode.

The PC transmits a stream of carriage return characters, PAULMON2 repetitively transmits the prompt "PAULMON2 Loc:2000 > " in response. This results in the following AC and DC voltages. Because of slight timing variations between the prompt transmit time and your PC keyboard's auto-repeat, these voltages many fluctuate slightly as the brief time between each transmission of the prompt changes. This is normal behavior during this test and not a sign of noise or other signal quality issues.

Voltage87C52, TxDHC00, Pin 5 MAX232, Pin 11DB9, Pin 2
DC 1.98 to 2.01   2.98 to 3.02   1.98 to 2.01   1.5 to 2.2  
AC 2.44 to 2.46   2.44 to 2.46   2.44 to 2.46   6.5 to 9.2  
Voltages during 1200 baud repetitive data flow

The voltage seen on pin 14 of the MAX232 and pin 2 of the serial port will depend on the type of MAX232 chip installed, and on the loading provided by the chip in your PC. These AC voltages are "true RMS" measurements. A low cost multimeter without true RMS will show slighly different readings.

The most important point is to observe a considerable AC voltage when transmission of data is present. When there is no transmission, AC voltage should be zero. This second table shows the voltages you should see when there is no transmission.

Voltage87C52, TxDHC00, Pin 5 MAX232, Pin 11DB9, Pin 2
DC 5   0   5   -7 to -9  
AC 0   0   0   0  
Voltage without any data flow

8051 Development System Circuit Board, Paul Stoffregen
Last updated: March 4, 2005
Status: finished
Suggestions, comments, criticisms: <>