I have a possible commercial product in where I will be monitoring some sensors on an I2C bus, and some other items on digital I/O which I will be sending back to a host PC app over RS232.
I was going to use my trusty MEGA324 and Peter Fleurys code and move on with my life, but I elected to up my game and go with n XMEGA for this one. Pretty steep learning curve here(more like a cliff really), but before I run home to mommy, I am still going to give it a go.
I am going to try my luck with a PCF8574 I/O expander to learn the TWI interface on the X32e5. I created a new START project and all it has is the driver for the TWI in it. I picked what pins I wanted for my SCL and SDA lines and the bus speed >>100k<<, Chose Interrupt mode as I am not sure if it should be interrupt or polled mode, gave it a name and hit GENERATE.
I know from other experiments that a LOT of files would be generated, but what has me a little confused are two files:
And their respective .c files as well.
What I am getting a headache over is WHY two sets of files, where each seems to do what the other one does, and it looks like they interact with each other as well. Which set of functions do I use? I have to admit the doxygen files are not very helpful.
In the meantime, I shall see if I can get an LED to turn on and off with some more reading and guesswork.
Atmel START project attached
EDIT: Uploaded correct Atmel Start Project