English
Language : 

W78ERD2_07 Datasheet, PDF (52/76 Pages) Winbond – 8-BIT MICROCONTROLLER
W78ERD2/W78ERD2A
Example 1: Valid access
MOV CHPENR, #87h
MOV CHPENR, #59h
MOV CKCON, #00h
;3 M/C, Note: M/C = Machine Cycles
;3 M/C
;3 M/C
Example 2: Valid access
MOV CHPENR, #87h
MOV CHPENR, #59h
NOP
SETB EWT
;3 M/C
;3 M/C
;1 M/C
;2 M/C
Example 3: Valid access
MOV CHPENR, #87h
MOV CHPENR, #59h
ORL CKCON, #01h
;3 M/C
;3 M/C
;3M/C
Example 4: Invalid access
MOV CHPENR, #87h
MOV CHPENR, #59h
NOP
NOP
CLR MD
;3 M/C
;3 M/C
;1 M/C
;1 M/C
;2 M/C
Example 5: Invalid Access
MOV CHPENR, #87h
NOP
MOV CHPENR, #59h
SETB MD
;3 M/C
;1 M/C
;3 M/C
;2 M/C
In the first three examples, the protected bits are written before the window closes. In Example 4,
however, the write occurs after the window has closed, so there is no change in the protected bit. In
Example 5, the second write to CHPENR occurs four machine cycles after the first write, so the timed
access window in not opened at all, and the write to the protected bit fails.
- 52 -