co2_t6613_i2c

co2_t6613_i2c, read values from GE/Telaire T6613 CO2 sensor.

Author Eur van Andel, eur@fiwihex.nl Copyright © 2013
Adapted-by
Compiler =2.4o

Description

This library communicates with the T6613 GE/Telaire CO2 sensor, 
via I2C. The protocol doc isn't on the web: email eur@fiwihex.nl to get it.
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


-------
declare in your main program, before including this library:
const word _i2c_bus_speed = 1 -- * 100kHz
const bit _i2c_level = true   
include i2c_hardware                         -- there is software i2c too
i2c_initialize()
var bit tx_ok                                        -- check if all transmissions went OK


---------


Notes

sensor pinout, top view: (gold box visible)
A B C 2 4 6 8 10 12
      1 3 5 7  9 11
where:
A    TX (UART)
B    RX (UART)
C    V+ (5V DC)
1 +5V
2    GND
3    GND
4    AV OUT (0..4V DC)
5    SCL (I2C)
6    NC
7    SDA (I2C)       
8    NC
9    NC
10   TX (UART)
11   RX (UART)
12   GND
for this library, you need only connect pins 1, 3, 5 & 7


--------------
Memory map:
T66xx memory map                                                     
     addr    Description     lt      wgt  RW/RO      write            read description        write description
     0x00    Elevation       2       msb     RW      W: 0 xx xx                              xx xx elevation in hex
     0x01                            lsb                             
     0x02    Span PPM        2       msb     RW      W: 2 xx xx                              xx xx span in hex T6615 only
     0x03                            lb                             
     0x04    sngl p trgt     2       msb     RW      W: 4 xx xx                               xx xx single point in hex
     0x05                            lsb                             
     0x06    zero cal cmd    1               RW      W: 6 0F         00: flags set   
     0x07    span cal cmd    1               RW      W: 7 0F         00: flags set           T6615 only
     0x08    sngl pnt cal cmd 1              RW      W: 8 0F         00: flags set   
     0x09    ABC logic enable 1              RW      W: 9 0x         01:ABC on, 02:ABC off 01:on, 02:off, 03:reset and on
     0x0A    Sensor idle cmd 1               RW      W: A 0x         00 after cmd            01:idle on, 02:idle off
     0x0B    Reset cmd       1               RW      W: B 0F         00 after cmd    
     0x0C    span2 cal cmd   1               RW      W: C 0F         00: flags set           T6615 only
     0x0D    span2 ppm       2               RW      W: D xx xx      


Dependencies

No dependency found



Summary

Global variables/contants

Procedures

Functions


API details

Global variables/contants

Procedures

Functions


Related samples

Here are the list of samples which use this library:

18f67k2218f67k22_co2_i2c.jal