Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Help needed with I2C EEPROM


  • Please log in to reply
41 replies to this topic

#41 GDSever

GDSever

    Advanced Member

  • Members
  • PipPipPip
  • 81 posts
  • LocationNewark, DE

Posted 04 January 2011 - 03:52 PM

It bugs me too. I'll see if I can do something about that - I was just trying to get something functional, but it certainly could use some dressing up.

I rewrote the EEPROM classes as a single 24LC01 class that uses an extra variable in the constructor methods to specify the IC type (16B vs 256 vs 512, etc), which in turn sets the max address. All write and read methods now use a 2-byte integer address variable, as you suggested.

Somewhere over the past few weeks I had also integrated the FusionWare.SPOT.Hardware
I2CBus class... so that is a change from the code in the original post.

I'll need to do some testing to make sure the rewrites didn't break anything in the process - hopefully I'll get to that tonight or tomorrow. If you want the untested code, let me know.

#42 GDSever

GDSever

    Advanced Member

  • Members
  • PipPipPip
  • 81 posts
  • LocationNewark, DE

Posted 05 January 2011 - 12:38 PM

I'll need to do some testing to make sure the rewrites didn't break anything in the process - hopefully I'll get to that tonight or tomorrow. If you want the untested code, let me know.

Testing is complete and things work as expected... new source is available here:

http://forums.netdui...e-i2cbus-class/

Let me know if you had something different in mind with your suggested rewrites, osno...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.