I'm using avr studio with avr gcc on an Atmega128 and I'm looking for an example TWI/I2C program with uart0 output. Just something to get me reading an i2c chip over the com port.
Anyone know of a good one?
look for the i2c sniffer in the projects section. I think that may show what you need.
Writing code is like having sex.... make one little mistake, and you're supporting it for life.
Kinda, I'm working with a data acquisition chip. I need a twi write routine too. Thanks for the tip. I'm still digging through examples. This I2c/Twi is new to me.
Make sure you first get a good idea of what I2C is, for example by studying the PCF8574 chip before going to more complex chips. I'm working on a TWI library which is (IMHO) easy to use, giving commands by strings e.g. "s40F0p" and getting answers with "s41?p". It will probably be completed in a week and than I will put in in the projects.
well I'm working with a semtech sx8724. Right now I just want to read and write commands/settings to the data registers via uart. I'm trying to get a good understanding of limitations, how I'm going to get 2000 samples a sec back to the host computer... stuff like that. It just been a long time since I've had to code C. So I'm guessing a good example will get me back on track. Let me know when you finish that library I wold like to peruse it.
© 2020 Microchip Technology Inc.