2004-05-25 09:08 PM
2004-05-25 09:00 AM
If the programming cycle is started can I test the end by read EECSR with
tnz EECSR thanks for help Kurt2004-05-25 09:08 PM
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 ]