I2C lpcopen

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I2C lpcopen

611 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ilyas1605 on Tue Apr 29 03:30:03 MST 2014
Hi,

I am using the lpc1769 board witch is connected to the base board. I want to read out some datas from a device using I2C due to this i connected the device to the base board. I use the lpcopen I2C example for the lpc1769 board. The program debugs well and the main menu is displayed, but when i want to read or write datas to my device, i don't get any response. Actually i tip in the adresse of the device and the register number, and then nothing happens. For Information i have connected the device to the pins PI004 and PI005 (SCL and SDA connection) on the base board. Is this right or lies the failure in the software?
I hope someone can help me.

best regards
Ilyas
Labels (1)
0 Kudos
2 Replies

579 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ilyas1605 on Wed Apr 30 06:50:20 MST 2014
Hi,

thank you for your response. I checked everthing like the pull up resistors and the baud rate. Seems good so far. And while debugging i don't receive a NAK. The only thing i  haved recognised while debugging step by step is, that the main program stops by selecting choice 6 (read and write to the slave) at this position in the program "iic->mEvent(id, I2C_EVENT_WAIT);" .
Hope anyone has an idea.

thanks and best regards
Ilyas
0 Kudos

579 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rgledhill on Tue Apr 29 10:43:22 MST 2014
Make sure there are pull-ups on the SCL and SDA lines - there may be some on the LPC1769 board already, I'm not sure, but check as they will be required.  Then check your I2C Baud rate; some devices talk at 400kHz, some at only 100kHz.  I'd look at the trace lines on an oscilloscope and check the waveforms look clean (straight edges everywhere).  When debugging the software, check to see if it receives a NAK, which would mean that the remote device is ignoring the data.

Hope this helps as a start!
Richard
0 Kudos