Home

6000 Series Module CO2 Sensor UART and SPI Communications

image

Contents

1. data lt data gt Read bytes from the Sensor s memory RAM or EE Prom Read count consecutive bytes starting at address lt addr Isb gt in memory page lt page gt count must be from 1 to16 Sensor s memory is organized in 256 byte pages Pages 0 1 amp 2 are RAM Pages 10 11 17 are EE Prom Response is count bytes of data 1 up to 16 bytes Three examples of values that can be PEEKed are ELEVATION SPAN CAL PPM and SNGPT CAL PPM Req Resp CMD PEEK ELEVATION 0x06 0x11 OxlC 0x04 elevation ieee Read the elevation above sea level an operating parameter for the Sensor Response is the elevation represented as a 4 byte single precision IEEE floating point least significant byte first little endian See Appendix 3 on IEEE Floating Point This command is equivalent in function to the command CMD READ ELEVATION which returns the elevation as an unsigned long Req Resp CMD PEEK SPAN CAL PPM 0x06 0x11 OxAO 0x04 span cal ppm _ieee gt Read the CO PPM used in the most recent Span Calibration of the Sensor Response is the CO ppm represented as a 4 byte single precision IEEE floating point least significant byte first little endian This command is equivalent in function to the command CMD READ SPAN CAL PPM which returns the span gas PPM as an unsigned long Req Resp CMD PEEK SNGPT CAL PPM 0x06 0x11 OxA8 0x04 sngpt ca
2. flag length command lt additional data CMD UPDATE ELEVATION 1000 OxFE 0x04 0x03 Ox0F OxE8 0x03 Response indicating acknowledgement lt ACK gt lt flag gt lt length gt OxFE 0x00 6 3 3 Request Module to perform Skip Warm up lt flag gt lt length gt lt command gt CMD SKIP WARMUP OxFE 0x01 0x91 Response indicating acknowledgement lt ACK gt flag length OxFE 0x00 UART SPI 6004 X04 PROTOCOL 02 Telaite Confidential TELAIRE A Division of Edwards Systems Technology 7 Command Reference for the 6000 Sensor Every common exchange of data between a host processor or PC and the Sensor starts with a request data packet sent to the Sensor followed by a response data packet returned from the Sensor The request data packet contains a command byte telling what data or sensor action is required The command byte also determines what additional data is included in the request packet Both UART and SPI communications share a common command syntax and repertoire of commands In fact both communication interfaces share the same microcontroller resources for pointers variables and message buffers Hence the Module can respond to only one type of communication UART or SPI at a time NOTE Each request and response must be wrapped in the appropriate communications interface protocol either UART Tsunami or SPI as described above The following Command Reference gives only the co
3. The S bit located at byte 0 bit 7 flags the sign of the floating point number This format does NOT use two s complement encoding The S bit is defined as follows 0 gt Positive 1 gt Negative The exponent located in bytes 0 and 1 is 8 bits long and is positive biased In the special case of a zero exponent ft th ntire value of the floating point number is said to be f zero and all bits should be cleared The mantissa located in bytes 1 through 3 is 23 bits long but carries 24 bits of information The implied bit is fi located in the most significant bit 23 position If the exponent is zero bit 23 and all other bits are clear If the exponent is non zero bit 23 is set When calculating the value of a floating point number that has been stored in this format one assigns the value 0 5 LE 1 2 to bit 23 0 25 1 4 to bit 22 0 125 1 8 to bit 21 and so on If the exponent is non zero and so the implied bit 23 is set the value will fall between one half and below one This number between 0 5 and 1 0 is then multiplied by two raised to the exponent 126 power For example if the Ju exponent contains the binary value 127 and the mantissa is all zeros except for the implied bit 23 the value this number is 0 5 2 127 126 1 0 1
4. Resp3 status byte is 0x04 Sensor is in calibration mode Req 4 CMD_STATUS Resp4 status byte is 0x00 Sensor is in normal mode measuring CO2 PPM UART SPI 6004 X04 PROTOCOL 02 Telaire Confidential 27 B ELAIRE A Division of Edwards Systems Technology 8 6 UART Span Calibration In this set of interchanges we run a span calibration on the Sensor The span calibration adjusts the Sensor s zero calibration settings in such a way as to make the Sensor s CO PPM measurement match the span PPM value In this example we are flowing a 2000 PPM CO gas to the Sensor We update SPAN CAL PPM to 2000 so this value will be used as the span gas concentration for span calibration Then we start the span calibration and check the Sensor s status until the calibration is completed Req 1 gt FF FF FE 04 03 10 D0 07 66 25 Req 1 03 10 is CMD UPDATE SPAN CAL PPM and DO 07 is 2000 PPM 2000 0x07D0 Resp1 gt FF FF FA 00 0A FC Respl lt ACK gt Req 2 gt FF FF FE 01 9A 91 E9 Req 2 CMD SPAN CALIBRATE Starts the calibration process Resp2 gt FF FF FA 00 0A FC Resp2 lt ACK gt Wait 2 4 seconds Req 3 gt FF FF FE 01 B6 7F 0C Req 3 CMD_STATUS Resp3 gt FF FF FA 01 04 2657 Resp3 status byte is 0x04 Sensor is in calibration mode Req 4 gt FF FF FE 01 B6 7F 0C Req 4 CMD_STATUS Resp4 gt FF FF FA 01 00 A2 17 Resp4 status byte is 0x00 Sensor is in normal mode measuring CO2 PPM 9 SPI Com
5. lt ACK gt UART SPI 6004 X04 PROTOCOL 02 Telaire Confidential 36 FELAIRE A Division of Edwards Systems Technology Appendix 3 IEEE Floating Point Some Sensor commands use data formatted as 4 byte single precision IEEE floating point least significant byte first little endian Following is a description of that numerical format Although this description depicts the big endian implementation the 6000 Module CO Sensor uses a little endian implementation That is the order of the bytes in the Sensor is reversed so that byte 0 is stored at the next higher address from byte 1 which is stored at the next higher address from byte 2 etc J KKK RK KK HK IK IK IK A I A A A A A KCCKCCkCkCKCkCKCkCkCkCkCkCk Ck kc k kc k k ck kckckckck ckck kck ckck ckckckck Kok ke e kx x f IEEE 754 4 BYTE FLOATING POINT FORMAT BIG ENDIAN lt Byte 0 gt lt Byte 1 gt lt Byte 2 gt lt Byte 3 gt i ine mis RI EC MED GEE SC GC E i76543210 76543210 76543210 7654 32 1 0 If ff 0 RSS SSeS oe Se ose See a Sa Sa ee eee ae SeecS Ff IS Exponent Mantisa PB RSS SRR SSS SS a Se ea ea Se aS Se Sasa PE S 8 gt DB SSS SSS gt Byte 0 is the most significant byte Byte 3 is the least significant byte Lj
6. lt data gt CMD READ CO2 PPM 0x02 0x03 ppm lsb ppm msb CMD READ SERIAL NUMBER 0x02 0x01 ASCII string null terminated up to 16 bytes CMD READ COMPILE SUBVOL 0x02 0x0D 12 byte ASCII string null terminated CMD READ COMPILE DATE 0x02 0x0C 7 byte ASCII string null terminated CMD READ ELEVATION 0x02 OxOF lt elev_Isb gt elev msb CMD READ SPAN CAL PPM 0x02 0x10 lt span lsb span msb CMD READ SNGPT CAL PPM 0x02 0x11 lt sngpt_Isb gt sngpt msb Command available on Release 04 or later CMD UPDATE Commands Command Request Response CMD UPDATE ELEVATION 0x03 OxOF lt elev_Isb gt lt elev_msb gt lt ACK gt CMD UPDATE SPAN CAL PPM 0x03 0x10 lt span_Isb gt lt span_msb gt lt ACK gt CMD UPDATE _CAL PPM 0x03 0x11 lt sngpt_Isb gt lt sngpt_msb gt lt ACK gt Command available on Release 04 or later RESET and WARMUP Commands Command Request Response CMD WARM 0x84 lt ACK gt or no response gt CMD HARD OxB5 lt ACK gt or no response CMD SKIP WARMUP 0x91 lt ACK gt CALIBRATION Commands Command Request Response CMD ZERO CALIBRATE 0x97 lt ACK gt CMD SPAN CALIBRATE 0x9A lt ACK gt CMD SNGPT CALIBRATE 0x9D lt ACK gt UART SPI 6004 X04 PROTOCOL 02 Telaire Confidential 35 B ELAIRE A Division of Edwards Systems Technology STATUS and OPERATING Commands Command Request R
7. 1000 0x03E8 Req 2 gt FF FF FE 04 03 OF C4 09 4D 64 In request 2 03 OF is CMD_UPDATE ELEVATION and C4 09 is the elevation 2500 ft 2500 0x09C4 Resp2 gt FF FF FA 00 0A FC The second response is an lt ACK gt since the length is 0x00 Req 3 gt FF FF FE 02 02 OF FA C4 The third request and response are formatted just like the UART SPI 6004 X04 PROTOCOL 02 25 Telaire Confidential B ELAIRE A Division of Edwards Systems Technology first reading back the new elevation setting 2500 ft Resp3 gt FF FF FA 02 C4 09 3F D2 8 4 UART Error Simulation with Recovery In this set of interchanges we first verify that the Sensor is operating normally Then we send a command that forces the sensor into an error state The Sensor automatically recovers by resetting itself and going into Warmup Mode We then send the command to skip warm up thus putting the sensor back into the normal state Req 17 FF FF FE 01 B6 7F 0C Req 1 CMD STATUS Resp1 gt FF FF FA 01 00 A2 17 Respl status byte is 0x00 Sensor is in normal mode measuring CO2 PPM Req 2 gt FF FF FE 01 95 7E 18 Req 2 CMD HALT Puts sensor in error mode No response Req 3 gt FF FF FE 01 B6 7F 0C Req3 CMD STATUS Resp3 gt FF FF FA 01 02 E0 37 Resp3 status byte is 0x02 Bit 1 high indicates Sensor is in warm up mode If CMD STATUS is sent quickly enough the sensor may respond with 0x01 indicating the brief error state
8. OxBICA OxA1EB OxD10C 0xC12D OxF14E OxEL16F 0x1080 0x00A1 Ox30C2 Ox20E3 O0x5004 00x4025 0x7046 Ox6067 0x83B9 0x9398 OxA3FB OxB3DA OxC33D OxD31C OxE37F OxF35E 0x02B1 0x1290 Ox22F3 0Ox32D2 0x4235 0x5214 Ox6277 0x7256 OxB5EA OxA5CB Ox95A8 0x8589 OxF56E OxES4F OxD52C OxC50D Ox34E2 0x24C3 0x14A0 00x0481 0x7466 0x6447 0x5424 0x4405 OxA7DB OxB7FA 0x8799 Ox97B8 OxE75F OxF77E OxC71D OxD73C 0x26D3 Ox36F2 00x0691 Ox1l6BO Ox6657 Ox7676 4 0x4615 0x5034 OxD94C OxC96D OOxF90E OxE92F Ox99C8 Ox89E9 OxB98A OxA9AB 0x5844 0x4865 0Ox7806 Ox6827 0x18C0 Ox08E1 O0x3882 0x28A3 OxCB7D OxDB5C OxEB3F OxFB1E Ox8BF9 Ox9BD8 OxABBB OxBB9A 0x4A75 0x5A54 Ox6A37 0x7A16 OxOAF1 Ox1ADO Ox2AB3 0x3A92 OxFD2E OxEDOF OxDD6C OxCD4D OxBDAA OxAD8B Ox9DE8 0x8DC9 0x7C26 Ox6CO7 Ox5C64 Ox4C45 Ox3CA2 O0x2C83 Ox1CEO 0x0CCl OxEFIF OxFF3E OxCF5D OxDF7C OxAF9B OxBFBA Ox8FD9 Ox9FF8 Ox6E17 0x7E36 Ox4E55 Ox5E74 Ox2E93 Ox3EB2 0x0ED1 Ox1EFO E WORD CalcCRC WORD wAccum BYTE byte return wAccum lt lt 8 crc tab BYTE wAccum gt gt 8 byte UART SPI 6004 X04 PROTOCOL 02 Telaire Confidential 33 TELAIRE A Division of Edwards Systems Technology A1 2 Example Calling CalcC RC Following is C code that wraps the communications protocol around a request packet The lt command gt and additional data are initially i
9. Req gt FF FF FE 02 00 F2 2A 9C The request is CMD LOOPBACK with data OxF2 The16 bit CRC in the response is OxD8FF but it is Resp gt FF FF FA 01 F2 FF 00 D8 written with it s least significant byte first Since the CRC in the response contains an OxFF the protocol inserts a 0x00 following the OxFF Req gt FF FF FE 02 00 80 FF 00 C2 The request is CMD LOOPBACE with data 0x80 In this example the CRC in the request contains a OxFF and Resp FF FF FA 01 80 2A 86 so the protocol inserts a 0x00 following the OxFF 4 SPI Communications Interface Overview The SPI is a serial synchronous communications interface consisting of an 8 bit serial shift register with serial data input SI serial data output SO and serial shift Clock SK The Module works as a slave on the SPI bus The external processor is the master This has two important consequences First the external processor provides the SK clock signal for both sending and receiving data across the bus Secondly all communications are initiated by the external processor with the Module merely responding From the Module s point of view during communications with an external processor its SI serial in and SK serial clock are inputs and its SO serial out is an output Additionally there are two digital handshake lines that an external processor uses to communicate with the Module UB REQ and UB ACK The acronym UB stands for MICROWIRE Bus with the U being
10. and the Skip Warmup Command Detailed descriptions of these commands are given below 3 5 UART OxFF Bytes and Zero Insertion If any field other than the flag field contains the byte OxFF the communications protocol inserts a trailing 0x00 byte immediately following the OxFF byte The inserted 0x00 byte is for transmission purposes only and is not included in the determination of the message length or the calculation of the CRC In fact the 0x00 byte insertion is done after the CRC is appended to the packet Hence if one of the CRC bytes is OxFF then the protocol will insert a 0x00 byte after the OxFF CRC byte The following table gives several examples albeit contrived of Zero Insertion Req gt FF FF FE 02 00 FF 00 87 4D The request is CMD LOOPBACK with data OxFF The lt length gt is 0x02 the lt command gt is 0x00 and the Resp gt FF FF FA 01 FF 00 52 09 lt additional_data gt is OxFF The protocol inserts a 0x00 following the OxFF in the lt additional_data gt The 0x00 lt command gt requests the Sensor to echo back the lt additional_data gt from the request packet So the lt response_data gt in the response packet is the single OxFF byte In the response the lt length gt is 0x01 and the response data is OxFF The protocol inserts a 0x00 following the OxFF in lt response_data gt UART SPI 6004 X04 PROTOCOL_02 T el air eC onfi d enti al B ELAIRE A Division of Edwards Systems Technology
11. as standard SK mode with SK clock idle state low 5 2 SPI Min Max Timing Issues Refer to the diagrams below Fig 5 2 SPI Write to Module Fig 5 3 SPI Writing to Then Reading from Module and Fig 5 4 End of SPI Reading or Writing Table 5 1 Parameter Limit Units Condition Comments ti 780 u Sec Typical delay UB REQ low to UB ACK low ty 0 u Sec Min Minimum elapsed UB_ACK low to first SK rising edge tz 150 u Sec Typical delay Byte sent received to UB ACK Hi ty 200 u Sec Min Typical minimum UB ACK high between bytes ty 440 u Sec Max Typical maximum UB ACK high between bytes fsx MAX 500 KHz Max Maximum SK clock frequency ts 1 u Sec Min Minimum SK hi low pulse width t 20 n Sec Min Data Valid to SK rising edge Setup tg 56 n Sec Min Data Valid after SK rising edge Hold tio 0 u Sec Min UB ACK High to UB REQ High tu 680 u Sec Min UB REQ High between communications exchanges Observed measurement typical not limiting UART SPI 6004 X04 PROTOCOL 02 Telaire Confidential B ELAIRE A Division of Edwards Systems Technology Fig 5 1 SK UUL SIN MsbX X X X X X XI SOUT OX X X X X X AII MICROWIRE Timing Standard SK Mode Fig 5 2 UB REQ tox gt t gt t UB_ACK a ee Fb be ert SPI Write to Module Fig 5 3 t UB_ACK M y Be O OOO O O a SOUT X X X SPI Writing to Then Reading From Modul
12. byte command transfers e Hardware related timing max clock rates etc 2 1 General System Timing When sensor is operating the internal cycle of the data acquisition and signal processing is 2 seconds The host could interrogate the sensor more often for this information but generally it makes no sense and is not recommended Therefor it is advised to keep the communications cycle for CO concentration requests to a multiple of 2 seconds 2 4 6 etc The time interval between other commands is less restricted In general with the exception of a Status command following a Calibration command a subsequent command can be issued as soon as the reply from the previous command has been received For a Status command following a Calibration command the host should wait at least 2 to 4 seconds before issuing the first Status command This allows time for the Module to begin the calibration process 2 2 Initializing Communications at Power Up When Module power is first applied or in case of power brown outs and other forms of power failure the Module will respond to host commands after 5 to 7 seconds This communications delay time is necessary for the sensor to achieve full power and initialize After initialization the Module stays in a Warm up mode The duration of the Warm up period is configurable Depending on the Module model the warm up time can be set anywhere from 6 to 60 seconds The difference between Warm Up and normal oper
13. cre_Isb gt lt crc_msb gt two byte binary CRC algorithm given below The CRC is little endian that is the least significant byte is given first UART SPI 6004 X04 PROTOCOL 02 T el air eC onfi d enti al B ELAIRE A Division of Edwards Systems Technology In response to the above identification command CMD READ SERIAL NUMBER one Sensor replied with the following byte stream OxFF OxFF OxFA 0x09 Ox4E Ox4F 0x42 0x30 0x30 0x3 0x32 0x34 0x00 0x13 0OxBO0 flag flag address lt response_data gt ere Isb lt length gt lt cre_msb gt The nine byte response_data 4E 4F 42 30 30 31 32 34 00 translates to the null terminated ASCII string NOBO00124 the serial number for that particular sensor 3 4 UART Acknowledgement or lt ACK gt Reply Some commands require that a Sensor only confirm that the command was received and the appropriate action was taken In this case when a Sensor does not need to return data in response to a command it will instead reply with an Acknowledgement response called an lt ACK gt This is a response packet formatted as shown above but with the lt length gt equal to 0x00 and no response data present OxFF OxFF OxFA 0x00 Ox0A OxFC lt flag gt lt flag gt lt address gt lt cre_Isb gt lt length gt lt cre_msb gt Examples of commands that expect an Acknowledgement response are Update Commands Calibrate Commands
14. similar to the Greek letter micron UB REQ is an input to the Module UB ACK is an output from the Module A conceptual diagram of the input and output lines is given below SI CO SK Fig 4 1 Module SO UW REQ UW ACK 4 1 SPI Handshaking Starting To Communicate Normally the external processor keeps UB REQ high and the Module keeps UB ACK high When the external processor wants to communicate with the Module it lowers UB REQ then waits until the Module lowers UB ACK This lowering of UB ACK indicates that the Module is now in SPI bus slave mode and is prepared to communicate with the external processor The external processor as an SPI bus master can then begin sending the bytes in the request sequence UART SPI 6004 X04 PnorOocor 02 T el air eC onfi d enti al B ELAIRE A Division of Edwards Systems Technology 4 2 SPI Sending and Receiving Data Every data exchange between an external processor and the Module starts with the external processor sending a request data packet several bytes to the Module The Module then responds by returning a response data packet to the external processor The request data packet contains a command byte and perhaps one or more parameter bytes Details of the commands and the data associated with each command are shown below in section Commands Additionally request and response data packets are wrapped in a packet protocol described in the section SPI Packet Protocol 4 3 S
15. the command See Commands below 6 2 SPI Response Data Packet flag length response data flag A single byte value OxFE This signals the start of a request or response data packet If the Module receives a value other than OxFE as the first byte in a request data packet then it raises UB ACK and leaves it up This signals that it 1s terminating an incomplete data exchange lt length gt A one byte binary value from 0x00 to OxFF Length counts the number of bytes in response data In a response data packet a length of 0x00 indicates that the packet is an acknowledgement lt ACK gt and no response data bytes follow the length byte UART SPI 6004 X04 PRoTOCOL 02 T el air eC onfi d enti al 13 FELAIRE A Division of Edwards Systems Technology response data Zero or more bytes of data depending on the command sent in the request data packet See Commands above 6 3 Example SPI Data Packets A comprehensive list of available commands and their syntax is given in following sections The following examples illustrate the use of the SPI packet protocol 6 3 1 Request to Read Module s PPM measurement flag length lt command gt additional data CMD READ CO2 PPM OxFE 0x02 0x02 0x03 Response indicating 419 PPM COs Note that 419 0x01A3 flag length response data OxFE 0x02 OxA3 0x01 6 3 2 Request to set Module s elevation to 1000 feet Note 1000 0x03E8
16. 0 if the sign bit is set J KK RK HK HK HK KK I A A A Ck kCk Ck kCkCkCkCKCkCkCkCKCkCKCkCkCkCkCkCk Ck kc k kc k k ck kckckckckckck kck ckck ckckckck Kok ke e kx x f UART SPI 6004 X04 PROTOCOL 02 37 Telaire Confidential
17. 4 byte single precision IEEE floating point number least significant byte first little endian Response is an acknowledgement or lt ACK gt a response data packet with the length byte set to zero and no data bytes The CMD_POKE command should be followed by the corresponding CMD_PEEK command to verify that the expected value was written This command is equivalent in function to the command CMD UPDATE SPAN CAL PPM discussed above which writes the span gas PPM as an unsigned long CMD POKE SNGPT CAL PPM Req 0x07 0x11 OxAS lt sngpt_cal_ppm_ieee gt Resp lt ACK gt Write a CO PPM value for the Sensor to use in Single Point calibration sngpt cal ppm ieee gt is expressed as a 4 byte single precision IEEE floating point number least significant byte first little endian Response is an acknowledgement or lt ACK gt a response data packet with the length byte set to zero and no data bytes The CMD_POKE command should be followed by the corresponding CMD_PEEK command to verify that the expected value was written This command is equivalent in function to the command CMD UPDATE SNGPT CAL PPM discussed above which writes the single point gas PPM as an unsigned long UART SPI 6004 X04 PROTOCOL 02 Telaire Confidential 24 B ELAIRE A Division of Edwards Systems Technology 8 UART Communication Examples The following examples illustrate request and response packets
18. Data Exchange After sending the final byte in a response packet the Module raises UB ACK and leaves it high The external processor then raises UB REQ concluding the data interchange UB REQ must stay high longer than a specified minimum before the external processor lowers it to start any subsequent data exchange see Timing below 4 5 Aborting an SPI Data Exchange If the external processor needs to terminate an incomplete data exchange it raises the UB REQ line When the Module detects this it discards the contents of its communication buffers and responds by raising UB ACK If the Module needs to terminate an incomplete data exchange it raises UB ACK If UB ACK remains high longer than the maximum time specified for UB ACK High Between Bytes see Timing below then the external processor must recognize this as termination of an incomplete data exchange For example if the Module receives bytes that do not correspond to a valid request data packet then it raises UB ACK and holds it high signaling the termination of an incomplete data exchange The Module starts a 10 millisecond timeout timer each time it lowers UB ACK The external processor must respond by starting the serial shift clock within this interval so that the module can transmit or receive the pending byte If the UART SPI 6004 X04 PROTOCOL_02 T el air eC onfi d enti al B ELAIRE A Division of Edwards Systems Technology external processor fails to start the clock
19. MD READ ELEVATION Req 1 gt FE 02 02 OF In the first response E8 03 is the elevation 1000 ft Resp1 gt FE 02 E8 03 1000 0x03E8 In request 2 03 OF is CMD UPDATE ELEVATION Req 2 gt FE 04 03 OF C4 09 and C4 09 is the elevation 2500 ft 2500 0x09C4 The second response is an lt ACK gt since the length is Resp2 gt FE 00 0x00 The third request and response are formatted just like the Req 3 gt FE 02 02 OF first reading back the new elevation setting 2500 ft Resp3 gt FE 02 C4 09 9 4 SPI Error Simulation with Recovery In this set of interchanges we first verify that the Sensor is operating normally Then we send a command that forces the sensor into an error state The Sensor automatically recovers by resetting itself and going into Warmup Mode We then send the command to skip warm up thus putting the sensor back into the normal state Req 1 gt FE 01 B6 Req 1 CMD STATUS Resp1 gt FE 01 00 Respl status byte is 0x00 Sensor is in normal mode measuring CO2 PPM Req 2 gt FE 01 95 Req 2 CMD HALT Puts sensor in error mode No UART SPI 6004 X04 PROTOCOL 02 29 Telaire Confidential FELAIRE A Division of Edwards Systems Technology Req 3 FE 01 B6 Resp3 gt FE 01 02 Req 4 gt FE 01 91 Resp4 gt FE 00 Req 5 gt FE 01 B6 Resp5 gt FE 01 00 response Req 3 CMD_STATUS Resp3 status byte is 0x02 Bit 1 high indicates Sensor is in warm up mod
20. NULL OP ERE RC ES ERES EA 3 UART Serial Communications Interface eee ee esee sees sees eese tn natns tassa seta stessa senses sense suse ense tn setas 3 1 UART Tsunami Communications Protocol cccccsscessesseeesceeeceeceseeeeeeeaecsaecseecaeecaecaeecaeecaeeeaeseseseeeeeseeeseereeeenaees 3 2 UART Commands from PC to Sensor 033 5 coe E eee hee 3 3 UART Response from Sensor to PC nae eser e RR oe ees ER EC GER C NS E E HE hese ee 3 4 UART Acknowledgement or lt ACK gt Reply sees eene nnne nennen rre nre nennen rennen nne 3 5 UART OxFF Bytes atid Zero l sertioti uit epe tede recie e iE E REEL ELE RE VE SEE SR RI RYE RESI Reve SEC nu 4 SPI Communications Interface Overview eee eee ee eee eese ee seen sensns tuns tn se tn setas tosta stes tes sense suse sn se tuse ta sn 4 1 SPI Handshaking Starting To Communicate eeessesssseeseeseeeeeeneenennen ener nre ne eren rennen enne 4 2 SPI Sending and Receiving Data iret pie reet Ino rre teet Peine ee ero Qe bau EKE AR ESEE EEEE EEEa fee euis 10 4 3 SPI Handshaking Between Bytes ce eesssescssesesesessecesesesscessenescenaeeasesecseessenacsnenaecasesesseesssnascesaeeesenecaseoeenee 10 4 4 SPI Handshaking Ending a Data Exchange eese ener entente ener ennn rennen 10 4 5 Aborting an SPI Data Exchange sesssessesseseeeeeee eere nren trennen trennen inneren nennen nnne nnns 10 5 SP
21. PI Handshaking Between Bytes After receiving each byte in a request data packet the Module raises the UB ACK handshaking line When it is ready to receive the next byte it lowers UB ACK The external processor may send the next byte to the Module any time within 10 milliseconds of the time UB ACK goes low This handshaking between bytes provides flow control and insures that the external processor does not overrun the Module s input buffer and that the Module does not wait indefinitely for the external processor to send the next byte After receiving the final byte of the request data packet the Module again raises UB ACK The UB REQ line remains low during the whole of the request packet operation and during the response packet operation and between the request and response When the Module has processed the request and is ready to send the first byte of the response data packet the Module lowers UB ACK The external processor has 10 milliseconds from the time the UB ACK line goes low in order to start the clock and receive the byte After transmitting the byte the Module raises UB ACK and lowers it again when it is ready to transmit the next byte The process continues until all bytes of the response data packet have been transmitted to the external processor The 10 millisecond time limit insures that the Module does not wait indefinitely for the external processor to start the clock to receive the byte 4 4 SPI Handshaking Ending a
22. T Buss Timing H io 11 REIN SPL SE SMN oi c e a Eara e a aa e R 11 5 2 SPI Min Max Timing Issues esssessessesseseeseeen enne enne enne nnne teet eene en trennen eene entente trennt ennt nn nennen 11 MENT csgund m 13 6 1 SPI Request Data Packet sessesessessessesseeseee ener estent estt ennt nn entr ESSES trente ESES EENES sesten nn niente nnns 13 6 2 SPI Response Data Packet sssssssssessessessee eene enne nennen entree nenne entren retener in nn entren innen nennen 13 6 3 Example SPI Data Packets esssesssssessesseeeen eee enne eene teen nn nete en rr testene enne in enr nn nennt nennt enters 14 7 Command Reference for the 6000 Sensor eee eee eee ee esee tenete setenta seta stis sensns essen setas ea seta seta sensn 15 7 1 CMD READ Commands RR 15 T2 CMD UPDATE COtninands rn etre eene etre he ete in er e euer esed ise ten Fere eerta eter etes 16 7 3 RESET and WARMUP Commands sese ennt nent nne nnn en rne n rr en ner nnne nnne nennen 17 7 4 CALIBRATION Commands eese ener enne Stnt ES test enne sene ESSEE ESES Entes nennen nennen nnne nnns 18 7 5 STATUS and OPERATING Commands ccceeceesceeseesseesecseecseeeneseneeeeuseeesecesecaeceaeceaecaaecaeecaeesaeseaeseneseneeeneeas 20 TO Test Commands c Eere Odette n ALME MU MIEL A 21 7 7 CMD PEEK Commands For Completen
23. TELAIRE A Division of Edwards Systems Technology 6000 Series Module CO Sensor UART and SPI Communications Protocols Document Revision 02 Document Revisions 08 11 05 Renamed document UART SPI 6004 X04 Protocol 02 doc 10 03 02 Renamed document UART SPI 6004 X04 Protocol 01 doc and noted that CMD READ and CMD UPDATE for SNGPT PPM available on Release 04 or later 09 25 02 First Draft adapted from 6000 Comm 01 doc and SPI Comm Protocol 09C doc UART SPI 6004 X04 PROTOCOL_02 Telaire Co nfi d enti al TELAIRE A Division of Edwards Systems Technology 6000 Series Module CO Sensor UART and SPI Communications Protocols Table of Contents 1 Communications Interfaces ccsscsssssccssssseccssesssessesseessesssenessessnesenesseesscssscsssessesscssonssnsenessseesscessesssesssssoess 2 UART and SPI Communications Logic and Timing 4 erae eee eee eese eese eese en stent n tensis sns stn sense ense tn sene 2 1 General System TIMING asi rrr HERE CE TATE REL dae E ER TRE EH A E Ee EE Crea Pes 2 2 Initializing Communications at Power Up cccceccecssesscesseeeceseceseceaecaeecaeecaeeeaeeeneseeeeeceseeeeeseeeeeaeceaecnaecneeeaeeeaes 2 3 Timing related to byte command transfers cccecccescceseceseceecscecsecseecaeecaeeeseeeseseeeecsseeeseseaeceaeceaeceaecneeeaeeeaes ZA Hardware related timutig e eee em rer cig dors tess AER Rage EE Hb LEER YE ERR URR aUe ER e det
24. aintains the UART baud rate of 9600 The clock rate for the SPI communications interface is determined by the host Requirements for the SPI clock rate are discussed below 3 UART Serial Communications Interface The 6000 Series Module CO Sensor communicates over an asynchronous UART interface at 9600 baud no parity 8 data bits and 1 stop bit When a host computer or PC communicates with the Sensor the host computer sends a request to the Sensor and the Sensor returns a response The host computer acts as a master initiating all communications and the Sensor acts as a slave responding with a reply All Sensor commands and replies are wrapped in the proprietary Telaire Tsunami Communications Protocol to insure the integrity and reliability of the data exchange The Communications Protocol for the serial interface and the Command Set for the 6000 Series Module CO Sensor are described in detail in the sections that follow 3 1 UART Tsunami Communications Protocol Each command to the Sensor consists of a length byte a command byte and any additional data required by the command Each response from the Sensor consists of a length byte and the response data if any Both the command to the sensor and the response from the Sensor are wrapped in the Tsunami communications protocol layer Command lt length gt lt command gt lt additional_data gt Response lt length gt lt response_data gt The communications protocol consists of two fla
25. al 15 TELAIRE A Division of Edwards Systems Technology S53 000306 The last byte of the response is a null character 0x00 CMD READ COMPILE DATE Read the compilation date for the CO module control software COMPILE DATE and Req 0x02 0x0C COMPILE SUBVOL together identify the software version Resp 7 byte ASCII string null terminated Response is an ASCII string representing a date for example 000302 for March 2 2000 The 7 byte of the response is a null character 0x00 CMD READ ELEVATION Read the elevation in feet above sea level a required operating parameter for the Sensor The Sensor s Req 0x02 OxOF elevation setting is used to estimate air pressure and is factored into the calculation of CO PPM Resp elevation lsb elevation msb Response is a 2 byte binary value least significant byte first giving the elevation value between 0 and 65 535 feet CMD READ SPAN CAL PPM Read the CO PPM used in the most recent Span Calibration of the Sensor Req 0x02 0x10 Response is a 2 byte binary value least significant Resp span lsb lt span_msb gt byte first giving the Span Gas concentration between 0 and 65 535 PPM CMD READ SNGPT CAL PPM Read the CO PPM used in the most recent Single Point Calibration of the Sensor Req 0x02 Oxll Response is a 2 byte binary value least significant Resp lt sngpt_Isb gt lt sngpt msb byte first giving the Single Point Gas concen
26. ating mode is that in the Warm Up the module may not yet report accurate readings and hence cannot execute any calibration commands All other commands can be executed during Warm up The Status of the sensor can be checked by using the Status command see the commands description below This command returns the status byte with a number of flags including the Warm Up status flag The Warm up mode can be terminated by using the Skip Warm Up command The gas ppm concentration can be read while the sensor is in Warm Up mode however the data may not be accurate The recommended sequence for the host microcontroller communications for both UART and SPI is Power Up Wait 5 7 seconds Start polling Status Byte every 2 seconds Wait for the Status Byte equal to 0 Start polling the CO ppm data every 2 seconds NOTE If for any reason the sensor does not respond to a request either UART or SPI simply re send the command UART SPI 6004 X04 PROTOCOL 02 Telaire Confidential B ELAIRE A Division of Edwards Systems Technology 2 3 Timing related to byte command transfers The Module s UART communications interface expects a frame size of 8 bits no parity one stop bit and a baud rate of 9600 The SPI communications protocol utilizes a hand shaking paradigm to transfer bytes between the Module and the host which will be described in detail below 2 4 Hardware related timing The RC Oscillator set to 2 MHz during sensor initialization m
27. data packet with the length byte set to zero and no data bytes The CMD_POKE command should be followed by the corresponding CMD_PEEK command to verify that the expected value was written Three examples of values that can be POKEd are ELEVATION SPAN CAL PPM and SNGPT CAL PPM CMD POKE ELEVATION Req 0x07 0x11 OxlC lt elevation_ieee gt Resp lt ACK gt Write an elevation value to the sensor s memory elevation ieee is expressed as a 4 byte single precision IEEE floating point number least significant byte first little endian Elevation is measured in feet above sea level The Sensor s elevation setting is used to estimate air pressure and is factored into the calculation of CO PPM Response is an acknowledgement or lt ACK gt a response data packet with the length byte set to zero and no data bytes The CMD POKE command should be followed by the corresponding CMD PEEK command to verify that the expected value was written This command is equivalent in function to the UART SPI 6004 X04 PROTOCOL 02 Telaire Confidential 23 TELAIRE A Division of Edwards Systems Technology command CMD UPDATE ELEVATION discussed above which writes the elevation as an unsigned long CMD POKE SPAN CAL PPM Req 0x07 0x11 OxAO span cal ppm ieee gt Resp lt ACK gt Write a CO PPM value for the Sensor to use in Span calibration lt span_cal_ppm_ieee gt is expressed as a
28. e UART SPI 6004 X04 PROTOCOL 02 T el ai re C o nfi d enti al TELAIRE A Division of Edwards Systems Technology Fig 5 4 End of SPI Reading or 6 SPI Packet Protocol Every SPI exchange of data between an external processor and the Module starts with a request data packet sent to the Module followed by a response data packet returned from the Module The request and response data packets are formatted as follows 6 1 SPI Request Data Packet flag length command lt additional data flag A single byte value OxFE This signals the start of a request or response data packet If the Module receives a value other than OxFE as the first byte in a request data packet then it raises UB ACK and leaves it up This signals that it is terminating an incomplete data exchange lt length gt A one byte binary value from 0x01 to OxFF Length counts the number of bytes in the command plus any additional data If a command has no additional data then length is 0x01 Length of 0x00 is not valid for a request data packet In a response data packet a length of 0x00 indicates that the packet is an acknowledgement lt ACK gt and no additional data bytes follow the length byte lt command gt A one byte value See Commands below This specifies the nature of the request and also establishes the meaning of any additional data in the request additional data Zero or more bytes of data depending on
29. e If CMD STATUS is sent quickly enough the sensor may respond with 0x01 indicating the brief error state prior to reset Req 4 CMD SKIP WARMUP Resp4 lt ACK gt Req 5 CMD STATUS Resp5 status byte is 0x00 Sensor is in normal mode measuring CO2 PPM UART SPI 6004 X04 PROTOCOL 02 Telaire Confidential 30 FELAIRE A Division of Edwards Systems Technology 9 5 SPI Zero Calibration In this set of interchanges we run a zero calibration on the Sensor Before sending any commands we start flowing a zero gas like nitrogen to the Sensor Then we verify that the sensor is in normal operating mode since calibration will not work 1f the sensor is not in normal operating mode Then we send the zero calibration command to start the calibration process We check the Sensor s status and see that it is in calibration mode Later we check the status again and see that the Sensor has finished calibration and returned to normal operating mode Req 1 gt FE 01 B6 Resp1 gt FE 01 00 Req 2 gt FE 01 97 Resp2 gt FE 00 Req 3 gt FE 01 B6 Resp3 gt FE 01 04 Req 4 gt FE 01 B6 Resp4 gt FE 01 00 Req 1 CMD_STATUS Respl status byte is 0x00 Sensor is in normal mode measuring CO2 PPM Req 2 CMD_ZERO CALIBRATE Starts the calibration process Resp2 lt ACK gt Wait 2 4 seconds Req 3 CMD_STATUS Resp3 status byte is 0x04 Sensor is in calibration mode Req 4 CMD_STATUS Resp4
30. e ennt nne trennen ne enne treten trennen neret enne nn 29 PEE UA Eerluccniee C M 31 9 6 SPI Span olio eu 32 Appendix 1 CRC Calculation 4 esee eee eee eee eee eese enne tn sa tasa ta setas ts stes ses sensns suns toss su setas tasa tosta s tastes stan 33 Lune 33 Al 2 o cunzeriliurde euo 34 Appendix 2 Summary of Commands 4 eee eee eee eee essen seen seta stia stessi s sensns snnt suse suse sas ense to seta seta stesse s sna n 35 Appendix 3 IEEE Floating Point cscsscsssssscssssscscssssssssssesssesssessesssssesescesscesscssecsscesscssscseesssssscsssnsssnsessseseeesens 37 UART SPI 6004 X04 PROTOCOL_02 Telaire Confidential 3 FELAIRE A Division of Edwards Systems Technology 6000 Series Module CO Sensor UART and SPI Communications Protocols 1 Communications Interfaces The 6000 Series Module CO Sensor possesses two different communications interfaces with which to communicate with an external host The first is an asynchronous RS 232 UART serial communications port All communications over this UART serial interface must be wrapped in the proprietary Telaire Tsunami Communications Protocol The second method of communication is the Synchronous Peripheral Interface commonly referred to as an SPI Bus communications interface This interface in earlier documentation is referred to as a MICROWIRE Bus In
31. esponse CMD STATUS OxB6 status CMD IDLE ON OxB9 0x01 lt ACK gt CMD _ IDLE OFF OxB9 0x02 lt ACK gt CMD ABC LOGIC OxB7 0x00 abc state CMD ABC LOGIC ON OxB7 0x01 0x01 CMD ABC LOGIC RESET OxB7 0x03 lt 0x01 gt CMD ABC LOGIC OFF OxB7 0x02 lt 0x02 gt TEST Commands Command Request Response CMD HALT 0x95 lt no response gt CMD LOOPBACK 0x00 data bytes data bytes CMD PEEK Commands For Completeness Only It is strongly recommended that this command not be used unless under the specific direction of the manufacturer Command Request Response CMD PEEK 0x06 page addrlsb count data lt data gt CMD PEEK ELEVATION 0x06 0x11 Ox1C 0x04 elevation ieee little endian gt CMD PEEK SPAN CAL PPM 0x06 0x11 OxAO 0x04 span cal ppm ieee gt CMD PEEK SNGPT CAL PPM 0x06 0x11 OxA8 0x04 sngpt cal ppm ieee gt CMD POKE Commands For Completeness Only This command must not be used unless under the direct specification of the manufacturer Command Request Response CMD POKE 0x07 page addr Isb gt lt data gt lt data gt lt ACK gt CMD POKE ELEVATION 0x07 0x11 OxlC lt elevation ieee gt lt ACK gt CMD POKE SPAN CAL PPM 0x07 0x11 OxAO lt span cal ppm ieee gt lt ACK gt CMD POKE SNGPT CAL PPM 0x07 0x11 OxAS lt sngpt cal ppm ieee gt
32. ess Only essere nnne nnne nennen 22 7 8 CMD POKE Commands For Completeness Only esee eene 23 8 UART Communication Examples eese eee eee esee es seen einen sentina suns tn netu seta setas tasa ta seta sees states senses sense tuae 25 SI UARTBe3dCOSPPND oasASconUsRESToDeRCRUEEHR CN MM DII eI EA 25 8 2 UART CMD STATUS to Verify Normal Operation essere nennen eene nennen inen 25 8 3 UART Read and Update Elevation eene irent tenet ete bp etie eee aX AER ee Eee pep eR PEN tg e Es ape eA DR Vip e AE RID tess 25 8 4 UART Error Simulation with Recovery eese eene tnen nr ennn rre nre nennen rrt 26 8 5 UART Zero Calibration RRRRRRRRRRRRRRRM 27 8 6 UART Span Calibration eniin n e e Fe e eir e ote Fe ee FE Here d reden 28 UART SPI 6004 X04 PROTOCOL_02 Telaire Co nfi d ential FELAIRE A Division of Edwards Systems Technology 9 SPI Communication Examples 4 eeeee eee eee eese eese ense sten stent n sins ennt sn setas essen setas esa setas etes sess ens sens ense ense tuae 28 9 1 SPI Read CO PPM eei RO TRIER AE RENE RO RR RE AERE EREERE 28 9 2 SPICMD STATUS to Verify Normal Operation esee eene nennen nennen rre 29 9 3 SPI Read and Update Elevatioti ere cioe es eet ine cnt resp Re eB EN E ER MERE e ceo EeUp asd Pap ee e eR ERE REESE Eee ede EUH 29 9 4 SPI Error Simulation with Recovery eese enn
33. g bytes OxFF and an address byte as a header and a two byte CRC as a trailer In addition if the byte OxFF occurs anywhere in the message body or CRC trailer the protocol inserts a null 0x00 byte immediately following the OxFF byte The inserted 0x00 byte is for transmission purposes only and is not included in the determination of the message length or the calculation of the CRC Header Message Body Trailer lt flag gt lt flag gt lt address gt lt Command Response gt lt crc_Isb gt lt crc_msb gt When receiving a command or response the flags and any inserted 0x00 bytes must be stripped from the message before calculating the verification CRC A verification CRC should be computed on all received messages from the sensor and compared with the CRC in the message trailer If the verification CRC matches the trailer CRC then the data from the Sensor was transmitted correctly with a high degree of certainty The CRC is computed only on the address and the Message Body That is the CRC calculation is performed on the address byte the length byte and all bytes of the Command including any additional_data bytes and the Response UART SPI 6004 X04 PROTOCOL 02 T el air eC onfi d enti al TELAIRE A Division of Edwards Systems Technology 3 2 UART Commands from PC to Sensor Commands sent from a host computer or PC to the Sensor have the following format lt flag gt lt flag gt lt address gt lt length gt lt command gt lt additiona
34. hould be flowing to the sensor The lt ACK gt response indicates that the calibration request has been received To verify that calibration has started wait 2 to 4 seconds and then send command CMD STATUS to see if the calibration bit is set When calibration is finished the calibration bit in the status byte is cleared A zero calibration will not start if a Sensor is in warm up mode or in error condition See Communication Examples below CMD SPAN CALIBRATE Req 0x9A Resp lt ACK gt This command tells the Sensor to start a Span calibration See Span Calibration in Communication Examples below Before sending this command the Span Gas with a known CO PPM should be flowing to the sensor The command CMD UPDATE SPAN CAL PPM see above must be sent to inform the sensor about the PPM of the calibration gas The lt ACK gt response indicates that the calibration request has been received To verify that calibration has started wait 2 to 4 seconds and then send command CMD STATUS to see if the calibration bit is set When calibration is finished the calibration bit in the status byte is cleared A span calibration will not start if a Sensor is in warm up mode or in error condition See Communication Examples below CMD SNGPT CALIBRATE Req 0x9D Resp lt ACK gt This command tells the Sensor to start a Single Point calibration Before sending this command the Single Poin
35. l ppm _ieee gt Read the CO PPM used in the most recent Single Point Calibration of the Sensor Response is the CO ppm represented as a 4 byte single precision IEEE floating point least significant byte first little endian UART SPI 6004 X04 PROTOCOL 02 Telaire Confidential 22 TELAIRE A Division of Edwards Systems Technology This command is equivalent in function to the command CMD READ SNGPT CAL PPM which returns the single point gas PPM as an unsigned long 7 8 CMD POKE Commands For Completeness Only The CMD POKE Command is included in the Command Set for completeness only A CMD POKE modifies a Sensor s RAM or ee prom memory and can render a Sensor non functional if misused Use of the command requires a detailed knowledge of the Sensors memory map and expertise in representing values in IEEE little endian Floating Point format This command must not be used unless under the direct specification of the manufacturer CMD POKE 0x07 Req 0x07 page addr Isb gt data lt data gt Resp lt ACK gt Write bytes to the sensor s memory RAM or EE Prom Write lt count gt consecutive bytes starting at address lt addr Isb gt in memory page lt page gt lt count gt must be from 1 to16 Sensor s memory is organized in 256 byte pages Pages 0 1 amp 3 are RAM Pages 10 11 17 are EE Prom Response is an acknowledgement or lt ACK gt a response
36. l_data gt lt cre_lsb gt lt cre_msb gt where lt flag gt the hex value OxFF lt address gt one byte hex value The byte OxFE is an address to which all sensors respond lt length gt total length in bytes of the command and additional data lt command gt one byte hex command values explained below additional data may or may not be applicable depending upon the command lt crc_Isb gt lt cre_msb gt two byte binary CRC algorithm given below The CRC is little endian meaning that the least significant byte is given first For example to request Sensor identification the following command is used OxFF OxFF OxFE 0x02 0x02 0x01 0x34 0x25 flag flag lt address gt lt cre_msb gt lt length gt lt cre_Isb gt additional data SERIAL NUMBER command CMD READ The length of the command is 0x02 since the command CMD READ SERIAL NUMBER consists of the two bytes 0x02 0x01 3 3 UART Response from Sensor to PC Responses returned from the Sensor to the host computer or PC have the following format lt flag gt lt flag gt lt address gt lt length gt lt response_data gt lt cre_Isb gt lt cre_msb gt where lt flag gt the hex value OxFF lt address gt one byte hex value The byte OxFA signifies to master in a master slave communication lt length gt total length in bytes of the response data lt response_data gt may or may not be applicable depending upon the command lt
37. mmand syntax and response only and omits the protocol wrapping In the following Commands Tables hex bytes are represented as 0x12 for clarity However when sending the byte string in a message the Ox notation must be omitted 7 1 CMD READ Commands CMD READ 0x02 Read a data value or parameter from the Module Req 0x02 lt data ID gt Request is the command byte 0x02 followed by a 1 byte number that identifies which data value or Resp data lt data gt parameter to read Response is one or more bytes of data Details of useful values that can be read from the 6000 Sensor follow CMD READ CO2 PPM Read the CO2 PPM as measured by the Sensor Req 0x02 0x03 Response is a 2 byte binary value least significant byte first giving the CO PPM value between 0 and Resp lt ppm_Isb gt ppm msb 65 535 CMD READ SERIAL NUMBER Read the serial number from the Sensor Req 0x02 0x01 Response is an ASCII string of printable characters for example 074177 The last byte of the response Resp ASCII string null terminated up to 16 bytes is a null character 0x00 CMD READ COMPILE SUBVOL Read the compilation subvolume for the Sensor control software COMPILE DATE and Req 0x02 0x0D COMPILE SUBVOL together identify the software version Resp ASCII string null terminated up to 16 bytes Response is an ASCII string representing for example UART SPI 6004 X04 PROTOCOL 02 Telaire Confidenti
38. mple C Subroutine for calculating the 2 byte CRC used in the communications protocol const unsigned int crc tab 256 0x0000 0x1021 0x2042 0x3063 O0x4084 Ox50A5 Ox60C6 0x70E7 0x8108 0x9129 OxA14A OxB16B OxCl18C OxDIAD OxEICE OxFIEF 0x1231 0x0210 0x3273 Ox2252 0x52B5 0x4294 Ox72F7 Ox62D6 0x9339 0x8318 OxB37B OxA35A OxD3BD OxC39C OxF3FF OxE3DE 0x2462 0x3443 0x0420 0x1401 Ox64E6 Ox74C7 Ox44A4 0x5485 OxA56A OxB54B 0x8528 0x9509 OxESEE OxFSCF OxC5AC OxD58D 0x3653 4 0x2672 0x1611 4 0x0630 Ox76D7 Ox66F6 O0Ox5695 0x46B4 OxB75B 0xA77A 0x9719 4 0x8738 OxF7DF OxE7FE OxD79D OxC7BC 0x48C4 Ox58E5 0x6886 Ox78A7 4 0x0840 0x1861 O0x2802 0x3823 OxC9CC OxD9ED OxE98E OxF9AF O0x8948 0x9969 OxA90A OxB92B Ox5AF5 Ox4AD4 Ox7AB7 0x6A96 OxlA71 Ox0A50 0Ox3A33 0x2A12 OxDBFD OxCBDC OxFBBF OxEB9E 0x9B79 0x8B58 OxBB3B OxABIA 0x6CA6 Ox7C87 Ox4CE4 Ox5CC5 Ox2C22 Ox3C03 Ox0C60 Ox1C4l1 OxEDAE OxFD8F OxCDEC OxDDCD OxAD2A OxBDOB 0x8D68 0x9D49 Ox7E97 Ox6EB6 Ox5ED5 Ox4EF4 Ox3E13 Ox2E32 0x1E51 OxOE70 OxFF9F OxEFBE OxDFDD OxCFFC OxBF1B OxAF3A Ox9F59 Ox8F78 0x9188 0x81A9
39. munication Examples The following examples illustrate request and response packets with the SPI communications protocol These are the same commands that were listed above for the UART communications protocol Requests and responses are expressed in hexadecimal bytes The lt command gt portion of a request and the lt response_data gt are in bold type 9 1 SPI Read CO PPM In the request 02 03 is CMD READ CO2 PPM Req gt FE 02 02 03 In the response 50 02 is a 2 byte binary value least Resp gt FE 02 50 02 significant byte first giving the CO PPM as 592 PPM 592 0x0250 UART SPI 6004 X04 PROTOCOL 02 28 Telaire Confidential B ELAIRE A Division of Edwards Systems Technology 9 2 SPI CMD STATUS to Verify Normal Operation In the request B6 is CMD STATUS Req gt FE 01 B6 In the response 00 is the status byte The zero value Resp FE 01 00 indicates that the Sensor is in normal mode where it is measuring CO PPM It is not in warm up mode it is not in calibration mode and it is not in an error condition Further examples of CMD STATUS are given in the examples below 9 3 SPI Read and Update Elevation In this set of interchanges we first read the Sensor s elevation parameter and find it is set at 1000 ft Then we change the elevation setting to 2500 ft Then we read back the new elevation setting and verify that it is set to 2500 ft In request 1 02 OF is C
40. n the array bIssue ESCAPE is a literal for the OxFF flag character The length of the command and additional data is in wLen The address is in lpTSU gt ComTarget And the fully wrapped request packet is placed in the array pbPacket j 0 pbPacket j ESCAPE pbPacket j ESCAPE pbPacket j BYTE lpTSU gt ComTarget wCrc CalcCRC 0 BYTE lpTSU gt ComTarget pbPacket j BYTE wLen if wLen ESCAPE pbPacket j 0 wCrc CalcCRC wCrc BYTE wLen for i 0 i lt when i pbPacket j wCrc if bIssue i bIssue i CalcCRC wCrc bIssue i h iSCAP E pbPacket j pboPacket j BYTI 0 No CRC on transport material E wCrc if pbPacket j 1 ESCAP E pbPacket j pbPacket j BYTI 0 E wCrc amp OxFF00 58 if ESCAP E pbPacket j 1 pbPacket j UART SPI 6004 X04 PROTOCOL 02 0 Telaire Confidential i ELAIRE A Division of Edwards Systems Technology Appendix 2 Summary of Commands CMD READ Commands Command Request Response CMD READ 0x02 data ID gt data
41. nd tells the Sensor to go into Idle Mode In Idle Mode the Lamp is turned off and no data collection takes place Issuing this command causes the Sensor to reset in order to enter Idle Mode Hence the Sensor experiences the same communications delay as at power up Send the CMD_STATUS command to verify that the Sensor has entered Idle Mode status bit 3 1 Req Resp CMD IDLE OFF 0xB9 0x02 lt ACK gt This command tells the Sensor to exit Idle Mode and resume data collection Issuing this command causes the Sensor to reset in order to exit Idle Mode Hence the Sensor experiences the same communications delay as at power up The Sensor goes through Warm up Mode prior to resuming data collection Send the CMD_STATUS command to verify that the Sensor has come out of Idle Mode status bit 3 0 Req Resp CMD ABC LOGIC 0xB7 0x00 lt abc_state gt This command queries the Sensor for its ABC LOGIC state If ABC LOGIC is ON abc state 0x01 If ABC LOGIC is OFF abc state 0x02 UART SPI 6004 X04 PROTOCOL 02 Telaire Confidential 20 B ELAIRE A Division of Edwards Systems Technology CMD ABC LOGIC ON This command turns the ABC LOGIC ON The reply 0x01 indicates that the ABC LOGIC has been Req OxB7 0x01 turned on Resp lt 0x01 gt CMD ABC LOGIC RESET This command turns the ABC LOGIC ON and resets the ABC LOGIC to its star
42. nt Gas concentration between 0 and 65 535 PPM The CMD UPDATE command should be followed by the corresponding CMD READ command to verify that the expected value was written Command available on Release 04 or later 7 3 RESET and WARMUP Commands CMD WARM Reset the sensor which puts it in a known state similar to power up The Sensor initializes itself Req 0x84 waits a period of time in warm up mode and then starts to measure CO PPM The Sensor attempts to Resp lt ACK gt or no response send an lt ACK gt but transmission may be aborted by the reset The Sensor experiences the same communications delay as at power up CMD HARD Same as CMD WARM Req OxB5 Resp lt ACK gt or no response CMD SKIP WARMUP Req 0x91 Resp lt ACK gt When the sensor is powered up or reset it waits for a period of time in warm up mode before starting to measure CO PPM When the Sensor is in warm up mode CMD SKIP WARMUP tells the Sensor to end warm up mode and start measuring CO PPM The command CMD STATUS can be used to determine 1f a sensor is in Warmup Mode See Communication Examples below UART SPI 6004 X04 PROTOCOL 02 Telaire Confidential TELAIRE A Division of Edwards Systems Technology 7 4 CALIBRATION Commands CMD ZERO CALIBRATE Req 0x97 Resp lt ACK gt This command tells the Sensor to start zero calibration Before sending this command the zero gas such as nitrogen s
43. prior to reset Req 4 gt FF FF FE 01 91 FA 58 Req4 CMD SKIP WARMUP Resp4 gt FF FF FA 00 0A FC Resp4 lt ACK gt Req 5 FF FF FE 01 B6 7F 0C Req 5 CMD STATUS Resp5 gt FF FF FA 01 00 A2 17 Resp5 status byte is 0x00 Sensor is in normal mode measuring CO2 PPM UART SPI 6004 X04 PROTOCOL 02 26 Telaire Confidential FELAIRE A Division of Edwards Systems Technology 8 5 UART Zero Calibration In this set of interchanges we run a zero calibration on the Sensor Before sending any commands we start flowing a zero gas like nitrogen to the Sensor Then we verify that the sensor is in normal operating mode since calibration will not work 1f the sensor is not in normal operating mode Then we send the zero calibration command to start the calibration process We check the Sensor s status and see that it is in calibration mode Later we check the status again and see that the Sensor has finished calibration and returned to normal operating mode Req 1 gt FF FF FE 01 B6 7F 0C Respl FF FF FA 01 00 A2 17 Req 2 gt FF FF FE 01 97 3C 38 Resp2 gt FF FF FA 00 0A FC Req 3 gt FF FF FE 01 B6 7F 0C Resp3 gt FF FF FA 01 04 26 57 Req 4 gt FF FF FE01 B6 7F 0C Resp4 gt FF FF FA 01 00 A2 17 Req 1 CMD STATUS Respl status byte is 0x00 Sensor is in normal mode measuring CO2 PPM Req 2 CMD ZERO CALIBRATE Starts the calibration process Resp2 lt ACK gt Wait 2 4 seconds Req3 CMD STATUS
44. status byte is 0x00 Sensor is in normal mode measuring CO2 PPM UART SPI 6004 X04 PROTOCOL 02 Telaire Confidential 31 FELAIRE A Division of Edwards Systems Technology 9 6 SPI Span Calibration In this set of interchanges we run a span calibration on the Sensor The span calibration adjusts the Sensor s zero calibration settings in such a way as to make the Sensor s CO PPM measurement match the span PPM value In this example we are flowing a 2000 PPM CO gas to the Sensor We update SPAN CAL PPM to 2000 so this value will be used as the span gas concentration for span calibration Then we start the span calibration and check the Sensor s status until the calibration is completed Req 1 gt FE 04 03 10 DO 07 Respl FE 00 Req 2 gt FE 01 9A Resp2 gt FE 00 Req 3 gt FE 01 B6 Resp3 gt FE 01 04 Req 4 gt FE 01 B6 Resp4 gt FE 01 00 Req 1 03 10 is CMD UPDATE SPAN CAL PPM and DO 07 is 2000 PPM 2000 0x07D0 Respl lt ACK gt Req 2 CMD_SPAN CALIBRATE Starts the calibration process Resp2 lt ACK gt Wait 2 4 seconds Req 3 CMD_STATUS Resp3 status byte is 0x04 Sensor is in calibration mode Req 4 CMD_STATUS Resp4 status byte is 0x00 Sensor is in normal mode measuring CO2 PPM UART SPI 6004 X04 PROTOCOL 02 Telaire Confidential 32 TELAIRE A Division of Edwards Systems Technology Appendix 1 CRC Calculation A1 1 CaleCRC Below is a sa
45. t Gas with a known PPM should be flowing to the sensor The command CMD UPDATE SNGPT CAL PPM UART SPI 6004 X04 PROTOCOL 02 Telaire Confidential TELAIRE A Division of Edwards Systems Technology see above must be sent to inform the sensor about the PPM of the calibration gas The lt ACK gt response indicates that the calibration request has been received To verify that calibration has started wait 2 to 4 seconds and then send command CMD STATUS to see if the calibration bit is set When calibration is finished the calibration bit in the status byte is cleared A Single Point Calibration will not start if the Sensor is in warm up mode or in error condition UART SPI 6004 X04 PROTOCOL 02 Telaire Confidential TELAIRE A Division of Edwards Systems Technology 7 5 STATUS and OPERATING Commands Req Resp CMD STATUS OxB6 lt status gt Read a status byte from the Sensor The status byte indicates whether the sensor is functioning and is measuring PPM concentration The response is a single byte lt status gt of bit flags Note bit 0 is the least significant bit Bit 0 Error Bit 1 Warmup Mode Bit 2 Calibration Bit 3 Idle Mode Bits 4 7 internal If a given status bit is 1 the sensor is in that state or mode Ifa status bit is 0 the sensor is not in that mode Req Resp CMD_IDLE_ON OxB9 0x01 lt ACK gt This comma
46. terface All communications over the SPI bus require a protocol different from the Tsunami Protocol A physical diagram of the interface connector is shown below Note that these signals are received transmitted with a 74HC244 CMOS line driver J1 5V DIGITAL 1 O Ol cnouwp 5V ANALOG 3 O Ol 4 avout Fig 1 1 ACK 5 O Ols srisER ovr SPISER CIK 7 O O 8 sPisER IN REQ 9 O Olt1o TRANSMIT UART T RECEIVE UART 11 O 12 GROUND Both UART and SPI communications share a common command syntax and repertoire of commands In fact both communication interfaces share the same microcontroller resources for pointers variables and message buffers Hence the Module can respond to only one type of communication UART or SPI at a time MICROWIRE is a registered trademark of National Semiconductor For more information on MICROWIRE see National Semiconductor s COP8 Microcontroller Databook or COP8 Feature Family User s Manual March 1998 Literature Number 620897 004 On the web see http www national com UART SPI 6004 X04 PROTOCOL_02 T el air eC onfi d enti al B ELAIRE A Division of Edwards Systems Technology 2 UART and SPI Communications Logic and Timing Although protocols for the two types of communications interfaces are different both have initialization logic and timing constrains Timing information for the Module may be considered at three levels e General system timing and initialization e Timing related to
47. the Module presumes that the communication has been aborted and will raise UB ACK If either the external processor or the Module terminates a data exchange no new communication can be initiated until both UB ACK and UB REQ have returned to the high state The new command then starts with the external processor lowering UB REQ as described above S SPI Bus Timing During SPI communications the external processor supplies the clock pulse for both sending and receiving data across the bus Thus to an external processor the Module appears as a slave on the SPI bus S 1 SPI SK Shift Clock To assure compatibility with the previous revisions of the product the rev X04 modules use hardware implementation of the MICROWIRE interface emulating the interface of National Semiconductor COP8 microcontroller Although the user is not expected to be familiar with the COPS nevertheless some of the explanations mention COP8 implementation details for the benefit of those who are familiar The Module expects the SK serial clock line to be low when it is not being used to clock data over the bus The Module samples input data on SI at the rising edge of the SK clock and clocks shifts its SPI shift register on the falling edge of the SK clock Thus the Module s output data is available on SO for the external processor to sample at the rising edge of the clock See the diagram below titled MICROWIRE Timing Standard SK Mode In the COP8 this is described
48. tration between 0 and 65 535 PPM Command available on Release 04 or later 7 2 CMD UPDATE Commands CMD UPDATE ELEVATION Set Write the elevation in feet above sea level a required operating parameter for the Sensor Req 0x03 OxOF lt elevation_Isb gt lt elevation_msb gt Elevation is expressed as a 2 byte binary value least significant byte first Resp lt ACK gt Response is an acknowledgement or lt ACK gt a response data packet with the length byte set to zero and no data bytes The CMD_UPDATE command should be followed by the corresponding CMD READ command to UART SPI 6004 X04 PROTOCOL 02 Telaire Confidential TELAIRE A Division of Edwards Systems Technology verify that the expected value was written CMD UPDATE SPAN CAL PPM Req 0x03 0x10 lt span_Isb gt lt span_msb gt Resp lt ACK gt Set Write the CO PPM to be used in the Span Calibration of the Sensor The Span value is a 2 byte binary value least significant byte first giving the Span Gas concentration between 0 and 65 535 PPM The CMD UPDATE command should be followed by the corresponding CMD READ command to verify that the expected value was written CMD UPDATE SNGPT CAL PPM Req 0x03 0x11 sngpt lsb lt sngpt msb Resp lt ACK gt Set Write the CO PPM to be used in the Single Point Calibration of the Sensor The Single Point value is a 2 byte binary value least significant byte first giving the Single Poi
49. tup state The reply Req OxB7 0x03 0x01 indicates that the ABC LOGIC has been turned on Resp lt 0x01 gt CMD ABC LOGIC OFF This command turns the ABC LOGIC OFF The reply 0x02 indicates that the ABC LOGIC has Req OxB7 0x02 been turned off Resp 0x02 7 6 Test Commands CMD HALT This command is used strictly for testing It tells the Sensor to put itself into error mode and act as though Req 0x95 a fatal error has occurred The sensor should automatically reset itself and go into Warmup Mode Resp lt no response gt See Communication Examples below CMD_LOOPBACK This command is used strictly for testing The data_bytes up to 16 bytes following the 0x00 Req 0x00 lt data_bytes gt command are echoed back in the response packet Resp lt data_bytes gt UART SPI 6004 X04 PROTOCOL 02 Telaire Confidential 21 TELAIRE A Division of Edwards Systems Technology 7 7 CMD PEEK Commands For Completeness Only The CMD PEEK Command is included in the Command Set for completeness only CMD PEEK permits the inspection of a Sensor s entire RAM and ee prom memory Use of the command requires a detailed knowledge of the Sensors memory map and expertise in interpreting values in IEEE little endian Floating Point format It is strongly recommended that this command not be used unless under the specific direction of the manufacturer Req Resp CMD PEEK 0x06 0x06 page addrlsb lt count gt
50. with the full UART Tsunami communication protocol Requests and responses are expressed in hexadecimal bytes The command portion of a request and the response data are in bold type 8 1 UART Read CO PPM In the request 02 03 is CMD READ CO2 PPM see Req gt FF FF FE 02 02 03 76 05 Command Reference above Resp FF FF FA 02 50 02 7B B7 In the response 50 02 is a 2 byte binary value least significant byte first giving the CO PPM as 592 PPM 592 0x0250 82 UART CMD STATUS to Verify Normal Operation In the request B6 is CMD STATUS see Command Req gt FF FF FE 01 B6 7F 0C Reference above Resp FF FF FA 01 00 A2 17 In the response 00 is the status byte The zero value indicates that the Sensor is in normal mode where it is measuring CO PPM It is not in warm up mode it is not in calibration mode and it is not in an error condition Further examples of CMD STATUS are given in the examples below 8 3 UART Read and Update Elevation In this set of interchanges we first read the Sensor s elevation parameter and find it is set at 1000 ft Then we change the elevation setting to 2500 ft Then we read back the new elevation setting and verify that it is set to 2500 ft In request 1 02 OF is CMD READ ELEVATION see Req 1 gt FF FF FE 02 02 OF FA C4 Command Reference above Resp1 gt FF FF FA 02 E8 03 FE 30 In the first response E8 03 is the elevation 1000 ft

Download Pdf Manuals

image

Related Search

Related Contents

C100 VTC M-SYSTEM .2906-§4  Trendows-Xp, user manual - Kirsten Controlsystems GmbH  Jet 82-132  Vista - Kenwood  Mode d`emploi 480.644 Crayons PicTixx Peinture sur tissus  製品安全データシート(MSDS)  Comrac COMPA23 Mobile Workstation  Zenoah BCZ3200DW User's Manual  télécharger ce CV  B.5 ZOLL E Series Configuration and Operation  

Copyright © All rights reserved.
Failed to retrieve file