Hi, I'm working on an open source wind data logger (see sourceforge "osdatalogger"), and I'm having a bit of trouble getting i2c bus communications working properly. It's the simplest configuration possible, a single master (a MSP430F2619) talking to a single slave (a Ramtron FM6124 event data recorder). Everything seemed to be working fine until I simulated a 100 mph wind on all six channels (60 Hz events on each channel). I'm getting sporadic NACKs. I'm running the i2c clock at 100 kHz. If I slow the clock down to 25 kHz things seem to work fine, as far as communications go, but I can't keep up with the events (the FM6124 fills up in a second).
The MSP430X2xx user's guide section on i2c is at best confusing. According to the diagram for master transmitter mode, you can't get the ACK from the slave address until you've stuffed a data byte into the transmit buffer. >From there on, it's not clear to me whether I'm getting the ACK/NACK for the byte I just wrote or the previous byte. I can't seem to find any examples of working code out there that's not a bit-banging approach, which I'm trying to resist because I want the i2c clock to go at its maximum of 100 kHz and I don't want to muck around with a 'scope and NOPs and all that. Does anyone have a working example using the interrupt flags provided by the i2c module, either using interrupts or polling the flags? Thanks, Todd **
