Skip to main content
Visitor II
May 26, 2004
Question

DATA EEPROM

  • May 26, 2004
  • 2 replies
  • 827 views
Posted on May 26, 2004 at 06:08

DATA EEPROM

    This topic has been closed for replies.

    2 replies

    hkurtAuthor
    Visitor II
    May 25, 2004
    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

    Visitor II
    May 26, 2004
    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 ]