English
Language : 

W681307DG Datasheet, PDF (53/160 Pages) Winbond – USB1.1 CODEC Microprocessor Control Unit with 32KB Mask ROM and 4KB RAM.
W681307
9.3.1
Key Location and Size Programming
Key Location and size registers, KeyLocR[*], KeyLocC[*], KeyRows[*] & KeyColumns[*] are defined as follows:-
Row/Column
Zero (see Note)
One
Two
Three
Four
Five
[2:0]
0x00
0x01
0x02
0x03
0x04
0x05
Note:
that zero is only valid for KeyRows[*] and KeyColumns[*], which means the keypad size=0 and all the keypad pins serve as GPIO. On
the other hand, the keyLocR[*] and keyLocR[*] are only checked when KeyPressed bit=1 (0x1458[7]) and meanwhile it should contain
non-zero value.
9.4
Timers
There are 3 timers: -
• A programmable 1-millisecond timer
• A 1 second timer
• A programmable 1-second watchdog timer.
The programmable 1-millisecond timer can be enabled, reset and programmed to generate an pulse in the range 1 millisecond to 64
milliseconds (1 millisecond spacing).
The 1-second timer can be enabled, reset and always generates a pulse every 1 second.
The programmable 1 second watchdog timer can be enabled and programmed to generate a pulse in the range 1 second to 8 seconds (1
second spacing). Following reset the watchdog timer is disabled.
In normal operation the watchdog timer should be enabled by writing to the WatchDogEnable bit and the WatchDogResetEn bit. Once
written to these bits cannot be cleared except by a system reset, hence the watchdog cannot be disabled. Enabling the Watchdog timer also
prevents disabling of the 1-second timer.
The watchdog counts from the output of the 1-second timer. The expiry time is programmable and this value is set in the
WatchDogTime[0:2] register field. The software must clear the watchdog counter regularly. If the watchdog counter ever reaches the
expiry time, a reset and interrupt will occur.
Note: A write to the WatchDogKick location will not affect the 1-second timer from which the watchdog operates. Therefore if the
watchdog is set to 8 seconds, the timeout will occur between 7 to 8 seconds. The WatchDogKick location must be written to before 7
seconds, otherwise a reset and interrupt will occur. It is recommended that a setting of 1 second is not used.
In order to facilitate software debug the device has the Watchdog expiry generated reset disabled from reset. A watchdog interrupt is
provided to assist software debugging, this interrupt WatchDogIntrpt is generated by the watchdog timer if it expires. In this case the
WatchDogEnable bit would be set, but not the WatchDogResetEn bit.
- 53 -
Publication Release Date: May, 2007
Revision 1.3