The communicationprotocol between the ADC-box and the aquisitionsoftware. ------------------------------------------------------------------------- RS-232 settings: 115K2, 8N1, no flowcontrol The communication is oneway only, no bytes are transmitted from the pc to the ADC-box. As soon as the ADC-box is switched on, it will transmit data, regardles a pc is connected or not. The ADC-box transmits data in blocks of 9220 bytes: 12 channels * 3 bytes per channel * 256 Hz + 4 sync bytes The order is: |<--------------- 4 synchronisation bytes -------------->| | | (SYNC_END has decimal value 192, | SYNC_END | SYNC_END | sequence nr. | SYNC_END2 | SYNC_END2 has decimal value 17) |<------------------------------------------ sample 0 ---------------------------------------------------------->| | | |<------- channel 0 ------>|<------- channel 1 ------>|<------- channel 2 ------>| ... |<------ channel 12 ----->| | | | | | | | byte 0 | byte 1 | byte 2 | byte 0 | byte 1 | byte 2 | byte 0 | byte 1 | byte 2 | ... |byte 0 | byte 1 | byte 2 | |<------------------------------------------ sample 1 ---------------------------------------------------------->| | | |<------- channel 0 ------>|<------ channel 1 ------>|<------- channel 2 ------>| ... |<------ channel 12 ----->| | | | | | | | byte 0 | byte 1 | byte 2 | byte 0 | byte 1 | byte 2 | byte 0 | byte 1 | byte 2 | ... |byte 0 | byte 1 | byte 2 | |<------------------------------------------ sample 2 ---------------------------------------------------------->| | | |<------- channel 0 ----->|<------- channel 1 ----->|<------- channel 2 ----->| ... |<------ channel 12 ----->| | | | | | | | byte 0 | byte 1 | byte 2 | byte 0 | byte 1 | byte 2 | byte 0 | byte 1 | byte 2 | ... |byte 0 | byte 1 | byte 2 | sample 3 ... 253 |<------------------------------------------ sample 254 -------------------------------------------------------->| | | |<------- channel 0 ----->|<------- channel 1 ----->|<------- channel 2 ----->| ... |<------ channel 12 ----->| | | | | | | | byte 0 | byte 1 | byte 2 | byte 0 | byte 1 | byte 2 | byte 0 | byte 1 | byte 2 | ... |byte 0 | byte 1 | byte 2 | |<------------------------------------------ sample 255 -------------------------------------------------------->| | | |<------- channel 0 ----->|<------- channel 1 ----->|<------- channel 2 ----->| ... |<------ channel 12 ----->| | | | | | | | byte 0 | byte 1 | byte 2 | byte 0 | byte 1 | byte 2 | byte 0 | byte 1 | byte 2 | ... |byte 0 | byte 1 | byte 2 | |<--------------- 4 synchronisation bytes -------------->| | | | SYNC_END | SYNC_END | sequence nr. | SYNC_END2 | |<------------------------------------------ sample 0 ---------------------------------------------------------->| | | |<------- channel 0 ----->|<------- channel 1 ----->|<------- channel 2 ----->| ... |<------ channel 12 ----->| | | | | | | | byte 0 | byte 1 | byte 2 | byte 0 | byte 1 | byte 2 | byte 0 | byte 1 | byte 2 | ... |byte 0 | byte 1 | byte 2 | |<------------------------------------------ sample 1 ---------------------------------------------------------->| | | |<------- channel 0 ----->|<------- channel 1 ----->|<------- channel 2 ----->| ... |<------ channel 12 ----->| | | | | | | | byte 0 | byte 1 | byte 2 | byte 0 | byte 1 | byte 2 | byte 0 | byte 1 | byte 2 | ... |byte 0 | byte 1 | byte 2 | |<------------------------------------------ sample 2 ---------------------------------------------------------->| | | |<------- channel 0 ----->|<------- channel 1 ----->|<------- channel 2 ----->| ... |<------ channel 12 ----->| | | | | | | | byte 0 | byte 1 | byte 2 | byte 0 | byte 1 | byte 2 | byte 0 | byte 1 | byte 2 | ... |byte 0 | byte 1 | byte 2 | etc. SYNC_END has decimal value 192 SYNC_END2 has decimal value 17 sequencenr. has a decimal value in the range 0 ... 255 After every block of data the sequence number will increase by one. Description of a sample of one channel: |<------------------- byte 0 -------------------------->| | | | DB21 | DB20 | DB19 | DB18 | DB17 | DB16 | DB15 | DB14 | | MSB |<------------------- byte 1 -------------------------->| | | | DB13 | DB12 | DB11 | DB10 | DB9 | DB8 | DB7 | DB6 | |<------------------- byte 2 -------------------------->| | | | DB5 | DB4 | DB3 | DB2 | DB1 | DB0 | X | o.f. | | | | LSB | overflow bit, is one during overflow | not used ADC-data is two's complement.