There are a number of bits that the 80C320 considers vital to correct operation. If any of these bits were to be inadvertently changed by a runaway (crashed) CPU, system reliability could suffer. In order to insure that these bits are not accidentally modified, a "timed access protection system" was created to protect them.
Programming Tip: The "Timed Accessed" procedure explained in this page also applies to other Dallas Semiconductor high-speed microcontrollers.
The timed access protection system requires that the following instructions be executed immediately prior to modifying a protected bit (note that the Timed Access TA SFR is at C7h):
For example, if you wish to enable the Watchdog by setting EWT (WDCON.1), you would need to execute the following code:
MOV TA,#55h
MOV WDCON,#03h
The following bits are protected and, thus, you must execute the two MOV TA instructions before attempting to modify any of them:
Protected Bit | Bit Name |
EXIF.0 | BGS |
WDCON.6 | POR |
WDCON.3 | WDIF |
WDCON.1 | EWT |
WDCON.0 | RWT |
Previous: Dual Serial Port | Tutorial Contents | Next: Done! |