# co2_t6603

T6603_CO2, read values from GE/Telaire T6603 CO2 sensor.

Author | Eur van Andel, eur@fiwihex.nl Copyright © 2008
Adapted-by | Albert Faber
Compiler | =2.4m

Description

    this library communicates with the T6603 GE/Telaire CO2 sensor.
    This sensor uses the Telaire Tsunami-Lite Commnications Protocol
    available functions are:
    get_status() return byte
    get_co2_ppm() return word           -- CO2 concentration in ppm
    get_serial_numer() return string[15]
    get_elevation_m() return word       -- in meters above sea level

Sources

    http://www.ge-mcs.com/download/sensing-manuals/T63182-003.pdf
    if this document moves, google for: http://www.google.com/search?q=telaire+tsnuami+lite

Dependencies

No dependency found

## Summary

### Global variables/contants

- `var word co2_global`
- `const CMD_UPDATE = 0x03`
- `const ELEVATION = 0x0F`
- `const SERIAL = 0x01`
- `const BRDCST = 0xFE`
- `const CMD_READ = 0x02`
- `const CO2_PPM = 0x03`
- `const CMD_STATUS = 0xB6`
- `const FLAG = 0xFF`

### Procedures

- `set_co2_elevation_m(word in meters)`
- `get_co2_serial_number(byte out str[8])`

### Functions

- `get_co2_elevation_m() return word`
- `get_co2_ppm() return word`
- `get_co2_status() return byte`

## API details

### Global variables/contants

- `var word co2_global`

      global CO2 value, keeps value when garbage reply

- `const CMD_UPDATE = 0x03`

  No documentation found

- `const ELEVATION = 0x0F`

  No documentation found

- `const SERIAL = 0x01`

  No documentation found

- `const BRDCST = 0xFE`

  No documentation found

- `const CMD_READ = 0x02`

  No documentation found

- `const CO2_PPM = 0x03`

  No documentation found

- `const CMD_STATUS = 0xB6`

  No documentation found

- `const FLAG = 0xFF`

  No documentation found

### Procedures

- `set_co2_elevation_m(word in meters)`

      should set elevation in meters above sea level, not implemented yet

- `get_co2_serial_number(byte out str[8])`

      returns 8 byte ASCII string, which should be the same
      as the number on the sticker

### Functions

- `get_co2_elevation_m() return word`

      returns programmed elevation above sea level in meters
      this elevation is uses to calculate CO2 concentration correctly

- `get_co2_ppm() return word`

      returns a word with CO2 concentration in ppm
      note: if sensor is busy measuring the CO2 values, it will give garbage reply
      reply is checked for garbage and if so, *PREVIOUS* ppm value is returned

- `get_co2_status() return byte`

      returns status byte. bit_0 = error, bit_1 = warmup,
      bit_2 = calibration, bit_3 = idle

## Related samples

Here are the list of samples which use this library:

16f876a | 16f876a_co2_t6603.jal
16f877a | 16f877a_co2_t6603.jal