w681308 Winbond Electronics Corp America, w681308 Datasheet - Page 24
![no-image](/images/no-image-200.jpg)
w681308
Manufacturer Part Number
w681308
Description
Usb Audio Controller
Manufacturer
Winbond Electronics Corp America
Datasheet
1.W681308.pdf
(64 pages)
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
w681308DG
Manufacturer:
NUVOTON
Quantity:
5 000
Part Number:
w681308DG
Manufacturer:
NUVOTON
Quantity:
20 000
8.6
The MCU of W681308 has three 16-bit programmable timers/counters and one programmable Watchdog timer. The
Watchdog timer is operationally quite different from the other three timers.
8.6.1
Timer 0 (TM0) and Timer 1 (TM1) are 16-bit Timer/Counters and are nearly identical. Each of these Timers/Counters has two
8 bit registers which form the 16 bit counting register. For Timer/Counter 0 they are TH0, the upper 8 bits register, and TL0,
the lower 8 bit register. Similarly Timer/Counter 1 has two 8 bit registers, TH1 and TL1. The two timers can be configured to
operate either as timers to count machine cycles or as counters counting external inputs.
In Timer mode, the timer counts clock cycles. The timer clock can be programmed to be thought of as 1/12 of the system
clock or 1/4 of the system clock.
In Counter mode, the register is incremented on the falling edge of the corresponding external input pins, T0 for Timer 0 and
T1 for Timer 1. The T0 and T1 inputs are sampled in every machine cycle at C4. If the sampled value is high in one machine
cycle and low in the next, then a valid high to low transition on the pin is recognized and the count register is incremented.
Since it takes two machine cycles to recognize a negative transition on the pin, the minimum period at which counting will
take place is double of the machine cycle.
In either the Timer or Counter mode, the count register will be updated at C3. Therefore, in the Timer mode, the recognized
negative transition on pin T0 and T1 can cause the count register value to be updated only in the machine cycle following the
one in which the negative edge was detected.
The Timer or Counter function is selected by the C/T bit in the TMOD Special Function Register. Each Timer/Counter has
one selection bit for its own. Bit 2 of TMOD selects the function for Timer/Counter 0 and bit 6 of TMOD selects the function
for Timer/Counter 1.
TMOD
TCON
89H
88H
Programming Timers and Counters
Timers/Counters 0 and 1
GATE
Bit 7
Bit 7
TF1
Bit 6
Bit 6
TR1
C/T
Table 4 Timer Mode/Control TMOD/TCON SFR
Bit 5
Bit 5
TF0
M1
XXXX PRODUCT DESCRIPTION
Bit 4
Bit 4
TR0
M0
24
GATE
Bit 3
Bit 3
IE1
Bit 2
Bit 2
C/T
IT1
Bit 1
Bit 1
IE0
M1
W681308
Rev1.2
Bit 0
Bit 0
IT0
M0