We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi Everyone,
I've been facing difficulty in writing code in call back functions of i2c.
I mean I am totally blank.
Please help me.
I am trying to communicate in between LPC936.
I have programmed one as Master and the other as slave.
Thanks in Advance! Kaustubh
If data is transmitted by master and received by slave and slave responds to masters' call, where is I2DAT value actually transferred from and where is it received?
The only 'response' a receiving slave has is ACK or NAK.
as said before you need to read up on the I²C protocol.
Erik
I might have been a bit fuzzy
The only 'response' a receiving slave has to a master transmit is ACK or NAK.
Thanks Eric for your help! But I am gonna need more of it.
I have configured one Micro-controller as slave with address 0x01(I2ADR=address<<1. Therefore I2ADR = 0x02).
Now Master (another Micro-controller) calls slave i2c_receive(0x01). But unfortunately Master enters status, slave address + read transmitted, NACK received.
Now I2DAT in master is 0x03 i.e 0000 001 for address and LSB = 1 for read.
Please help me!
Where possibly did I go wrong?
Thanks in advance!
Kaustubh
I am sorry previously i hadn't mentioned Micro-controller used.
I am using P89LPC936.
And the problem i had discussed was seen on hardware.
Thanks!