User's Manual

ACG RF PC Handheld Reader Modules, Version 0.2
ACG Identification Technologies AT Page 7
dcb.StopBits = ONESTOPBIT;
//***************************************** IMPORTANT LINES
dcb.fDtrControl = DTR_CONTROL_ENABLE;
dcb.fRtsControl = RTS_CONTROL_DISABLE;
if (SetCommState(hComm, &dcb) == 0)
printf("error\n");
}
/* type in your application here*/
// close communication and free handle
CloseHandle(hComm);
Figure 3-2: Source code of com settings
3.4.1 Remarks
The DTR signal is used to switch on and off the whole unit. The DCB block manages
to set a connection to the RF PC Handheld Reader Module. Opening and closing the
COM port is used to enable and disable the whole device. This ends ups in a
customizable power management.
3.5 Writing applications in embedded Visual Basic
The DTR signal must be handled in the same way as described above. The DTR
signal switches on and off the whole unit. Since the com port module of Visual Basic
does not support the DTR easily a more sophisticated solution is needed.
It is not recommended to write applications in Visual Basic.