/ch554_i2c

CH554 i2c project for SDCC

Primary LanguageCMIT LicenseMIT

CH554 i2c project for SDCC

This is Bit-bang i2c library and a example using some i2c devices. Some codes comes from "CH554 software development kit for SDCC'.

Build a example

$ cd projects/bmp180
$ make
$ make pyflash

It uses these i2c devices.

  • BMP180 barometric pressure sensor
  • ST7032i LCD driver

Default i2c pins (SCLK and SDAT) are P3_3 and P3_4. These GPIO ports can be defined by the symbol I2C_SCLK and I2C_SDAT. You'd initialize the ports to "open-drain output" and "pull-up", or prepare and external pull-up.

References