Dear Members,
Where can I find from software development kit the example for writing and reading from I2C EEPROM ?
Thanks
Dear Members,
Where can I find from software development kit the example for writing and reading from I2C EEPROM ?
Thanks
An I2C EEPROM neither knows nor cares what microcontroller you use; all it sees is the transactions on the I2C bus - Start Conditions, Addressing, Stop Conditions; ACK/NAK, etc.
The Nordic SDK examples show you how to use the I2C (aka "TWI") hardware in the nRF52 - ie how to address a Slave, Read, and Write.
So you use the basic functions, together with the datasheet of your EEPROM, to generate the I2C transactions that the EEPROM requires.
For examples, see:
There are 4 TWI examples
which one is the closest application with I2C EEPROM ?
This one
nRF5_SDK_17.0.2_d674dde\examples\peripheral\twi_master_with_twis_slave\pca10056\blank\arm5_no_packs ?
thanks
still can not see 24C16 address on TWI scanner, is my supply to low ? I checked, VCC=2.4V ?
Have you used an oscilloscope or analyser to see what's happening on the wires?
Ok, I'll see with analyzer and posted, thanks
I reckon, I have insufficient power for this 24C16 PU27, I will try with external 3.3V, I keep posted, thanks
from this code,
err_code = eeprom_write(addr, &clear_val, 1);
if (NRF_SUCCESS != err_code)
{
NRF_LOG_INFO("communication error 24C16.\r\n");
return;
}
how can I print out err_code ?
NRF_LOG_INFO("%u",err_code); ?
from this code,
err_code = eeprom_write(addr, &clear_val, 1);
if (NRF_SUCCESS != err_code)
{
NRF_LOG_INFO("communication error 24C16.\r\n");
return;
}
how can I print out err_code ?
NRF_LOG_INFO("%u",err_code); ?