|
||||||||||||||||||||||||||||||||
|
Measuring RS-232 signalsThe TiePie engineering pc based measuring instruments are also suitable for measuring RS-232 signals. This measurement can be performed using the oscilloscope.
For this measurement example, a normal (double female) RS-232 cable with a DB-9 connector connected to COM-1, is used. Hyperterminal is the program that transmits the data through the COM port. The HP-6350 is used to measure the transmitted data bits on pin 2 of the DB-9 connector on the other side of the cable. The purpose of this measurement will be to display the characters tiepie according to the RS-232 standard on the oscilloscope of the TiePie engineering Windows measurement software. Before we start the measurement, we will need to know what is to be expected on the oscilloscope. Therefore, the ASCII table will need to be checked to see what tiepie is in binary code. The results can be seen in the first and second column of the table.The RS-232 protocol specifies that the Least Significant bit (LSb) is sent first and the Most Significant bit (MSb) last. Therefore, the bits in the ASCII table need to be flipped horizontally. The result is listed in the third column of the table. Whenever a character is sent according to the RS-232 protocol, a start bit is added to the data. This start bit is a '0'. At the end of the transmitted character a stop sign has to be added as well. However, this is user dependant. Available options are 1, 1.5 and 2 stopbits. For this measurement, 1 stop bit is selected.Unlike normal TTL signals, a '0' and a '1' as specified by the RS-232 protocol are not 0 and 5 volts or thereabouts, but approximately -12 and +12 volts. To make it even more confusing, the data bits are flipped. This means that a logic '0' is a '+12' and a '1' is a '-12'. When there's no data signal is present, the output signal remains at '-12'. To simplify the interpretation of the output of the RS-232 protocol, it is advised to invert the channel on which the RS-232 signals are measured. This is easily achieved by clicking on the invert button or by pressing 'i' in the oscilloscope of the Windows software.
Start up Hyperterminal. Hyperterminal can be found in Start > Programs > Accessories > Communications > Hyperterminal or goto Start > Run and type hypertrm and hit 'enter'. A popup window should come up asking to initiate a new connection. Give a suitable name to your connection and click 'ok'. Select 'Com 1' in the 'Connect through' box and click 'ok' again. In the port settings dialog, select the following options:
Next up is the TiePie engineering software. Choose the oscilloscope on the instrument taskbar. When the oscilloscope window is loaded, use the 'i' button to invert the channel. Since we're working at a relatively low baud rate, it is recommended to lower the sampling frequency to something like 10kSamples per second. This can be set by right-clicking on the time axis and picking the right sampling frequency from the popup menu. The transmission of the word tiepie shouldn't take a second, so the record length can be set to 20 000. We now have a recording time of two seconds maximum, one second pre-trigger and one second post-trigger. Now all we need to do is set up the trigger right. We only want to capture the transmission, so we let the trigger respond to the first transition that appears during the transmission of the word tiepie. But as we don't know yet when that transition is going to occur, we will have to tell the trigger system that it has to wait an infinite time until our required condition is met. This can be achieved through an infinite trigger time out setting. Rightclick on the trigger symbol, find the menu Time out and tick the box in front of Time out infinite. The same setting can also be set by pressing 'w' on your keyboard. The level at which the trigger needs to be set is not that strict. As long as it is a few volts above the level the signal has during a logic '0', it should be right. If you're still uncertain, refer to the image at the top to get an indication.We only want to perform a single measurement, therefore the One shot button needs to be pressed to start the measurement itself. When the characters tiepie are now typed in the main Hyperterminal window, the transmission should be started. As soon as the first transition occurs, the measurement should start as well. When the end of the record is reached, the measurement is automatically stopped. If everything went well, you should see the same signals as in the image at the top of this page.
000 1 0 111 0 1
Correct!
Ofcourse, the use of Hyperterminal during this measurement is solely intended to generate general RS-232 signals. In a normal situation, the RS-232 signals would most likely be present and you would be interested to see what is actually being transmitted. This example simply provides a useful walkthrough of the necassary parameters to setup the oscilloscope to capture the RS-232 data you're interested in.
Sitemap | © 1996, 2008 TiePie engineering
|
|||||||||||||||||||||||||||||||