Mysil, thank you very for your attempt to provide assistance....
But I am not managing to unravel this...
For example, your memory test examples call routines like EEPROM_ReadOneByte which don't exist in the I2C Slave implementations provided by MCC (and I understand that is obvious), but I can't decide which routines in the drivers MCC provides for the MSSP Slave implementation.
should be used..
For example I was expecting a function to be available of the form "I2C_Initialise()", but there is not - I can find "I2C_driver_open()" and "i2c_slave_open()" but which do I use, and are these really replacements for an "Initialize" function?
It seems most examples are Master, and not Interrupt driven and are focussed on using EEProms, so they are just too far away from what I am trying to do.
I was expecting to provide a main that did something like this:-
void main(void)
{
SYSTEM_Initialize();
INTERRUPT_GlobalInterruptEnable();
INTERRUPT_PeripheralInterruptEnable();
char data;
data= 0;
i2c_initialise();
i2c_Slave_Address=0x5;
while(something); //wait for master to try to read me
i2c_WriteByte(data);
}
... but how do I declare and write the ISR (or is this provided somewhere)....
FYI I am attempting to use the "MSSP (Foundation Services Library by Microchip)".
Maybe I am just missing too much here, and should slope off and do something else with my time, but it would be good to get started :-(
Thanks again,
Malcolm