EEPROM (how works question)
Moderator: Benj
-
- Posts: 438
- Joined: Mon Aug 29, 2011 12:26 am
- Location: arizona
- Has thanked: 175 times
- Been thanked: 173 times
- Contact:
EEPROM (how works question)
question on how eeprom works with a **16f1938** ... when writing to eeprom i simply write to addresses 0-255 is that right? but i can only write 8 bit numbers to a location? if thats true why does it ask for a "uint" variable? .... what im trying to do is i have { 18 =8 bit items..16 = 16bit items and 16 = 32bit items... to clearify this would take up 114 locations of eeprom is that correct?
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: EEPROM (how works question)
Correct.brandonb wrote:question on how eeprom works with a **16f1938** ... when writing to eeprom i simply write to addresses 0-255 is that right?
Only 8 bit wide for 8 bit PIC devices like the one you are using. The uint is because the macro tries to be compatible with devices where the eeprom is 16 bit wide.brandonb wrote:but i can only write 8 bit numbers to a location? if thats true why does it ask for a "uint" variable? ....
Correct.brandonb wrote: what im trying to do is i have { 18 =8 bit items..16 = 16bit items and 16 = 32bit items... to clearify this would take up 114 locations of eeprom is that correct?
18 * 1 + 16 * 2 + 16 * 4 = 114
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 438
- Joined: Mon Aug 29, 2011 12:26 am
- Location: arizona
- Has thanked: 175 times
- Been thanked: 173 times
- Contact:
Re: EEPROM (how works question)
kersing, thanks man!!... i did a calculator below to help convert 32bit to 4 of the 8 bit registers, also thanks david for showing the calcs http://www.matrixmultimedia.com/resourc ... hnique.pdf
- Attachments
-
- 32 bit to 4 table lut values calculator.fcf
- (16.1 KiB) Downloaded 260 times