When using the i2C slave macro I am unsure if the following occurs
When the pic is set to an address and that address is sent via the master device does the pic respond with an ACK after it has received the address?
Thanks
Flowcode8 i2c slave functionality
Moderator: Benj
-
- Posts: 18
- Joined: Thu Dec 20, 2012 12:31 pm
- Has thanked: 2 times
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: Flowcode8 i2c slave functionality
Hi
You need to read the Slave Status (e.g. in Main loop)
If it indicates that an address has been received then call Slave_RxByte with Last set to 0 to Ack it.
I've attached (a rather old) example.
Hope that helps
Leigh
You need to read the Slave Status (e.g. in Main loop)
If it indicates that an address has been received then call Slave_RxByte with Last set to 0 to Ack it.
I've attached (a rather old) example.
Hope that helps
Leigh
- Attachments
-
- I2C Slave LEDs.fcfx
- (6.7 KiB) Downloaded 201 times