--- In AVR-Chat@yahoogroups.com, dlc <dlc@...> wrote: > I got the file. The code looks stupid simple, how well does it work > and with what devices have you tried it? The code seems pretty obvious, > but the demo routines in there don't seem complete, for instance: > if (!I2CPut(atod_reg, 2)) > atod_reg is never set to anything, it will be two bytes of zeros. > > I'll give it a whirl, I've seen some code that uses the USI interface > to do I2C and it is about 10x more complex and isn't even interrupt > driven (based on Atmel app note). I'm not terribly impressed with the > USI interface... The code was written to talk to a TI ADS1110 <http://focus.ti.com/docs/prod/folders/print/ads1110.html> chip. I have run it successfully, though the full application is still under development (it got pushed aside for nearly a year when work decided that something else needed to be done first). Yes, it is simple. Once you have the low-level bit drivers written, the rest is just stringing them together appropriately. The USI could not be used for I2C, it was already in use talking SPI to the rest of the project. I'll update the source files with some more examples of talking to the ADS1110. Check for a new version of I2C.ZIP in the files section. Bill [Non-text portions of this message have been removed]
Message
Re: Tiny2313 USI code to make I2C master
2009-06-18 by internetwasteland
Attachments
- No local attachments were found for this message.