LPC2148 I2C and Winarm / need a working example program

I’m working off the example interrupt style I2C program in the winARM pack. I’ve been trying to get my LPC2148 to talk to a Semtech sx8724 data acquisition chip. I’ve run into an issue that the SDA line posts only 8 1’s an then a 0. I’ve tried turning my clock way down. Poked around with an o-scope, plotted the scl vs sda.

equipment I am using:

Embedded artists quickstart usb board with an LPC 2148. Has a wired eeprom to the i2c bus 3k pull up resistors on the sda/scl lines. I also have the prototype/expansion board for the unit.

Have a dmm and a fluke 196c o-scope (100MHz) good enough for a 400 kHz scl.

Software: I have winarm and eclipse/yagarto. I really only know how to write linker files for winarm. It has done me well so far. GNU make 3.80, gcc 3.1.1 (comes in the winARM bundle works with yagarto).

I have a feeling that the problem is I’m not getting my data to the bus but the interrupt routine is starting everything, just not shifting any data into the I2DAT register. I was wondering if anyone could point me to a I2C program that compiles in Winarm.

The DAQ is connected to a wheatstone bridge style sensor.

The final goal of this project is to be able to:

recieve configuration settings via uart0

program an I2C daq chip,

read the i2c daq chip,

configure analog mux array using gpio (switches inputs to the DAQ)

Calculate snr/noise floor

output data via uart0 (bridge voltages 1-4, snr, noise floor, offset…)

todo

recieving configuration values

collect/convert data

config values algorythm in host computer

realtime plot in host computer

walk in graduation ceremony in t- 1.25 hours

Regards

You should find some code in the LPC2000 Yahoo group Files section.

Leon

All of the SFE products that use the LPC2148 have code, you could use that for a base.

I actually moved to that forum to this one. I’m trying to find an example that does not use RTOS(jcwren) or have any stlib functions(embedded artists) in it. Just pure i2c. I am using the rprintf function to get data/error messages out of the device.

I suppose my main issue is that I moved from the 8051 with a plethora of development tools to an arm to learn something new and its been… a lot.

I’ve spent so much time on this project that I don’t want to switch back now.

I’m just trying to learn the basic functionality of I2C and this arm. I don’t know that I need RTOS.

There are several examples there, including some that don’t use an RTOS. I don’t see a problem with the ones that do, anyway; simply use the basic I2C routines and chuck the rest away.

Leon

I suppose my main issue is that I moved from the 8051 with a plethora of development tools to an arm to learn something new and its been… a lot.

I’ve spent so much time on this project that I don’t want to switch back now.

Amen to that - for me it’s the issue of having such high quality tools provided for free with Pic16, Pic18, Dspic30, Dspic33, and now Pic32 that I keep having trouble justifying the pain of getting tools for ARM processors to behave.

Granted, I conceptually like the idea of a free open source software environment so it’s not a commercial issue to sell the code I develop, but it hasn’t been a hurdle for my lab so far.

The world needs a standardized, working, open source (is this a contradiction?) platform for arm development.

… nothing behaves on a laptop with vista 64 on it…

so many issues

I have learned that my main problem with the I2C sequence is that the interupts weren’t enabled globally. I have been playing around with a program with bits and pieces of a app note from keil. I get the interrupts to work, and it “looks” like it debugs fine through uvision 3 but when I flash the chip it dies when it reaches the isr. I also do not get the SCL signal… though when I was using winarm the scl worked and it sent a repeated start signal it just doesn’t move through the isr at all. I even tried polling the i2c0stat register for 0x08 (i2c start transmitted) to no avail. I could seriously use some help with this. I took this entire week off work to make some headway on my project and I’ve been finking with this i2c problem for the past 3 weeks