Shop OBEX P1 Docs P2 Docs Learn Events
EEprom in sx for saving data — Parallax Forums

EEprom in sx for saving data

KiwiKiwi Posts: 85
edited 2006-04-13 13:47 in General Discussion
I had once a 68hc11 for using at school and for keeping me busy. I found once a manual with code that is usefull for programming data into the 68hc11 eeprom.

Does it exist also for the sx28?

Kurt

Comments

  • ElectronegativityElectronegativity Posts: 311
    edited 2005-12-13 16:31
    Maybe I misunderstand what your trying to do, but you can definitely program the SX28's EEPROM by using the SX Key that Parallax sells for this purpose.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I wonder if this wire is hot...
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-12-13 16:40
    You cannot program the EEPROM on the SX during run time, only when programming it. To have that functionality, you have to add an external EEPROM. There are many examples on how to do this with external serial EEPROMs (I2C and SPI interfaces) on the forums and documents. Use http://search.parallax.com to find examples.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-12-13 16:50
    If you're using SX/B you'll find a small EEPROM example connected to I2CSEND and I2CRECV.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • John KauffmanJohn Kauffman Posts: 653
    edited 2006-04-12 16:00
    Does anyone have experience with using sample code from SX/B help file for commands I2CSEND and I2CRECV with EEPROMs of larger capacity, like 24LC256 or 24LC512 or 24LC1024?

    How about using larger capacity EEPROM with with the sample code 24LC128.bs2 supporting the Parallax EEPROM 24LC128 prouduct ( http://www.parallax.com/detail.asp?product_id=602-00013 )

    Thanks.
  • BeanBean Posts: 8,129
    edited 2006-04-12 17:19
    Here is the code I used for a AT24C512 (64KB)·EEPROM.

        ' Write origData to EEPROM address addr_LSB,addr_MSB
        I2CStart SDA
        I2CSend SDA, $A0
        I2CSend SDA, addr_MSB
        I2CSend SDA, addr_LSB
        I2CSend SDA, origData
        I2CStop SDA
        PAUSE 5
     
        ' Read byte back from EEPROM address addr_LSB, addr_MSB
        I2CStart SDA
        I2CSend SDA, $A0
        I2CSend SDA, addr_MSB
        I2CSend SDA, addr_LSB
        I2CStart SDA
        I2CSend SDA, $A1
        I2CRecv SDA, readBack, 1
        I2CStop SDA
    
    

    Of course this is not optimized (I2C command should be in seperate subroutines), but you gotta love SX/B...

    Bean.
    ·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module"·available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module"·available from Parallax for only·$49.95 http://www.parallax.com/detail.asp?product_id=30015
    Product web site: www.sxvm.com

    Available now! Cheap 4-digit LED display with driver IC·www.hc4led.com

    "I reject your reality, and substitute my own." Mythbusters
    ·
  • KiwiKiwi Posts: 85
    edited 2006-04-13 13:47
    for your info,

    see routines in the program for i2c in assembler, works ok for that project
Sign In or Register to comment.