Posted: 07:49pm 12 Sep 2025 Copy link to clipboard
DigitalDreams Newbie
PicoMite 6.0003 non-wifi Pico2.
I have an RTC working perfectly on i2c2 for a few months and decided to daisychain another device. Not working. 'I2C2 check' acting strange too. The RTC continues without issue though. Yet...
I2C2 check &h68 Print MM.I2C
The working I2C2 RTC returns 2 ??, should be 0 or 1 according to the manual.
The new device (FRAM)...
I2C2 check &ha0 Print MM.I2C
This generates 'Error : Invalid I2C address'
If I preceed with 'On error skip" it returns 0 yet should be 1 according to the latest manual !?
Without 'On error skip' it seems I can write say 20 random bytes to the FRAM yet reading back the 20 produces zero's and NO I2C2 ADDRESS ERRORS ??
Stumped, will continuity check SDA, SCL and power lines from my pico via RTC to the fram board tomorrow in daylight. Will also check the address should be A0 for the third time...
Posted: 08:08pm 12 Sep 2025 Copy link to clipboard
Volhout Guru
I2C address is 7 bits, Try &h50 Also Watch out, Some rtc modules have repro’s on the pcb, that could use &h50 as well
Volhout
Posted: 08:42pm 12 Sep 2025 Copy link to clipboard
DigitalDreams Newbie
Yes it's &h50 !. Think I was getting confused by the datasheet for the chip, implying 8 bits and consecutive addresses for read and write.
Repro's ?
To add confusion, repeatedly running my two 'I2C2 check's gives mostly 2 and 0 as responses to my trusty RTC and now FRAM but occasionally 2 and 2 are produced !?!?.
Now for the grand finale.... I wrote 20 random numbers into the first 20 addresses starting at 0, then read the 20 back. It seemed to work at first till I repeated the program and looked closely. Certain addresses are occasionally messing up the data ???. Say writing 110 to address '3' comes back as 9 yet all the others are correct ?. On another occasion it's address '0' than corrupts. Yes addresses 0 and 3 intermittently corrupt. A bad chip ?, what about the I2C2 check giving a mix of 0 and 2 ?. Edited 2025-09-13 06:44 by DigitalDreams
Posted: 08:51pm 12 Sep 2025 Copy link to clipboard
DigitalDreams Newbie
UPDATE....Even stranger.
Removed the two 'I2C2 check's at the start of my program and THE DATA READS BACK PERFECTLY EVERY TIME. Different random numbers written on every pass.
'I2C2 check' is broken ?
Posted: 09:59pm 12 Sep 2025 Copy link to clipboard
phil99 Guru
My guess is Volhout is referring to the solder pads that set the I2C address of the 24C32 chip on many RTC modules. Can be &H50 to &H57 . Edited 2025-09-13 08:14 by phil99
Posted: 11:05pm 12 Sep 2025 Copy link to clipboard
lizby Guru
My guess is EEProms, which many have.
Posted: 06:42am 13 Sep 2025 Copy link to clipboard
Volhout Guru
Just ideas
Some I2C devices accept only 100kHz (slow) I2C Do you add pullups ? Fram is fast, but eeproms require time to write the data, I.e. 5ms