Shop OBEX P1 Docs P2 Docs Learn Events
Basic stamp error accessing EEPROM B2P24 V1.2 — Parallax Forums

Basic stamp error accessing EEPROM B2P24 V1.2

Michael3079Michael3079 Posts: 3
edited 2008-12-17 18:58 in BASIC Stamp
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

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-14 19:25
    What program are you using? It helps if you give a link to the program or attach it to your message or at least say where to find it

    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%$WMc% Posts: 1,884
    edited 2008-12-14 20:39
    Try the 24LC32 EEPROM instead of the 24LC16B as the example shows.I think it will "Stack" right.

    __________________$WMc%_______________Merry Xmas

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Truth is out there
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-12-17 18:58
    Most memory test programs that I have seen test the data written immediately after the write cycle.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
Sign In or Register to comment.