Shop OBEX P1 Docs P2 Docs Learn Events
How to write to upper 32K of a AT24C512 eeprom?? - Page 2 — Parallax Forums

How to write to upper 32K of a AT24C512 eeprom??

2»

Comments

  • radialrandyradialrandy Posts: 78
    edited 2012-01-08 10:59
    Mike Green wrote: »
    You could also try calling I2C.Initialize( I2C#BootPin ) after calling VarBackup or VarRestore and before calling one of the other I2C routines. This will reinitialize the I/O pins and the EEPROM to a known state.
    I tried that but once varbackup or varrestore is used the i2c routines stop working. Both routines never run at the same time. the i2c routines do not affect varbackup or varrestore. i2c is the only thing affected. some how varbackup and varrestore are setting something that disables i2c routines
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-01-08 11:38
    From Post #13
    Duane Degn wrote: »
    If you're using other I2C drivers in the the same project you'll want to set all the pins used to inputs and set them to their "low" state so other cogs can use the pins. (I had this problem once when using a different driver to read a real time clock.)

    I've added an "I2cEnd" method to some of my projects.
    PUB I2cEnd
      ' Restore pins to original state so other cogs can use them.
      outa[SCL]~                                    
      dira[SCL]~
      outa[SDA]~                                   
      dira[SDA]~                                     
     
    

    I've found a lot of I2C drivers don't release the lines (hence my earlier warning).
  • radialrandyradialrandy Posts: 78
    edited 2012-01-08 12:23
    Duane Degn wrote: »
    From Post #13


    I've added an "I2cEnd" method to some of my projects.
    PUB I2cEnd
      ' Restore pins to original state so other cogs can use them.
      outa[SCL]~                                    
      dira[SCL]~
      outa[SDA]~                                   
      dira[SDA]~                                     
     
    

    I've found a lot of I2C drivers don't release the lines (hence my earlier warning).

    That worked like a champ!!!! Thank all of you for your help. I'm back on track now :-) My program seems to be working great and I get to keep both eeprom programs.
Sign In or Register to comment.