I thought you had, but damned if I can find itNormanDunbar wrote: Mon Sep 08, 2025 7:30 am Exactly. I laid out the pseudo code for a scanner near the start of this thread
Adventures with I2C & Minerva Mk2
Re: Adventures with I2C & Minerva Mk2
Re: Adventures with I2C & Minerva Mk2
Ok, that's worked a treat thanks
Sorry for being so thick, Many thanks all
New code
Sample output
Sorry for being so thick, Many thanks all
New code
Code: Select all
100 WHEN ERRor
110 f=0
120 CONTINUE
130 END WHEN
140 PRINT "SCAN STARTING"
150 c$=CHR$(164) & CHR$(255)
160 FOR x = 0 TO 127
170 f=1
180 r$=I2C_IO(c$,0,x,0)
190 IF f=1 THEN PRINT "Device Found at " & HEX$(x,8) & " (" & HEX$(x*2,8) & ")"
200 NEXT x
210 PRINT "SCAN COMPLETE"
Re: Adventures with I2C & Minerva Mk2
The scanner has thrown up an issue with the AT24C256
It shows as both &54(&A8) AND &5C(&B8), confirmed as when unplugged both devices vanish
&54(&A8) works fine with both test programs
&5C(&B8) corrupts the end of the "page test" text
I thought maybe it was writing to Minerva, but on checking settings they hadn't been corrupted
Reading the data sheet I can't work out why this is happening
Any thoughts on how I could troubleshoot this please?
Many thanks
Tony
It shows as both &54(&A8) AND &5C(&B8), confirmed as when unplugged both devices vanish
&54(&A8) works fine with both test programs
&5C(&B8) corrupts the end of the "page test" text
I thought maybe it was writing to Minerva, but on checking settings they hadn't been corrupted
Reading the data sheet I can't work out why this is happening
Any thoughts on how I could troubleshoot this please?
Many thanks
Tony
- XorA
- Site Admin
- Posts: 1737
- Joined: Thu Jun 02, 2011 11:31 am
- Location: Shotts, North Lanarkshire, Scotland, UK
Re: Adventures with I2C & Minerva Mk2
No idea on your problem!
But not all i2c addresses are valid so you can speed up your loop by skipping the invalid ones!
https://www.i2c-bus.org/addressing/
But not all i2c addresses are valid so you can speed up your loop by skipping the invalid ones!
https://www.i2c-bus.org/addressing/
Re: Adventures with I2C & Minerva Mk2
Thanks for the link XorA, will have a read thru thanksXorA wrote: Mon Sep 08, 2025 10:46 am No idea on your problem!
But not all i2c addresses are valid so you can speed up your loop by skipping the invalid ones!
https://www.i2c-bus.org/addressing/
The current scan only takes about 1 second (on SGC)
Re: Adventures with I2C & Minerva Mk2
I bought a 5 pack of these and I just tried the other 4 and even using the correct address they don't work properlyt0nyt wrote: Mon Sep 08, 2025 10:25 am The scanner has thrown up an issue with the AT24C256
It shows as both &54(&A8) AND &5C(&B8), confirmed as when unplugged both devices vanish
&54(&A8) works fine with both test programs
&5C(&B8) corrupts the end of the "page test" text
I thought maybe it was writing to Minerva, but on checking settings they hadn't been corrupted
Reading the data sheet I can't work out why this is happening
Any thoughts on how I could troubleshoot this please?
Many thanks
Tony
The fact that 1 seems to work, on proper address, makes me think these are a cheap knock off
Will order another from somewhere more reputable to test
- XorA
- Site Admin
- Posts: 1737
- Joined: Thu Jun 02, 2011 11:31 am
- Location: Shotts, North Lanarkshire, Scotland, UK
Re: Adventures with I2C & Minerva Mk2
I think we should get you a "Member of the I2C Club" badge now 

Re: Adventures with I2C & Minerva Mk2
What have you got the 3 address lines tied to on these NVRAM's ? Don't leave them 'flapping' or unconnected. You need to set at least one of these pins to 5v logic 1, so that you avoid contention with the RTC chip, you may also need to avoid other chips that have clashing addresses.t0nyt wrote: Mon Sep 08, 2025 10:25 am The scanner has thrown up an issue with the AT24C256
It shows as both &54(&A8) AND &5C(&B8), confirmed as when unplugged both devices vanish
&54(&A8) works fine with both test programs
&5C(&B8) corrupts the end of the "page test" text
I thought maybe it was writing to Minerva, but on checking settings they hadn't been corrupted
Reading the data sheet I can't work out why this is happening
Any thoughts on how I could troubleshoot this please?
Many thanks
Tony
Re: Adventures with I2C & Minerva Mk2
A2 is tied to 5v and A0/A1 tied to ground (to avoid clash with Minerva NVRAM)Pr0f wrote: Mon Sep 08, 2025 12:37 pm What have you got the 3 address lines tied to on these NVRAM's ? Don't leave them 'flapping' or unconnected. You need to set at least one of these pins to 5v logic 1, so that you avoid contention with the RTC chip, you may also need to avoid other chips that have clashing addresses.
No other clashes (and it's the same with just this 1 device attached)
Thanks
Tony
Re: Adventures with I2C & Minerva Mk2
Have you got a picture of the chip to see what the label looks like?
You did mention the possibility of them being suspect...
You did mention the possibility of them being suspect...