数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

T89C51AC2-RLSI-M 数据表(PDF) 57 Page - ATMEL Corporation

部件名 T89C51AC2-RLSI-M
功能描述  8-bit MCU with 32K bytes Flash, 10 bits A/D and EEPROM
PDF  117 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  ATMEL [ATMEL Corporation]
网页  http://www.atmel.com
标志 ATMEL - ATMEL Corporation

T89C51AC2-RLSI-M 数据表(HTML) 57 Page - ATMEL Corporation

Back Button T89C51AC2-RLSI-M Datasheet HTML 53Page - ATMEL Corporation T89C51AC2-RLSI-M Datasheet HTML 54Page - ATMEL Corporation T89C51AC2-RLSI-M Datasheet HTML 55Page - ATMEL Corporation T89C51AC2-RLSI-M Datasheet HTML 56Page - ATMEL Corporation T89C51AC2-RLSI-M Datasheet HTML 57Page - ATMEL Corporation T89C51AC2-RLSI-M Datasheet HTML 58Page - ATMEL Corporation T89C51AC2-RLSI-M Datasheet HTML 59Page - ATMEL Corporation T89C51AC2-RLSI-M Datasheet HTML 60Page - ATMEL Corporation T89C51AC2-RLSI-M Datasheet HTML 61Page - ATMEL Corporation Next Button
Zoom Inzoom in Zoom Outzoom out
 57 / 117 page
background image
Draft.A - March 30, 2001
57
Preview - Confidential
T89C51AC2
12. Timers/Counters
12.1. Introduction
The T89C51AC2 implements two general-purpose, 16-bit Timers/Counters. They are identified as Timer 0 and
Timer 1, and can be independently configured to operate in a variety of modes as a Timer or as an event Counter.
When operating as a Timer, the Timer/Counter runs for a programmed length of time, then issues an interrupt
request. When operating as a Counter, the Timer/Counter counts negative transitions on an external pin. After a
preset number of counts, the Counter issues an interrupt request.
The various operating modes of each Timer/Counter are described in the following sections.
12.2. Timer/Counter Operations
For instance, a basic operation is Timer registers THx and TLx (x= 0, 1) connected in cascade to form a 16-bit
Timer. Setting the run control bit (TRx) in TCON register (see Figure 47) turns the Timer on by allowing the
selected input to increment TLx. When TLx overflows it increments THx; when THx overflows it sets the Timer
overflow flag (TFx) in TCON register. Setting the TRx does not clear the THx and TLx Timer registers. Timer
registers can be accessed to obtain the current count or to enter preset values. They can be read at any time but
TRx bit must be cleared to preset their values, otherwise the behavior of the Timer/Counter is unpredictable.
The C/Tx# control bit selects Timer operation or Counter operation by selecting the divided-down peripheral clock
or external pin Tx as the source for the counted signal. TRx bit must be cleared when changing the mode of
operation, otherwise the behavior of the Timer/Counter is unpredictable.
For Timer operation (C/Tx#= 0), the Timer register counts the divided-down peripheral clock. The Timer register
is incremented once every peripheral cycle (6 peripheral clock periods). The Timer clock rate is FPER / 6, i.e.
FOSC / 12 in standard mode or FOSC / 6 in X2 mode.
For Counter operation (C/Tx#= 1), the Timer register counts the negative transitions on the Tx external input pin.
The external input is sampled every peripheral cycles. When the sample is high in one cycle and low in the next
one, the Counter is incremented. Since it takes 2 cycles (12 peripheral clock periods) to recognize a negative
transition, the maximum count rate is FPER / 12, i.e. FOSC / 24 in standard mode or FOSC / 12 in X2 mode. There
are no restrictions on the duty cycle of the external input signal, but to ensure that a given level is sampled at
least once before it changes, it should be held for at least one full peripheral cycle.
12.3. Timer 0
Timer 0 functions as either a Timer or event Counter in four modes of operation. Figure 42 to Figure 45 show the
logical configuration of each mode.
Timer 0 is controlled by the four lower bits of TMOD register (see Figure 48) and bits 0, 1, 4 and 5 of TCON
register (see Figure 47). TMOD register selects the method of Timer gating (GATE0), Timer or Counter operation
(T/C0#) and mode of operation (M10 and M00). TCON register provides Timer 0 control functions: overflow flag
(TF0), run control bit (TR0), interrupt flag (IE0) and interrupt type control bit (IT0).
For normal Timer operation (GATE0= 0), setting TR0 allows TL0 to be incremented by the selected input. Setting
GATE0 and TR0 allows external pin INT0# to control Timer operation.
Timer 0 overflow (count rolls over from all 1s to all 0s) sets TF0 flag generating an interrupt request.
It is important to stop Timer/Counter before changing mode.
12.3.1. Mode 0 (13-bit Timer)
Mode 0 configures Timer 0 as an 13-bit Timer which is set up as an 8-bit Timer (TH0 register) with a modulo
32 prescaler implemented with the lower five bits of TL0 register (see Figure 42). The upper three bits of TL0
register are indeterminate and should be ignored. Prescaler overflow increments TH0 register.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com