Shop OBEX P1 Docs P2 Docs Learn Events
i2c demo — Parallax Forums

i2c demo

dondedonde Posts: 51
edited 2009-12-09 00:27 in Propeller 1
Anyone know of a Basic_I2C_Driver_Demo.spin ?

Comments

  • mctriviamctrivia Posts: 3,772
    edited 2009-12-08 21:04
    My id object in obex will write data to the eeprom

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    24 bit LCD Breakout Board now in. $21.99 has backlight driver and touch sensitive decoder.
  • hover1hover1 Posts: 1,929
    edited 2009-12-08 21:20
    One called Basic I2C Driver in the Object Exchange.

    http://obex.parallax.com/objects/26/
    donde said...
    Anyone know of a Basic_I2C_Driver_Demo.spin ?
  • dondedonde Posts: 51
    edited 2009-12-08 21:49
    To mctrivia
    What is the full name of the ID object

    To hover1
    This I believe this is the original object by Michael Green. I have this one. What I need is a demo of the object.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-12-08 21:56
    There is a simple demo included in the comments at the beginning. What are you trying to do?
  • dondedonde Posts: 51
    edited 2009-12-08 22:03
    Used the driver a while ago and forgot a bit. Read data string from DAT & then write it back. How is @buffer used?
  • Mike GreenMike Green Posts: 23,101
    edited 2009-12-08 22:13
    ReadPage and WritePage will write blocks of data to EEPROM as long as it all fits in a "page" of EEPROM. Look at the comments for these methods in the source.
  • dondedonde Posts: 51
    edited 2009-12-08 22:18
    What's a "page"?
  • mctriviamctrivia Posts: 3,772
    edited 2009-12-08 23:04
    full name is ID

    obex.parallax.com/objects/410/

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    24 bit LCD Breakout Board now in. $21.99 has backlight driver and touch sensitive decoder.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-12-08 23:40
    Look at the datasheet for the EEPROM that you're using. Each manufacturer and each model of EEPROM has a buffer of some size. For 32K byte and up EEPROMs, the buffer is a power of two in size, usually either 64 bytes or 128 bytes. Some larger EEPROMs have a buffer of 256 bytes. A "page" is the buffer and starts on the addresss boundary for the page size. 64 byte pages start every 64 bytes. When you write multiple bytes, they're copied to the buffer, then the buffer is written to the EEPROM array. If you start near the end of the buffer and continue transferring bytes, they wrap-around to the beginning of the buffer and they'd be written where you don't expect them to go since the EEPROM won't write outside the EEPROM page without starting a new write cycle.
  • dondedonde Posts: 51
    edited 2009-12-09 00:27
    Thanks Mike, that explanation helps. I'll do some more studying on my side.
Sign In or Register to comment.