Searching \ for ' [PIC] F871 EEPROM again...why cant I get' 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: 'F871 EEPROM again...why cant I get'.

No exact or substring matches. trying for part
PICList Thread
'[PICLIST] [PIC] F871 EEPROM again...why cant I get'
2001\02\07@150919 by Hardware Engineering

picon face
OK folks..its me again, asking about the EEPROM read/writes.  

I've been solving other issues (interupts,etc) and finally back to this being
my final but worse problem.  There pretty much is no workaround for this since
its timer values that are modified on the fly.

I'm concentrating on reads first.  I used MPLAB to fill the EEPROM memory with
a value, and then simply reading it to store and display on a LCD

But it only shows zero for the value.  I init the variables, and if I bypass
the read routine it displays the default

here is the code

       movlw   0x01            ; initial values to variable
       movwf   MINUTES
       movlw   0x04
       movwf   SECONDS
testread:
       movlw   0
       movwf   EEADDR          ; set up eeprom address from W
       bsf     STATUS,RP0      ; change to page 1
       bsf     EECON1,RD       ; set the read bit
       bcf     STATUS,RP0      ; back to page 0
       movf    EEDATA,W        ; return value in W

       movwf   MINUTES         ; store W to minutes            

; display to LCD  
       movlw   0xCD
       movwf   CURSOR_POSITION
       call    DISPLAY_COLON
       movlw   0xCB
       movwf   CURSOR_POSITION
       movf    MINUTES,0
       movwf   TIME_VALUE
       call    DISPLAY_TIME    ; pass cursor_position & time_value
       movlw   0xCE
       movwf   CURSOR_POSITION ; set initial cursor position  
       movf    SECONDS,0
       movwf   TIME_VALUE
       call    DISPLAY_TIME    ; pass cursor_position & time_value

       goto    testread

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

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\02\07@174415 by David Duffy

flavicon
face
At 01:09 PM 07/02/01 -0700, you wrote:
{Quote hidden}

** You should be clearing EEPGD here to make sure you're reading data EE
** EECON1 is in bank 3 not bank 1

>         bsf     EECON1,RD       ; set the read bit
>         bcf     STATUS,RP0      ; back to page 0

** EEDATA is in bank 2 not bank 0
Have a read of pages 39-41 of the 'F871 datasheet (DS30569A)

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


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