gnupic: Possible 'gpsim' 16F877 EEPROM Data Write Bug
Subject:
Re: Possible 'gpsim' 16F877 EEPROM Data Write Bug
From:
Samuel Tardieu ####@####.####
Date:
16 Oct 2002 20:40:50 -0000
Message-Id: <2002-10-16-22-37-33+trackit+sam@inf.enst.fr>
On 16/10, Tom Alldread, VA7TA wrote:
| movf data0,w ;get the address
| movwf EEADR ;put it in EE adr register
| movf data1,w ;get the data
| movwf EEDATA ;put it in EE data register
| bsf STATUS,RP0 ;select bank3
| ;EEPLoop ;ensure previous write cycle has
| completed
| ; btfsc EECON1,WR ;is write cycle complete?
| ; goto EEPLoop ;wait for write to finish
I know the busy loop is commented here, but if it was, would it be safe
to change EEDATA/EEADR while a write operation is in progress? The
sample code from the 16f76x datasheet tests this bit before or after the
whole operation, not in the middle. Those registers may be used by the
write operation.
Sam