PRGS430.DLL—Description
2-13
Operation
2.4 PRGS430.DLL—Description
The PRGS430.dll is used to communicate with the MSP−PRGS430 hardware
and the connected MSP430 device.
The initialization of the PRGS430 should be done with the following sequence:
InitCom
SetDeviceType
SetVCC
. InitTarget
. ...
. ReleaseTarget
ReleaseCom
Several examples showing how the DLL could be used are located in the
“DLL_Usage_Examples” subdirectory of the PRGS430 system.
This dll could be used separately using the following conventions:
/FN0001/ InitCom
long int InitCom(char* lpszComPort, long int lBaudRate)
InitCom initializes (opens) the given communications port, establishes
communication with the PRGS430 hardware, and sets the baud rate of the
MSP−PRGS430. If successful, the MSP−PRGS430 is reset and VCC is set to
0.0 V (the voltage should be set after the first user action to validate the correct
value).
lBaudRate: valid baud rates are: 9600, 19200, 38400, 56800, and 115200
baud. The default baud rate after installation is 115200 baud.
lpszComPort: the name of the communication port—COM1, COM2, COM3,
or COM4.
Example: lFuncReturn = InitCom(”COM1” 115200)
/FN0002/ ReleaseCom
long int ReleaseCom (void)
This new function is the counterpart to InitCom. It allows to close a
communication with the MSP-PRGS430 hardware.
VCC is set to 0 and all outputs are set to the Hi-Z state.
Example: IFuncReturn = ReleaseComm()
/FN0003/ SetDeviceType
Example:
lFuncReturn = SetDeviceType(char* lpszDeviceName)
Selects the device type.
lpszDeviceName: name of the device in file device.cfg
Example: lFuncReturn = SetDeviceType(”MSP430F1121”)