Truncated match.
PICList
Thread
'Internal EEPROM'
2000\03\23@180814
by
Rob R
Ive been reading through the docs for a 16F84 and I dont understand how to read and write a byte to the internal eeprom. There are 64 bytes on a f84. Im trying to do this in MPLAB to so i can visually see and learn the process, can anyone help me out? I would like to write a byte and read it back.
Rob
Send someone a cool Dynamitemail flashcard greeting!! And get rewarded.
GO AHEAD! http://cards.dynamitemail.com/index.php3?rid=fc-41
2000\03\24@055135
by
Sebastian Garcia
Rob,
Post what you did in source code so we can help you!
Regards,
S.-
-----Original Message-----
From: Rob R <spam_OUTelektrikmanTakeThisOuT
DYNAMITEMAIL.COM>
|Ive been reading through the docs for a 16F84 and I dont understand how to
read and write a |byte to the internal eeprom. There are 64 bytes on a f84.
Im trying to do this in MPLAB to |so i can visually see and learn the
process, can anyone help me out? I would like to write a |byte and read it
back.
|
|Rob
2000\03\24@113656
by
Lea
|
Hi Rob.
It's very easy to read and write to the internal EEPROM in F/C84
here are some code examples:
;read eprom address, data will return in W, memory address must be
; set in EEADR, before call this sub.
;
READEE CLRF EEDATA
BSF STATUS,5 ;Goto BANK1
BSF EECON1,RD
BCF STATUS,5 ;back BANK0
NOP ; only necessary if running at 10mhz.
MOVF EEDATA,W
RETURN
;
;Writing byte to internal EE :
;address byte must be in EEADR, and value in EEDATA
;
WRITEE BSF STATUS,5
BSF EECON1,WREN
MOVLW 0x55
MOVWF EECON2
MOVLW 0xAA
MOVWF EECON2
BSF EECON1, WR
BCF STATUS,5
MOVLW 1
CALL DELAY ;1 ms sub delay, to allow eeprom to write.
RETURN
I use this routines and works very good, If you ask me why to write 55h & AAh
to EECON2 I have no idea, but this is the way that works ;-).
Oh, I forgot! label definitions!:
EEDATA equ 08
EEADR equ 09
EECON1 equ 88
EECON2 equ 89
WREN equ 2
RD equ 0
WR equ 1
I Hope it will be useful for you.
see you.
>Ive been reading through the docs for a 16F84 and I dont understand how to
read >and write a byte to the internal eeprom. There are 64 bytes on a f84.
Im >trying to do this in MPLAB to so i can visually see and learn the
process, can >anyone help me out? I would like to write a byte and read it
back.
>
>Rob
>
Leandro J. Laporta (LU2AOQ) mail: .....lu2aoqKILLspam
@spam@yahoo.com
wrk: Arg. Assoc. for Space Tech. ham: TCP/IP high speed group HSG
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
2000\03\27@000630
by
Gennette Bruce
This is an easy one. Go to the microchip site and get their tech note about
accessing eeprom.
The secret is really a secret - they have some special instructions (that
they won't tell us about) to move a byte from a special transfer point to
and from any point in the eeprom. You just have to faithfully copy the 5 or
6 instructions from the tech note and it magically works.
Bye.
{Original Message removed}
More... (looser matching)
- Last day of these posts
- In 2000
, 2001 only
- Today
- New search...