|Shopping Cart Checkout Shipping Cost Download Website|
|You are here: 8051 Tools Development Board Troubleshooting Serial Receive|
Serial Port Receiver TestThese tests are used to troubleshoot reception of serial port signals, from the 9 pin connector to the RxD pin on the 87C52 processor. When power is applied to a new board, the PAULMON2 monitor waits for you to send the carriage return character (press the Enter key), which it uses to automatically detect the baud rate your computer is using. Only after baud rate detect can it send you the welcome message. So the correct delivery of your serial port signal is necessary to get the board to respond.
Figure 1 shows a simplified schematic of the path your serial port signal follows, from the 9 pin connector, through the MAX232 tranceiver chip, through two 74HC02 NOR gates, and finally to the RxD pin on the 87C52 chip. All of these tests refer to this schematic, so you may find troubleshooting easier if you print this schematic for reference.
DC Voltages With No Cable ConnectedThe first and easist test is to simply measure the DC voltages at each point from the connector to the 87C52 chip, which no cable connected. You should see these voltages:
The serial port connector and 87C52 pins can only be measured from the bottom side of the board. Figures 2 and 3 show how to measure these. Pins on the 74HC02 and MAX232 chip can be measured from either side. When measuring from the bottom, remember that the order is reversed. Pin 1 is indicated by a square solder pad to help you correctly identify the pins.
DC Voltages With Cable Connected, No Data FlowWhen the PC is connected by the serial cable, but the PC is not transmitting any data, you should see a significant negative voltage at the connector. The other voltages should be the same as before.
The exact voltage will depend on the PC. Most desktop PCs transmit between -10 to -11.5 volts. Many laptops use lower power chips and lower voltages. Even as little as -3 volts is acceptable, but if the PC is connected and uses rs-232 compliant signal levels, you should see a negative voltage that is significantly different than the nearly zero volts when the cable was not connected.
If you do not see the negative voltage from your PC, the most likely problem is a "null modem" cable wiring, rather than the standard cable. You can disconnect the cable and using your multimeter ohms or continuity test to check if pin 3 on one side really connects to pin 3 on the other side. In a null modem cable, the wires for pins 2 and 3 are swapped.
DC Voltages With +5 Volts On Pin 3In this test, you must disconnect the cable and apply +5 volts directly to pin 3. This will simulate the brief times when data are transmitted, but the voltage is a steady DC signal that is easy to measure.
Warning: The board may be permanently damaged if you accidentally touch a wire connected to +5 volts to the wrong location. Please be sure the +5 volt wire is securely connected to pin 3 before using your hands to manipulate the multimeter leads. DO NOT attempt to hold a wire on pin 3 and +5 volts while also manipulating the multimeter leads!
When +5 volts is connected to pin 3 on the serial port, all the other voltages should change, and the red "RX" LED should illuminate brightly.
If this test and the previous two all passed, then your serial port receive circuitry is almost certainly working. However, it is possible to test with live data.
AC and DC Voltages With Repetitive Data InputIn this test, you will reconnect the board to your PC and cause the PC to transmit a steady stream of bytes. This results in observable signal activity on all the lines.
First, configure your keyboard's auto-repeat feature to transmit 30 characters per second when a key is held down. On many computers, this is set in the bios configuration during startup. You may also be able to set this using a kayboard control panel from your operating system. Slow auto repeat speeds may be used, but they will result in smaller voltage changes.
Next, open your terminal emulation program and configure the baud rate for 1200 baud. This slow baud rate results in longer pulses for each byte, which is easier to measure. Hold the space bar down. You may need to use tape or rest an object on the keyboard to keep the space bar pressed while you measure the voltages. Other keys may be used, but the space bar is easiest to keep held down, and the space character contains many zeros, which results in an easier signal to observe.
The red "RX" LED should blink rapidly, with a visual appearance of nearly constant illumination with many brief dark moments per second.
Using a standard desktop PC that transmits -10.27 volts in the no data test above, the following voltages should be seen during a stream of 30 space characters per second at 1200 baud:
The voltages at pin 3 on the serial port may appear different if your PC uses different RS-232 driver chips. Laptops using reduced voltage levels may result in much lower measurements. The voltages on the internal signals should be similar.
These 1.98 volt AC signals are expected values using a "true RMS" AC multimeter. Inexpensive meters have a simple averaging circuit which is calibrated for accurate AC measurements only for sine waves. Even though the numbers may be very different without a true RMS meter, you should still see a significant AC voltage when the PC transmits a stream of 30 space characters per second, and nearly 0 volts AC when no data is present.
If you can cause the PC to start and stop transmitting while maintaining the voltage measurement (leads secured, or 3 hands), the presence and absence of data flow should be very easy to observe using your voltmeter. That's a very strong confirmation that the serial data from your PC is truely reaching the RxD pin on the 87C52.