Shop OBEX P1 Docs P2 Docs Learn Events
External EEPROM — Parallax Forums

External EEPROM

ineedlcdhelpineedlcdhelp Posts: 19
edited 2008-12-19 21:51 in BASIC Stamp
I bought an external 32KB eeprom to store some text on. I connected everything up to my BS2 using the circuit that I found on the propeller documentation (with the required resistors). I found some sample code somewhere, and ran it. For some reason, the data ended up being stored on the internal EEPROM (according to the memory map) instead of the external one. I am incredibly confused as to how this occurred.

Comments

  • FranklinFranklin Posts: 4,747
    edited 2008-12-18 03:34
    Well a drawing of your circuit and the actual code you used might help. Otherwise I'd say you used the wrong commands to do the job.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • ineedlcdhelpineedlcdhelp Posts: 19
    edited 2008-12-19 00:13
    This is the circuit. It's the circuit on the data sheet for the propeller, except I have it connected to a BS2. What code should I be using to do this?
    447 x 275 - 12K
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-12-19 01:49
    You can't write to an external eeprom with READ/WRITE, that's why it winds up on your "internal" eeprom.· You need to a program (subroutines) that can peck it out.· You can read about how to work with I2C devices in three Nuts&Volts articles (available in the Downloads section at the Parallax website): #s 75, 85, 115.
    Jon Williams wrote these programs, one of which I modified for a 24C04 (attached.)
  • ineedlcdhelpineedlcdhelp Posts: 19
    edited 2008-12-19 02:21
    What does your program do? What is the output supposed to be? It just says "24LC04 Demo" but not anything else.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-12-19 02:43
    It writes a 44 to address 14 and a 55 to address 15 and then it reads it back twice.· Different from your set up (circuit.jpg), but documented in the program, it uses pin0 for SDA and pin1 for SCL.
  • ineedlcdhelpineedlcdhelp Posts: 19
    edited 2008-12-19 21:01
    Yes, I did connect the pins to pin0 and pin1 when I said that. Still, the program outputs nothing from the main subroutine.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-19 21:51
    Read the Nuts and Volts Columns that PJ Allen mentioned and look at their examples, then come back with any questions you have about the articles. If you want to hook up the EEPROM differently from what's shown in the articles, you'll need to post a schematic of what you have and a listing of your modified program.
Sign In or Register to comment.