Shop OBEX P1 Docs P2 Docs Learn Events
24LC515 Interfacing with BS2sx — Parallax Forums

24LC515 Interfacing with BS2sx

J. H. RollinsJ. H. Rollins Posts: 9
edited 2004-08-19 15:25 in BASIC Stamp
Attn:

Jon Williams.

I am having a problem with the 24LC515 EEprom. The problem is that the SX reads the first 32K

but all· information is corrupted in the upper 32K.

I would appreciate any information you can give me. Is it possible the the SX Stamp will not work on

this EEprom with-out special math applied?...

Sincerely yours

J. H. Rollins.

8/17/04

Post Edited By Moderator (shane) : 8/17/2004 4:42:06 PM GMT

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-17 16:30
    I've not used the 24LC515, but after looking at the data sheet -- and NOT seeing your code -- I suspect the problem may be with your control byte (slave address).· According to the docs, Bit3 of the slave address controls which half of the EEPROM you're accessing.

    Since PBASIC gives bit level access, something you could do in your code is this:

    slaveID.Bit3 = eeAddr.Bit15
    

    This will set the block bit appropriately for the address byte you're wanting to access.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • J. H. RollinsJ. H. Rollins Posts: 9
    edited 2004-08-18 18:48
    Jon:

    Thanks for the information. I have another question on the subject.

    my EEprom Code is 10100010 This is the device code.

    The first four bits are the control code and the next three A0 A1 A2 are the address A2 is tied to VCC

    would this be part of bit three in this addressing. for the· Microchip 24LC515?...

    The EEprom is capable of using four EEprom's

    on the same bus. Are you saying perhaps that this code would be placed

    separately under constants or variables in the program?.

    I sincerely appreciate your help.

    J. H. Rollins.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-19 03:17
    I decided to update my core I2C code based on your needs, and so that my own programs could be more flexible.· Have a look at this thread:

    http://forums.parallax.com/showthread.php?p=466264

    For my new code, plus a demo for the 24LC515 that I think will work for you.· It lets you specify the device address (%00 - %11) as a variable, and takes care of putting the block select bit into the slave address.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • J. H. RollinsJ. H. Rollins Posts: 9
    edited 2004-08-19 14:17
    Jon:

    Thanks for the information on the 24LC515 EEprom. This is a very good example and I am sure that you put a lot of

    work in this code. I very much appreciate you help.

    Parallax has a great web-site this is much better than Yahoo. In closing I would like to say Parallax has a great application

    engineer. Again thank you for your time and talent.

    Sincerely yours

    J. H. Rollins
  • frasencifrasenci Posts: 34
    edited 2004-08-19 15:04
    and I want to adhere to all that ...

    congrats Jon , I always read your answers , the most as an spectator but it is always so intesting and well put.

    greetings

    Francisco
    Chile
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-19 15:25
    Thanks for your kind words, guys -- it is my pleasure to serve our customers.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
Sign In or Register to comment.