Now that my stocks of F84 are dwindling, I'm moving s/w over to the F628. I hope I'm not missing anything embarrassingly obvious, but this EEPROM routine (which did work on the F84, before the necessary changes to PIR1) doesn't seem to work. It's straight from the manual What happens is that the LED turns on at the start of the routine but never goes out, indicating that the write didn't finish or the routine didn't complete If the circuit is reset, the value intended to be written is at the EEPROM location it should be What has me head-scratching is the address of 1C compiled for EECON1 with WREN WTF ? I've looked at Microchip's latest data, but that repeats what is in the manual Fixes gratefully received, then maybe I can stop p*ssing about with this and get some proper work done TIA ============================================ 0053 1606 STEE bsf portb,led 0054 1283 bcf status,rp0 0055 1303 bcf status,rp1 0056 3000 movlw 0x00 0057 009B movwf 0x1B ;eeadr 0058 3053 movlw 0x53 0059 009A movwf rcreg ;eedata 005A 138C bcf pir1,eeif 005B 1683 bsf status,rp0 005C 138B WRITE bcf intcon,gie 005D 151C bsf 0x1C,0x2 ;eecon1,wren 005E 3055 movlw 0x55 005F 009D movwf 0x1D ;eecon2 0060 30AA movlw 0xAA 0061 009D movwf 0x1D ;eecon2 0062 149C bsf 0x1C,0x1 ;eecon1,wr 0063 1F8C WREND btfss pir1,eeif 0064 2863 goto WREND 0065 138C bcf pir1,eeif 0066 111C bcf 0x1C,0x2 ;eecon1,wren 0067 1283 bcf status,rp0 0068 1303 bcf status,rp1 0069 1206 bcf portb,led 006A 286A ENDWR goto ENDWR -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body