Transmitting Hex Values over serial port using HyperSerialPort

There is an easy and quick method to transmit Hex values from a Windows PC over a serial port. Use the Embedded Evaluator tool from Connect to the serial port, then add your hex values in the code window and click the 'Execute' button.

Detailed Instructions:

Attach any USB to Serial converter to your Windows PC. Bring up HyperSerialPort. Go to File->Properties, select the serial port to use from the combo box. Select the 'Bits Per Second' (typically 115200) and 'Flow Control' (none), leave the text boxes at their defaults. Hit 'Ok' to exit Properties. Click on the 'Connect' button. Go to Test Tools->Embedded Evaluator. In the code window (the large bottom left window), delete the IronPython code and replace it with this:

import sys
import clr
from System.Windows.Forms.import*

x += chr(0x30) + chr(0x31) + chr(0x32)


Then click on the 'Execute' button. The serial port will transmit the hex values 0x30, 0x31, and 0x32 over the serial bus. If you use another PC on the receiving end of this communication the results on a terminal emulator will be:

0 1 2

This is because, 0x30, 0x31, 0x32 is 0, 1, 2 in ASCII.

You can add as many hex values to the above string as you like, just include it in the character function "chr()".