Hi Guru's,
This may be a silly question, I have looked around and can't seem to find what I am hoping may be available. Is there something within the PICAXE system that can 'flag' that a I2C READ has occurred?
Providing CODE here would be a bit long winded and unnecessary, but the general basics of what I am doing is...
Via I2C, Master PICAXE sends command byte to Slave PICAXE.
Slave PICAXE then sends appropriate data via HSEROUT to a RF Transceiver.
Quite a bit occurs remotely where the Slave sent the data via RF and then serial data is returned to the Slave again via RF.
Slave PICAXE captures the returned serial data using background receive, processes the data, then makes an output HIGH (C.1) indicating to the Master PICAXE there is now fresh to data to be collected via I2C.
Master PICAXE now acquires the data from the Slave PICAXE using HI2CIN command.
ALL IS WELL, and everything works flawlessly. However, in order for me to now have the Slave PICAXE 'fresh data is available output pin (C.1)' go LOW after the Master has read the data, I have to send another command byte from the Master PICAXE to the Slave PICAXE via I2C to basically tell the Slave the data has been acquired and to make (C.1) LOW again until the next cycle.
I know there is a HI2CFLAG for when there is a data WRITE and I do very much use this.
However my question is, is there a way (Something like a HI2CREADFLAG) to determine that data has been READ via I2C from/at the Slave PICAXE?
Essentially I'd like to be able to READ the Slave data via I2C and have the Slave recognise this has occurred thus make (C.1) LOW on it's own accord.
Pretty sure I have been clear enough with my question, hoping to soon read some 'Guru Magic' answers.
Regards,
Mort.
This may be a silly question, I have looked around and can't seem to find what I am hoping may be available. Is there something within the PICAXE system that can 'flag' that a I2C READ has occurred?
Providing CODE here would be a bit long winded and unnecessary, but the general basics of what I am doing is...
Via I2C, Master PICAXE sends command byte to Slave PICAXE.
Slave PICAXE then sends appropriate data via HSEROUT to a RF Transceiver.
Quite a bit occurs remotely where the Slave sent the data via RF and then serial data is returned to the Slave again via RF.
Slave PICAXE captures the returned serial data using background receive, processes the data, then makes an output HIGH (C.1) indicating to the Master PICAXE there is now fresh to data to be collected via I2C.
Master PICAXE now acquires the data from the Slave PICAXE using HI2CIN command.
ALL IS WELL, and everything works flawlessly. However, in order for me to now have the Slave PICAXE 'fresh data is available output pin (C.1)' go LOW after the Master has read the data, I have to send another command byte from the Master PICAXE to the Slave PICAXE via I2C to basically tell the Slave the data has been acquired and to make (C.1) LOW again until the next cycle.
I know there is a HI2CFLAG for when there is a data WRITE and I do very much use this.
However my question is, is there a way (Something like a HI2CREADFLAG) to determine that data has been READ via I2C from/at the Slave PICAXE?
Essentially I'd like to be able to READ the Slave data via I2C and have the Slave recognise this has occurred thus make (C.1) LOW on it's own accord.
Pretty sure I have been clear enough with my question, hoping to soon read some 'Guru Magic' answers.
Regards,
Mort.