At 10:21 AM 13/12/00 +1100, you wrote:
{Quote hidden}>David Duffy wrote:
>
> > Yes, bank is set correctly. Do you wait in the EE write routine or
> elsewhere?
> > If in the write routine, is it before or after the actual write code?
> > Regards...
>
>I have been using the 16F876 for the PicPocket.
>
>Here is an excerpt from the code for internal eeprom writes.
>
>It's pretty much 'out of the book'.
>
>
> bsf STATUS,RP1 ; RAM Page 2
> movlw ChipAdd
> movwf EEADR
> movlw 0x00
> call EEwrite
> movlw 0xFF
> call EEwrite
> ...
>
>
>EEwrite bsf STATUS,RP1 ; RAM Page 2
> movwf EEDATA
>
> bsf STATUS,RP0 ; RAM Page 3
> bcf EECON1,EEPGD ; internal writes
> bsf EECON1,WREN
> movlw 55h
> movwf EECON2
> movlw 0xAA
> movwf EECON2
> bsf EECON1,WR
>
>WtEep btfsc EECON1,WR
> goto WtEep
>
> bcf EECON1,WREN
> bcf STATUS,RP0 ; RAM Page 2
> incf EEADR
> clrf STATUS ; RAM page 0
> return
Hi Tony,
That's what I'm doing except I've got the interrupt to deal with.
Are you using interrupts? If so, are you disabling them anywhere?
Regards...
--
http://www.piclist.com hint: To leave the PICList
@spam@piclist-unsubscribe-requestKILLspam
mitvma.mit.edu