gnupic@linuxhacker.org
gnupic@linuxhacker.org
> I think there are two different ways to look at the EEPROM. One is from
> the .hex file perspective, or the programming hardware/algorithm. In this
Actually there are three.
1. How EEPROM addresses are represented in .hex files?
2. How EEPROM addresses are represented in the serial line when using
a particular programmer's protocol?
3. How EEPROM addresses are used by running PIC programs.
> case, I believe it is true that EEPROM is mapped to begin at 0x2100. So
> when you are programming a PIC using the serial interface, you'd go to
> 0x2100 to start entering data into the EEPROM.
>
> The other perspective is that of an actual PIC program. If you write a
> program to run on the PIC and want to access the stuff stored in EEPROM,
> you start making requests from 0x00 (through the EEADR register or
> similar).
Case 3: trivial but uninterested here.
Case 2: PICSTART Plus protocol requires the same addressing scheme as case 1.
So we should focus on case 1.
I repeat my main question: WILL I BE COMPATIBLE with gputils if my program
accepts and produces .hex files with 0x2100/0xf00000 offset?
Gabor
>
> Say you put some pre-initialized data into the EEPROM at address 0x2100
> while programming the PIC. Then when you start up the PIC and your program
> begins to run, it could access that data by putting 0x00 into the EEADR
> register and then reading EEDATA (some steps may have been omitted, follow
> the actual sequence shown in your data sheet).
>
> So essentially the address you need to use depends on what you're doing:
> if you are a program running on the PIC, then use 0x00 as the base
> address, and if you're actually programming a PIC, then use 0x2100 (for
> the 14-bit parts, of course).
gnupic@linuxhacker.org