PDA

View Full Version : i2c demo



donde
12-09-2009, 04:54 AM
Anyone know of a Basic_I2C_Driver_Demo.spin ?

mctrivia
12-09-2009, 05:04 AM
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. (http://forums.parallax.com/showthread.php?p=848975)

hover1
12-09-2009, 05:20 AM
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 ?

donde
12-09-2009, 05:49 AM
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 Green
12-09-2009, 05:56 AM
There is a simple demo included in the comments at the beginning. What are you trying to do?

donde
12-09-2009, 06:03 AM
Used the driver a while ago and forgot a bit. Read data string from DAT & then write it back. How is @buffer used?

Mike Green
12-09-2009, 06:13 AM
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.

donde
12-09-2009, 06:18 AM
What's a "page"?

mctrivia
12-09-2009, 07:04 AM
full name is ID

obex.parallax.com/objects/410/ (http://obex.parallax.com/objects/410/)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
24 bit LCD Breakout Board now in. $21.99 has backlight driver and touch sensitive decoder. (http://forums.parallax.com/showthread.php?p=848975)

Mike Green
12-09-2009, 07:40 AM
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.

donde
12-09-2009, 08:27 AM
Thanks Mike, that explanation helps. I'll do some more studying on my side.