Measuring the Output of a Serial Port for Low Level Analysis Primary Software: LabVIEW Development Systems>>Professional Development SystemPrimary Software Version: 1.0 Primary Software Fixed Version: N/A Secondary Software: LabVIEW Development Systems>>Full Development System Hardware: Serial>>RS-232
Problem: I'm using a serial device, and I'm unsure of the output of my serial port. Is there a way to view the signal that is being produced by the serial port in the lowest level possible. Solution: Normally we're not concerned about the voltage levels of the serial port, but to see the actual signal the device is receiving, you may choose the following method to observe the output of the serial port. The only two pieces of hardware that you would need is your serial port, and a data acquisition device. Take pin 2 of your serial port, which is your transmit line, and wire it into any analog input of the data acquisition device. To create a cleaner look to the input of the signal, you may wish to enable reference triggering for your data acquisition. In DAQmx, this can be found in the task timing palette when creating a task, or using DAQ Assistant. To get the timing correct, it's important to know the baud rate of your signal, and you can specify the rate of your data acquisition to be 100 times that of the baud rate to have 100 samples per bit. In the Reference Trigger image included above, the Pre-Trigger Samples is set to 100 to leave 1 bit of empty space before the data acquisition begins. Below are included some examples of different Hex Values represented in serial, and a working serial port will show the bits represented as such. Something to notice in the images below is that the very first bit is 'S' which is the start bit. The following 8 bits are the binary representation of the value being passed through with the least significant bit on the left. The last bit is the stop bit represented by 'S', and it will remain low for the amount of bits specified. In this example the duration of 1 bit was used for the stop bit. Related Links: KnowledgeBase 0XL97ARV: Which Baud Rates Do the National Instruments Serial Boards Support? Serial Support: Serial Quick Reference Guide Attachments:
Report Date: 04/26/2007 Last Updated: 05/04/2007 Document ID: 48PA767N |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
