CPC522
CPCCPC522 User Manual
22
©2022 Fastwel Ver.001
Configuration mode
The device enters configuration mode when the following configuration key is written to
CONFIG PORT:
Configuration key = <46h> <57h>
The device exits configuration mode when the following configuration key is written to
CONFIG PORT:
Configuration key = <57h> <46h>
INDEX and DATA ports are available only in the configuration mode.
Device programming
Sequence of operations when programming the device
Enter the configuration mode:
Write the number of the logical device to the LDN register (watchdog timer has a
logical number 1):
The watchdog timer registers are available for reading and writing. For example, reading the
3eh status register and writing its value back:
MOV DX, 302H
MOV AL, 3EH
OUT DX, AL
CONFIG PORT
302h
Write
INDEX PORT
302h
Read/Write
DATA PORT
303h
Read/Write
MOV
MOV
OUT
MOV
OUT
DX, 302H
AL, 46H
DX, AL
AL, 57H
DX, AL
MOV
MOV
OUT
MOV
MOV
OUT
DX, 302H
AL, 7
DX, AL
DX, 303H
AL, 1
DX, AL