cancel
Showing results for 
Search instead for 
Did you mean: 

DATA EEPROM

hkurt
Associate II
Posted on May 26, 2004 at 06:08

DATA EEPROM

2 REPLIES 2
hkurt
Associate II
Posted on May 25, 2004 at 18:00

If the programming cycle is started can I test the end by read EECSR with

tnz EECSR

thanks for help

Kurt

ldefend1
Associate II
Posted on May 26, 2004 at 06:08

Yes you can test the EECSR register by using TNZ instruction, but this is not enough. You have to check the Z flag to know if E2LAT bit is cleared by hardware or not (end of EEPROM cycle) in fact TNZ is a test instruction but no action is taken after it was executed. For this reason you have to use a JRxx (e.g. JREQ) instruction to test Z flag. However in this manner the number of cycles are: 4+3 =7 and you waste 4 bytes (2+2). If you use just BTJF to test E2LAT bit in EECSR register instruction you waste 5 cycles and 3 bytes.

[ This message was edited by: friul on 26-05-2004 09:41 ]