Basic stamp error accessing EEPROM B2P24 V1.2
Michael3079
Posts: 3
This is my first time using a Basic Stamp. I'm getting·an error·running an EEPROM diagnostic. It simply writes a pattern to the EEPROM and then attempts to read back the·same value. The test fails on the first read. It appears that I have a bad chip, but I don't want to make any assumptions.
' I2C.bsp
' This program demonstrates writing and reading every location in a 24LC16B
' EEPROM using the BS2p/BS2pe's I2C commands.· Connect the BS2p, BS2pe,· or ' BS2px to the 24LC16B DIP EEPROM as shown in the diagram in the I2CIN or
' I2COUT command description.
' {$STAMP BS2p}
' {$PBASIC 2.5}
#IF ($STAMP < BS2P) #THEN
· #ERROR "Program requires BS2p, BS2pe, or BS2px."
#ENDIF
Writing...
Addr: 1904-1919· Value: 119
Addr: 1920-1935· Value: 120
Addr: 1936-1951· Value: 121
Addr: 1952-1967· Value: 122
Addr: 1968-1983· Value: 123
Addr: 1984-1999· Value: 124
Addr: 2000-2015· Value: 125
Addr: 2016-2031· Value: 126
Addr: 2032-2047· Value: 127
Reading...
Error at location: 0000
Found: 255, Expected: 000
' I2C.bsp
' This program demonstrates writing and reading every location in a 24LC16B
' EEPROM using the BS2p/BS2pe's I2C commands.· Connect the BS2p, BS2pe,· or ' BS2px to the 24LC16B DIP EEPROM as shown in the diagram in the I2CIN or
' I2COUT command description.
' {$STAMP BS2p}
' {$PBASIC 2.5}
#IF ($STAMP < BS2P) #THEN
· #ERROR "Program requires BS2p, BS2pe, or BS2px."
#ENDIF
Writing...
Addr: 1904-1919· Value: 119
Addr: 1920-1935· Value: 120
Addr: 1936-1951· Value: 121
Addr: 1952-1967· Value: 122
Addr: 1968-1983· Value: 123
Addr: 1984-1999· Value: 124
Addr: 2000-2015· Value: 125
Addr: 2016-2031· Value: 126
Addr: 2032-2047· Value: 127
Reading...
Error at location: 0000
Found: 255, Expected: 000
Comments
Typically, a value of 255 indicates that the location was not programmed. Please show your circuit. There are all sorts of possible errors including connecting the Write Protect pin to Vcc instead of Vss.
__________________$WMc%_______________Merry Xmas
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering