EEPROM (how works question)

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
brandonb
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)

Post by brandonb »

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?

kersing
Valued Contributor
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)

Post by kersing »

brandonb wrote:question on how eeprom works with a **16f1938** ... when writing to eeprom i simply write to addresses 0-255 is that right?
Correct.
brandonb wrote:but i can only write 8 bit numbers to a location? if thats true why does it ask for a "uint" variable? ....
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: 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?
Correct.
18 * 1 + 16 * 2 + 16 * 4 = 114 ;-)
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

brandonb
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)

Post by brandonb »

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

Post Reply