Storing Samples in EEPROM

The diagram below shows each bank in EEPROM memory. The first ten bytes of EEPROM contain samples of the phase 3 voltage output, and the next six EEPROM bytes are unused. Although six EEPROM bytes per group are "wasted" by not writing to them, addressing the EEPROM space this way is easier to understand and handle programmatically.

The Phase 2, Phase1, and Rectified Output Samples, ten each, follow similarly. Each of the four sample groups within each bank is separated by sixteen bytes, or $10 in hexadecimal. Each bank is separated from one another by 64 bytes, or $40 in hexadecimal. Each time a new set of samples is taken, the data is written to a new bank. This spreads the writes to the EEPROM out over a larger area, thus conserving the writeable lifecycle of each EEPROM byte.

Figure 6-11: EEPROM Memory Allocation For Variables

All addresses are in hexadecimal. Shaded areas indicate sample storage, and unshaded areas are unused.

Solar Power Sensation V2

Solar Power Sensation V2

This is a product all about solar power. Within this product you will get 24 videos, 5 guides, reviews and much more. This product is great for affiliate marketers who is trying to market products all about alternative energy.

Get My Free Ebook


Post a comment