ICP DAS USA 7000 ユーザーズマニュアル

ページ / 84
 
              
7000 Bus Converter User Manual (version 1.2,Feb/2003, 7PH-006-10)  --------------- 84 
 
  Step 3: read the module status, chksum=DISABLE 
  Step 5: enable checksum with the INIT*_pin floating, so the function fails. If 
the user want to enable the checksum bytes of the 7000 module, the 
INIT*_pin must be connected to the GND_pin. If the INIT*_pin is left floating 
(unconnected), the 7000 module will echo ?AA to the user. 
  Step 8: enable checksum with the INIT*_pin connected to the GND_pin. 
After this command, the checksum is still in the DISABLE state. The state of 
checksum will be changed only during the power-on period. But the 
checksum status is saved into EEPROM immediately. 
  Step 10: read the module status from EEPROM and find that checksum is in 
the ENABLE state. The state of checksum was changed in step 8 but this 
module is still in checksum DISABLE state. Only when the module has 
powered-off-and-powered-on, the state of checksum will be changed to 
ENABLE 
  Step 11: power off, disconnect the INIT*_pin and the GND_pin. Power on. 
The checksum status of this module is enabled now. 
  Step 12-17: Changes TEST.EXE to baud rate 9600 and checksum enable, 
then read back the module status and find that the module is in checksum 
enable state now. 
 
The steps to compute checksum are given as follows:
 
step 1: checksum=0; 
1.  Step 2: for all command byte checksum = checksum + command byte 
2. Step 3: checksum=checksum&0xff 
3.  Step 4: convert checksum to ASCII high byte and ASCII low byte 
 
 
 
For example, command = $012[Enter] 
Checksum = $+0+1+2=0x24+0x30+0x31+0x32=0xB7 
Checksum & 0xff = 0xB7 
Checksum ASCII high byte = ASCII B = 0x42 
Checksum ASCII low byte = ASCII 7 = 0x37 
Command with checksum = $012B7[Enter