Reply by Spehro Pefhany June 18, 20042004-06-18
On 17 Jun 2004 17:43:47 -0400, the renowned byron@cc.gatech.edu (Byron
A Jeff) wrote:

>In article <xijAc.8$uM6.295090@news.salzburg-online.at>, >Wolfgang Mahringer <yeti201@gmx.at> wrote: >-Dear Michael, >- >-Michael wrote: >-> Where in the docs is the starting address of EEPROM defined?? A program >-> I wrote a year or so ago has EEPROM data ORG'd and DEFINED at 0x1200, >-> but I have no idea were I got that address! >- >-The only way to access to EEPROM bytes is via the EEADR, EEDATA, EECON1 >-and EECON2 registers. See section 13 of the datasheet how to do this. >- >-Like the built in RAM, the EEPROM has an independent address space, and >-it starts at 0. >- >-> Having a senior moment, I guess. >-:-) > >Wolf, > >While technically true, there's more to the story. The data EEPROM of pics >can be externally programmed by the PIC programmer. the 0x2100 is a convention >used to describe the address space of the data EEPROM to the programmer. >So the address is an agreement between the human programmer and the hardware >PIC programmer to describe the data for the data EEPROM. > >It could in fact be any other address that the human and the PIC programmer >software can agree on. However for midrange PICS th 0x2100 is pretty standard. > >Note that on the 18F parts the address is completely different: 0xC00000 IIRC. >rason being is that 18F has a larger program memory address space. > >Hope this helps, > >BAJ (Trivial LVP PIC Programmer designer: http://www.finitesite.com/d3jsys)
http://ww1.microchip.com/downloads/en/DeviceDoc/30034d.pdf Best regards, Spehro Pefhany -- "it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com
Reply by Wolfgang Mahringer June 18, 20042004-06-18
Hi Mike,

Michael wrote:

>>The only way to access to EEPROM bytes is via the EEADR, EEDATA, EECON1 >>and EECON2 registers. See section 13 of the datasheet how to do this. > > Not strictly true. See the description of the DE assembler directive in > your MPASM manual,
Well, right. The DE statement has ONLY a meaning to your programmer. It has NO meaning to your software. But how the hell should I know you mean the programming addresses? We could be more helpful if people give more than minimal infos :-( Regards, Wolf -- From-address is Spam trap Use: wolfgang (dot) mahringer (at) sbg (dot) at
Reply by Michael June 18, 20042004-06-18
Wolfgang Mahringer wrote:
 
> The only way to access to EEPROM bytes is via the EEADR, EEDATA, EECON1 > and EECON2 registers. See section 13 of the datasheet how to do this.
Not strictly true. See the description of the DE assembler directive in your MPASM manual,
Reply by Michael June 18, 20042004-06-18
Byron A Jeff wrote:
> > In article <xijAc.8$uM6.295090@news.salzburg-online.at>, > Wolfgang Mahringer <yeti201@gmx.at> wrote: > -Dear Michael, > - > -Michael wrote: > -> Where in the docs is the starting address of EEPROM defined?? A program > -> I wrote a year or so ago has EEPROM data ORG'd and DEFINED at 0x1200, > -> but I have no idea were I got that address! > - > -The only way to access to EEPROM bytes is via the EEADR, EEDATA, EECON1 > -and EECON2 registers. See section 13 of the datasheet how to do this. > - > -Like the built in RAM, the EEPROM has an independent address space, and > -it starts at 0. > - > -> Having a senior moment, I guess. > -:-) > > Wolf, > > While technically true, there's more to the story. The data EEPROM of pics > can be externally programmed by the PIC programmer. the 0x2100 is a convention > used to describe the address space of the data EEPROM to the programmer. > So the address is an agreement between the human programmer and the hardware > PIC programmer to describe the data for the data EEPROM. > > It could in fact be any other address that the human and the PIC programmer > software can agree on. However for midrange PICS th 0x2100 is pretty standard. > > Note that on the 18F parts the address is completely different: 0xC00000 IIRC. > rason being is that 18F has a larger program memory address space. > > Hope this helps, > > BAJ (Trivial LVP PIC Programmer designer: http://www.finitesite.com/d3jsys)
Yeah, that does help. Thank-you. Subsequent to posting I decided that the reason I had ORGed EEPROM at x1200/x2100 (whichever) is that's what I'd done previously with 16f84 (Makes little sense; I know.) The "book of words" for MPASM (document DS33014G) states very clearly that "DE" can be used to define the contents of EEPROM at device programming time, and it does work ... for the 16F628 at least. (As long as you ORG it correctly)
Reply by Byron A Jeff June 17, 20042004-06-17
In article <xijAc.8$uM6.295090@news.salzburg-online.at>,
Wolfgang Mahringer  <yeti201@gmx.at> wrote:
-Dear Michael,
-
-Michael wrote:
-> Where in the docs is the starting address of EEPROM defined??  A program
-> I wrote a year or so ago has EEPROM data ORG'd and DEFINED at 0x1200,
-> but I have no idea were I got that address!
-
-The only way to access to EEPROM bytes is via the EEADR, EEDATA, EECON1 
-and EECON2 registers. See section 13 of the datasheet how to do this.
-
-Like the built in RAM, the EEPROM has an independent address space, and 
-it starts at 0.
-
-> Having a senior moment, I guess.
-:-)

Wolf,

While technically true, there's more to the story. The data EEPROM of pics
can be externally programmed by the PIC programmer. the 0x2100 is a convention
used to describe the address space of the data EEPROM to the programmer.
So the address is an agreement between the human programmer and the hardware
PIC programmer to describe the data for the data EEPROM.

It could in fact be any other address that the human and the PIC programmer
software can agree on. However for midrange PICS th 0x2100 is pretty standard.

Note that on the 18F parts the address is completely different: 0xC00000 IIRC.
rason being is that 18F has a larger program memory address space.

Hope this helps,

BAJ (Trivial LVP PIC Programmer designer: http://www.finitesite.com/d3jsys)
Reply by Wolfgang Mahringer June 17, 20042004-06-17
Dear Michael,

Michael wrote:
> Where in the docs is the starting address of EEPROM defined?? A program > I wrote a year or so ago has EEPROM data ORG'd and DEFINED at 0x1200, > but I have no idea were I got that address!
The only way to access to EEPROM bytes is via the EEADR, EEDATA, EECON1 and EECON2 registers. See section 13 of the datasheet how to do this. Like the built in RAM, the EEPROM has an independent address space, and it starts at 0.
> Having a senior moment, I guess.
:-) HTH Wolf -- From-address is Spam trap Use: wolfgang (dot) mahringer (at) sbg (dot) at
Reply by Michael June 17, 20042004-06-17
Where in the docs is the starting address of EEPROM defined??  A program
I wrote a year or so ago has EEPROM data ORG'd and DEFINED at 0x1200,
but I have no idea were I got that address!

Having a senior moment, I guess.

Michael