Storing Data to EEPROMS
Tinker
Posts: 12
Hapy New Year! I have a few questions about using I2C to store data to EEPROM. First, I'm having difficulty with the 2nd arguement of I2Cout, the SlaveID. Some examples I've seen set this 1-byte parameter as $A0 (chip address 000) and other examples change the chip address according to which block of data is being stored. In the case of the 24LC32A, for example, a block is 8K bytes. I thought that these chips had only one address. What gives here?
The other question regards what I would like to store in these EEPROMs. I want to take the 12-bit data fron an A/D, add one nib of sequence data, and store this word to the EEPROM. The problem seems to be that the EEPROM is geared to coded binary. For example, to store a word of binary takes only two bights. The designers of the EEPROMs would have us encode the same data into 5 ASCII bytes. I noted that the new version of PBasic allows Read/Write to work with Words. Is there a work-around for the I2Cout and I2Cin to allow the storage of data in Word format? If there is an app note re: this problem would appreciate where I can find it..Tnx......Tinker
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
.
The other question regards what I would like to store in these EEPROMs. I want to take the 12-bit data fron an A/D, add one nib of sequence data, and store this word to the EEPROM. The problem seems to be that the EEPROM is geared to coded binary. For example, to store a word of binary takes only two bights. The designers of the EEPROMs would have us encode the same data into 5 ASCII bytes. I noted that the new version of PBasic allows Read/Write to work with Words. Is there a work-around for the I2Cout and I2Cin to allow the storage of data in Word format? If there is an app note re: this problem would appreciate where I can find it..Tnx......Tinker
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
.
I2COUT SDA, slvAdrr, eeAddr, [noparse][[/noparse]value.LOWBYTE, value.HIGHBYTE]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA