Searching \ for '[PIC]: EEprom initialization on 18F' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/memory.htm?key=eeprom
Search entire site for: 'EEprom initialization on 18F'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: EEprom initialization on 18F'
2003\06\19@004932 by Lyle Hazelwood

flavicon
face
Hi all,
Just trying something that I thought would be simple,
but I'm not having much luck.

I want to define a null-terminated string in the
internal EEPROM of an 18F458, using MPASM.

I have tried:


       org H'F00000' ; Initialize EEPROM Data
name    de "Bridge", 0

and I get only "Big" in the EEPROM.
Apparently it is "word packing" the data,
even though the destination is only byte wide.
I also tried db and dw, no luck.

The following works:
       org H'F00000' ; Initialize EEPROM Data
name    data 'B','r','i','d','g','e', 0

But I'd really like to enter a string instead of
discrete characters.
Any suggestions from those wiser than I?

Thanks,
Lyle

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body

2003\06\19@085335 by o-8859-1?Q?Tony_K=FCbek?=

flavicon
face
Hi,

Lyle Hazelwood wrote:
<snip>
{Quote hidden}

<snip>

This seems odd, I've used the following with success:

EE_ROMDATA      CODE    0xF00000        ; data resides in onchip eerom
STRING_ERROR
       GLOBAL  STRING_ERROR
       DB "Error:",0x00


However, how are you reading the data ?

PS: For fixed strings I belive it's better to use the program mem,
as it's easy to access them with the TABLAT, and as one can pack two bytes
into one program word is fairly efficient DS

/Tony

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body

2003\06\19@124252 by Ken Pergola

flavicon
face
Lyle,

You can also use the notation of '\0' to add the null character (see below).
I'm finding out that both methods are synonymous -- they add two null
characters (MPLAB v6.22).
What does the data EEPROM buffer look like when you load up the Hex file?

       org H'F00000' ; Initialize EEPROM Data
name    de "Bridge\0"


Regards,

Ken Pergola



{Original Message removed}

2003\06\19@132600 by Lyle Hazelwood

flavicon
face
{Quote hidden}

How intersting!
I tried your code, and it still came up "Big" in the
chip. So far, I've been looking into the EEPROM area
of my programming software (ICPROG 1.05A). I verified
that it is burned into the chip as it shows in the ICPROG
window. HOWEVER, when I look into the EEPROM watch window
of MPLAB, your method shows correctly and mine shows
null bytes between each character.
It looks like this may be an ICPROG error I am dealing
with.

Thanks for the help. I'll be sure to copy this to the
author of ICProg.

Regarding FLASH vs EEPROM, I am creating "named" nodes
on a network, and would prefer to keep the code in
flash, but all config info in EEPROM. The config stuff
may be changeable later, and by definition node-specific,
so I think EEPROM is the best option.

Thanks Again,
Lyle

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamKILLspammitvma.mit.edu with SET PICList DIGEST in the body

More... (looser matching)
- Last day of these posts
- In 2003 , 2004 only
- Today
- New search...