Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:56 17 Sep 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : I2C2 check ?

Author Message
DigitalDreams
Newbie

Joined: 03/05/2025
Location: United Kingdom
Posts: 34
Posted: 07:49pm 12 Sep 2025
Copy link to clipboard 
Print this post

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...
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5256
Posted: 08:08pm 12 Sep 2025
Copy link to clipboard 
Print this post

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
PicomiteVGA PETSCII ROBOTS
 
DigitalDreams
Newbie

Joined: 03/05/2025
Location: United Kingdom
Posts: 34
Posted: 08:42pm 12 Sep 2025
Copy link to clipboard 
Print this post

  Volhout said  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


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
 
DigitalDreams
Newbie

Joined: 03/05/2025
Location: United Kingdom
Posts: 34
Posted: 08:51pm 12 Sep 2025
Copy link to clipboard 
Print this post

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 ?
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2712
Posted: 09:59pm 12 Sep 2025
Copy link to clipboard 
Print this post

  Quote  Repro's ?
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
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3412
Posted: 11:05pm 12 Sep 2025
Copy link to clipboard 
Print this post

  phil99 said  
  Quote  Repro's ?
My guess is  ...


My guess is EEProms, which many have.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5256
Posted: 06:42am 13 Sep 2025
Copy link to clipboard 
Print this post

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

Volhout
Edited 2025-09-13 16:44 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025