Searching \ for 'Writing PIC16C84 EEPROM data memory not working.' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/microchip/memory.htm?key=data
Search entire site for: 'Writing PIC16C84 EEPROM data memory not working.'.

Truncated match.
PICList Thread
'Writing PIC16C84 EEPROM data memory not working.'
1998\04\19@233928 by MARVIN ANDROID

picon face
Hello,

Many thanks to everyone that answered my previous query.

My program seems to be going along quite nicely so far but now I've hit a brick
wall called DATA EEPROM MEMORY. I just cant seem to write to it!

This is what i have currently in the program and im still running it in the
simulation. The eeprom Window doesnt update with the new value. Is there
something im doing wrong here?

--------------------------------------------------
 BCF   STATUS, RP0   ;Bank 0
 ;set eeprom address
 movf address, W
 movwf EEADR

 ;write data to EEDATA
 movf data1, W
 movwf EEDATA

 BSF   STATUS, RP0   ;Bank 1
 BCF   INTCON, GIE   ;Disable INT's
 movlw 0x55
 movwf EECON2        ;Write 55h
 movlw 0xAA
 movwf EECON2        ;Write AAh
 bsf   EECON1, WR    ;Set WR bit begin write
 bsf   INTCON, GIE
--------------------------------------------------

Thanks again,

Gabes.




____________________________________________________________________
Get free e-mail and a permanent address at http://www.netaddress.com/?N=1

1998\04\20@022806 by Lauri Pirttiaho

picon face
Gabes:
{Quote hidden}

You forgot the
"BSF EECON1, WREN ; Enable Write"
line

-- Lauri

---
<a href="http://www.ee.oulu.fi/~lapi/">For more info.</a>

1998\04\20@111410 by Mike Keitz

picon face
On Sun, 19 Apr 1998 23:39:28 -0400 MARVIN ANDROID <spam_OUTm.androidTakeThisOuTspamUSA.NET>
writes:
>Hello,
>
>Many thanks to everyone that answered my previous query.
>
>My program seems to be going along quite nicely so far but now I've
>hit a brick
> wall called DATA EEPROM MEMORY. I just cant seem to write to it!

The code attached looks close to right but you have to set the WREN bit
in EECON1 at some point before the "required sequence" (maybe even in
another routine, gives better protection against unintentional writes).
Simply clearing the GIE bit isn't certain to disable interrupts.  Also
it's a good idea to check/poll the WR bit before or after writing to be
sure the EEPROM isn't still busy with the last write.

Has anyone done a definite test to see if the EEPROM can be read while
it's writing?  The only place Microchip ever claimed that was in the
"Truth about AVR" and of course that wasn't all true.


_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

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