Thanks! I'll mess with my code taking these considerations into account. Harold On Tue, 16 Jan 2001 12:06:20 -0700 Richard Ottosen writes: > Harold: > I would that invoking the read while writing will _immediatly_ > change > from writing to reading. Very bad. > > Also, be aware that changing the EEPROM data or address while > writing > will cause the EEPROM hardware to start writing with the original > data/address and finish writing with the new data/address. Also very > bad. > > If you want to put the check for EEPROM ready at the start of the > EEPROM > subroutine then you must use temporary variables to hold the data > and > address until the EEPROM is ready to accept the updating of the > EEPROM > data and address registers. > > I hope this makes sense. If not, I can give an example. > > > -- Rich > > > > Harold M Hallikainen wrote: > > > > In my code, I've done the check for end of write on the > way in to the > > write routine instead of on the way out, figuring that I could get > other > > stuff done before I get stuck in a loop waiting for the eeprom > write to > > finish. As I think about it more, though, are reads inhibited > until the > > write cycle is complete? This is the case with the 2816 EEPROM > with which > > I am more familiar. So, maybe it IS a good idea to wait for the > write to > > finish before doing anything that might try to read the eerpom. > > > > Harold > > > > On Tue, 16 Jan 2001 09:20:01 -0500 Drew Vassallo > > > writes: > > > You may have also forgotten another line, I can't remember > exactly if > > > it's > > > required - I haven't used it in a while. Try this: > > > > > > bsf STATUS, RP0 ; select Bank1 for EECON > > > access > > > bcf INTCON, GIE ; disable interrupts > > > temporarily > > > bsf EECON1, WREN ; enable EEPROM write > > > movlw 0x55 > > > movwf EECON2 > > > movlw 0xAA > > > movwf EECON2 > > > bsf EECON1, WR ; write values to EE > > > bsf INTCON, GIE ; reenable interrupts > > > bcf EECON1, WREN ; disable EEPROM write > > > Waitforflag > > > btfss EECON1, EEIF ; poll flag bit > > > goto Waitforflag > > > bcf EECON1, EEIF ; write cycle complete > > > bcf STATUS, RP0 ; leave Bank0 active by > > > default > > > return > > > > > > --Andrew > > > > _________________________________________________________________ > > > Get your FREE download of MSN Explorer at > http://explorer.msn.com > > > > > > -- > > > http://www.piclist.com hint: To leave the PICList > > > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > > > > > > > > FCC Rules Online at http://hallikainen.com/FccRules > > Lighting control for theatre and television at > http://www.dovesystems.com > > > > ________________________________________________________________ > > GET INTERNET ACCESS FROM JUNO! > > Juno offers FREE or PREMIUM Internet access for less! > > Join Juno today! For your FREE software, visit: > > http://dl.www.juno.com/get/tagj. > > > > -- > > http://www.piclist.com hint: To leave the PICList > > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > FCC Rules Online at http://hallikainen.com/FccRules Lighting control for theatre and television at http://www.dovesystems.com ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/tagj. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu