Searching \ for 'Read/Write to Data EEEPROM' 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/mems.htm?key=data
Search entire site for: 'Read/Write to Data EEEPROM'.

Truncated match.
PICList Thread
'Read/Write to Data EEEPROM'
1997\05\16@153724 by Francesco Cembrola

picon face
I am a little confused on the purpuse of having the Data EEPROM.
Can someone explain the use of it?

Also can I have an exsample of how to write a value to the first location in
the above memory and then read it back again?

Thank you.

Francesco Cembrola

1997\05\16@200802 by Gerhard Fiedler

picon face
At 15:34 16/05/97 -0400, Francesco Cembrola wrote:
>I am a little confused on the purpuse of having the Data EEPROM.
>Can someone explain the use of it?

let's say you have some data that you still want to have when the pic is
powered up the next time: how'd you do that? since it's some kind of
"online" data, you can't put it in the code prom (you don't know it when
programming it), and if you put it into ram, it's gone after power down. so
you put it into eeprom, and bingo -- you have a non volatile read- and
writeable memory.

>Also can I have an exsample of how to write a value to the first location in
>the above memory and then read it back again?

Page 11-31 ff. of the 96/97 data book shows how to do it, they even have a
code example there. (All theory, I'll have to check it by myself since I'm
going to use it, but only in a couple of days.)

I thought of writing some sample code here, but it's really all there --
provided it works as written. For the first location you put 0 in EEADR and
your data in EEDATA, and then do as they say.

1997\05\16@205202 by .

flavicon
face
>At 15:34 16/05/97 -0400, Francesco Cembrola wrote:
>>I am a little confused on the purpuse of having the Data EEPROM.
>>Can someone explain the use of it?
>
>let's say you have some data that you still want to have when the pic is
>powered up the next time: how'd you do that? since it's some kind of
>"online" data, you can't put it in the code prom (you don't know it when
>programming it), and if you put it into ram, it's gone after power down. so
>you put it into eeprom, and bingo -- you have a non volatile read- and
>writeable memory.
>
>>Also can I have an exsample of how to write a value to the first location in
>>the above memory and then read it back again?

Which 'book' are you refering to below? And where might I find a copy of
this book?

>

http://ic.mankato.mn.us/~douglas

>Page 11-31 ff. of the 96/97 data book shows how to do it, they even have a
>code example there. (All theory, I'll have to check it by myself since I'm
>going to use it, but only in a couple of days.)
>
>I thought of writing some sample code here, but it's really all there --
>provided it works as written. For the first location you put 0 in EEADR and
>your data in EEDATA, and then do as they say.
>
>

1997\05\17@100612 by Gerhard Fiedler

picon face
At 19:38 16/05/97 -0500, . wrote:
>Which 'book' are you refering to below? And where might I find a copy of
>this book?
>
>>Page 11-31 ff. of the 96/97 data book shows how to do it, they even have a
>>code example there. (All theory, I'll have to check it by myself since I'm
>>going to use it, but only in a couple of days.)

I was refering to the PIC16/17 Microcontroller Data Book, edition 1996/1997
-- which I think is _THE_BOOK_ to get when you try to make something other
than necklaces with PICs. I think Microchip sends it to everybody who
requests it (either in paper form or with some other info as a CD-ROM).
They are even here in Brazil readily available, where you don't see a trace
of data books from other manufacturers.

1997\05\19@074238 by Tony Matthews

flavicon
face
. wrote:
{Quote hidden}

one of the gotcha's that I see on the list often is trying to write
consecutive bytes to eeprom without allowing for the required delay
between writes. Tony M.

1997\05\19@102249 by Gerhard Fiedler

picon face
At 07:38 19/05/97 -0400, Tony Matthews wrote:
> >I thought of writing some sample code here, but it's really all there --
> >provided it works as written. For the first location you put 0 in EEADR and
> >your data in EEDATA, and then do as they say.
> >
>one of the gotcha's that I see on the list often is trying to write
>consecutive bytes to eeprom without allowing for the required delay
>between writes. Tony M.

Which (the required delay) is given by either the WR bit being cleared or
the EEIF bit being set (with possibly an interrupt associated). Is there
any difference between the two when polling for the end of the write cycle?

1997\05\19@134521 by Tony Matthews
flavicon
face
Gerhard Fiedler wrote:
>
> At 07:38 19/05/97 -0400, Tony Matthews wrote:
> > >I thought of writing some sample code here, but it's really all there --
> > >provided it works as written. For the first location you put 0 in EEADR and
> > >your data in EEDATA, and then do as they say.
> > >
> >one of the gotcha's that I see on the list often is trying to write
> >consecutive bytes to eeprom without allowing for the required delay
> >between writes. Tony M.
>
> Which (the required delay) is given by either the WR bit being cleared or
> the EEIF bit being set (with possibly an interrupt associated). Is there
> any difference between the two when polling for the end of the write cycle?
I generally have little or no programming words left over on a 16c84 so
prefer to do other work during the 10 ms delay so I cannot advise you as
to polling have'nt done it. luck Tony M.

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