LPC1769 I2C Slave not working correctly

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

LPC1769 I2C Slave not working correctly

1,052 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by deeearth on Thu May 30 03:48:40 MST 2013
hi all,

Ive been trying to use the LPCxpressco  as a slave device, so that i can sent an a couple of bytes to the board to say what pin/port i want to toggle, and light up some leds.

In my main program would just run forever when an i2c event happens an interupt is called, main will check when the slave state is has sent the nack then turn on the led.

attached is the program as i currently have it, could someone please help, ive just taken the example from the NXP i2c slave changed the address, and commented out any slave transation that i shouldnt need as per fig 95 on the UM10360 user manual.

What i can see with the i2c logger is the slave acking the i2c but when i only sent 3 bytes of slave address, pin then port an ack gets sent each time i dont understand why the i2c stat isnt read as 0x88 to nack the last byte.

if anyone has any ideas or better yet working i2c slave code would be great!

thanks

Dee
0 Kudos
Reply
2 Replies

999 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ByronShaw on Tue Jul 09 22:44:46 MST 2013

Quote: deeearth
[U][COLOR=black]hi all,

Ive been trying to use the LPCxpressco  as a slave device, so that i can sent an a couple of bytes to the board to say what pin/port i want to toggle, and light up some[/COLOR] [COLOR=Black]led lighting[/COLOR][COLOR=black].

In my main program would just run forever when an i2c event happens an interupt is called, main will check when the slave state is has sent the nack then turn on the led.

attached is the program as i currently have it, could someone please help, ive just taken the example from the NXP i2c slave changed the address, and commented out any slave transation that i shouldnt need as per fig 95 on the UM10360 user manual.

What i can see with the i2c logger is the slave acking the i2c but when i only sent 3 bytes of slave address, pin then port an ack gets sent each time i dont understand why the i2c stat isnt read as 0x88 to nack the last byte.

if anyone has any ideas or better yet working i2c slave code would be great!

thanks

Dee[/COLOR][/U]



I am not having good ideas of working it in slave mode but your information is helping me a lot..I will try your way to work it in slave mode
0 Kudos
Reply

999 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by atomicdog on Thu May 30 16:02:36 MST 2013
This code works with the 1769 also, you just have to change the header from 1114 to 1769.
0 Kudos
Reply