
S3C821A/P821A
TIMER 1
11-5
TACON and TBCON are located in set 1, bank 0, at address F3H and F2H, and is read/write addressable using
register addressing mode.
A reset clears TACON and TBCON to "00H". This sets timer A and B to disable interval timer mode, selects an
input clock frequency of fxx/1024, and disables timer A and B interrupt. You can clear the timer A and B counter
at any time during normal operation by writing a "1" to TACON.3 and TBCON.3.
To enable the timer A and B interrupt (IRQ1, vector F6H, F4H), you must write TACON.7 to "0", TACON.2
(TBCON.2) and TACON.1 (TBCON.1) to "1". To generate the exact time interval, you should set TACON.3
(TBCON.3) and TACON.0 (TBCON.0) to “10B”, which clear counter and interrupt pending bit, respectively. When
the TAINT or TBINT sub-routine is serviced, the pending condition must be cleared by software by writing a "0" to
the timer A or B interrupt pending bits, TACON.0 or TBCON.0.
MSB
LSB
.7
.6
.5
.4
.3
.2
.1
.0
TIMER A CONTROL REGISTER (TACON)
F3H, Set 1, Bank 0, R/W
Timer A interrupt pending bit:
0 = No interrupt pending
0 = Clear pending bit (when write)
1 = Interrupt is pending (when read)
1 = No effect (when write)
Timer A interrupt enable bit:
0 = Disable interrupt
1 = Enable interrupt
Timer A counter run enable bit:
0 = Disable counter running
1 = Enable counter running
Timer A counter clear bit:
0 = No effect
1 = Clear the timer A counter (when write)
Timer 1 operating mode selection bit :
0 = Two 8-bit timers mode (Timer A/B)
1 = One 16-bit timer mode (Timer 1)
Timer A clock selection bits:
000 = fxx/1024
001 = fxx/512
010 = fxx/8
011 = fxx
1xx = T1CK (external clock)
(“x” means don’t care.)
Figure 11-3. Timer A Control Register (TACON)