I2C Slave code for LPC1765

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

I2C Slave code for LPC1765

1,626 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bmentink on Wed Aug 18 17:43:24 MST 2010
Hi All,

Does anyone know of some "simple" I2C Slave code for this chip, or even the LPC17xx family.

The lpc1700cmsis examples have an I2C driver that does master and slave, but it is far too complicated and wasteful of code space for my needs.
Also, the Keil LPC17xx I2C example only is for master, but is simple.

All I want is two functions. First, a I2CInit() function which sets the peripheral up in slave mode etc, and second, an interrupt routine to handle slave mode.

Want I want to do is insert 3 call-back functions into the interrupt code that is called on:

a) Start/Restart condition received,
b) Rx byte received,
c) Tx byte sent


Many Thanks,
Bernie
0 项奖励
回复
4 回复数

1,209 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by renan on Thu Dec 16 06:34:32 MST 2010
Have you been successful on that?

Renan

Quote: bmentink
Hi woodchuck,

I am currently stripping down the lpc1700cmsis i2c code example down to a bare minimum interrupt and init function.

I will let you know if I get it going ... might be a little while, we havn't got hardware built just yet.:D

Cheers,
Bernie

0 项奖励
回复

1,209 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by woodchuck on Tue Aug 24 06:30:10 MST 2010
Great!  I'll be very interested in how it goes.
0 项奖励
回复

1,209 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bmentink on Mon Aug 23 21:20:06 MST 2010
Hi woodchuck,

I am currently stripping down the lpc1700cmsis i2c code example down to a bare minimum interrupt and init function.

I will let you know if I get it going ... might be a little while, we havn't got hardware built just yet.:D

Cheers,
Bernie
0 项奖励
回复

1,209 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by woodchuck on Mon Aug 23 07:55:31 MST 2010
If you could get the LPC1768 I2C slave code to work, you're ahead of me. It never worked for me, and no one from NXP or Code-Red seemed to want to touch it.

Couldn't agree more that simple but functional 17xx slave code would be a great thing. I've had more luck programming my own big-banging I2C slave than using the NXP hardware and software.
0 项奖励
回复