|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
i2c questionHi,
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 ** ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Mspgcc-users mailing list Mspgcc-users@... https://lists.sourceforge.net/lists/listinfo/mspgcc-users |
|
|
Re: i2c questionHi,
On Fri, 2 Oct 2009 12:53:16 -0400 Todd Allen <mspgcc@...> wrote: > 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). > until you receive an ACK when you are writing data to the device before you can write more data. It is a while ago since I last used an i2c device and I got the same issue. OTOH the Ramtron devices claim to be faster than ordinary 2416s, they are NVRAM's after all. You could try to setup the simulation in a way to verify the written data afterwards. BTW: just read about a typhoon somewhere in the pacific last night where wind speeds are up to 130 mph... > 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. > I2C is confusing compare to SPI. > 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 > ** > Regards, Hans ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Mspgcc-users mailing list Mspgcc-users@... https://lists.sourceforge.net/lists/listinfo/mspgcc-users |
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |