Friday, September 12, 2008

ATMega168, i2c/twi

I changed by AVR circuit to use an atmega168 rather than the attiny2313. The primary reason is that I'm trying to use the i2c code from the Procyon AVRLib in order to talk to a DS1307 real time clock, and avr-libc doesn't seem to have the required register definitions for the attiny2313. I don't know why - the attiny2313 is supposed to support hardware TWI (really i2c).

Here's a snapshot of the new circuit, taken again with the world's worst digital camera:

My program successfully loads and runs on the atmega168. Next step: actually try to talk to the DS1307.

No comments: