Interrupt driven Two Wire Interface

kkempeneers's picture
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0



This is a compact interrupt driven two wire interface, as my other projects not so much a library function but an example on how to use interrupt driven I2C. The function main calls the interface driver to set up a DS1631 stand alone I2C thermometer / thermostat, in the endless loop it reads the temperature and outputs the high byte on portb. The software is written for a ATMega8 but the code can be easely adapted for any AVR with a two wire interface