Searching \ for 'EEprom write and read on a 16C84' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page:
Search entire site for: 'EEprom write and read on a 16C84'.

Truncated match.
PICList Thread
'EEprom write and read on a 16C84'
1996\04\29@131135 by Rene Barbeau

Hi to everyones !

I post this question for one of my friend who don't have Email:


How can I do writing some data into the EEprom data memory when my
program is running. I have tried to follow the procedure as mentioned in
the databook but it doesn't work. I wonder what I've done wrong !

Here is my routine. The program complete this routine right, but after
that the data is not into the EEPROM memory.

At this time the register EEadr contain 38 and the register EEdata
contain 75.

store:   movlw 88        ;EEcon1 address.
        movwf 04        ;into FSR.
        bsf   00,2      ;bit wren=1.
        bsf   03,5      ;bank 1.
        bcf   0b,7      ;disable interrupts.
        btfsc 0b,7      ;are you sure ?
        goto  store     ;no.
        movlw 0x89      ;yes, EEcon2 address.
        movwf 04        ;into FSR.
        movlw 0x55
        movwf 00
        movlw 0xAA
        movwf 00
        decf  04,1
        bsf   00,1      ;wr=1.
Eccomp:  btfsc 00,1      ;writing complete?
        goto  Eccomp    ;no.
        bcf   00,2      ;when=0
        bsf   03,5      ;yes, bank 0.
        bsf   0b,7      ;enable interrupts


So if someone has any clue I will foward responses back to him.

Thanks again !

Rene Barbeau

1996\04\29@134858 by John Payson

>          movlw 0x89      ;yes, EEcon2 address.
>          movwf 04        ;into FSR.
>          movlw 0x55
>          movwf 00
>          movlw 0xAA
>          movwf 00
>          decf  04,1
>          bsf   00,1      ;wr=1.
> Eccomp:  btfsc 00,1      ;writing complete?
>          goto  Eccomp    ;no.

You have too much time between the writes to EEcon2 and EEcon1.  You need
to set bit RP0 and use direct addressing to achieve the correct timing [a
pain, to be sure, but necessary].

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