HTBasic Help
×
Menu
Index

Communication Parameters

 
Plugging the cable between the computer and the device is not all that is required to make them talk. The devices must speak the same language in order to understand each other. It doesn’t matter what it is, but it is essential they be the same! The language consists of the baud rate, data bits, parity, and stop bits. You must determine which of these parameters can be set on the device, what they can be set to, and how they are set. Typically, you would choose the highest baud rate that both the device and the computer support, one stop bit, eight data bits, and no parity.
 
To set these values on the computer running HTBasic, use the serial CONTROL registers 3 and 4, which are listed at the end of this section. For example, if you are using COM1 and the interface select code has not been changed from 9 and you wish to set 9600 baud, 1 stop bit, 8 data bits, and no parity, you would use this statement:
 
CONTROL 9,3;9600,3
 
Now plug in the cable, set the values, and give it a try. Remember to set the parameters on both the computer and the device. Depending on the device, you may have to set some switches, type a command, or do something else.