| Electronic Components Datasheet Search |
|
ATPL00B Datasheet(PDF) 49 Page - ATMEL Corporation |
|
|
|||||||||||||||||||||||||||||
ATPL00B Datasheet(HTML) 49 Page - ATMEL Corporation |
|
49 / 152 page ![]() Atmel ATPL00B [datasheet] 43028A-ATPL - 9/12 49 5. Timers The ADD8051C3A has a full set of timers, listed below: Two 16-bit configurable Timers/Counters: Timer 0 and Timer 1 that can be configured as timers or event counters. Three 8-bit auto reload counters Timers 11, 12 and 14, used as baud rate generators for uarts 0, 1 and 2 respectively (see Standard Serial Interfaces section). One 8-bit, with 18-bit preescaler, watchdog timer: Timer 3 (see Watchdog (timer 3) section). One 16-bit Timer/Counter Timer 2 with capture reload hardware (see 5.2) 5.1 Timer 0 and Timer 1 Timers 0 and 1 have 2-bit preescalers. These preescalers can be programmed to slow down count rate. The reset value set the preescaler values to the slowest count rate and the real count rate of the timers is the same than the timers in an “8051 legacy” microcontroller (12 clock cycles per machine cycle). TPR, TMOD and TCON registers described below are involved in timer 0 and timer 1 management. Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 B it 0 TPR -- -- T1P1 T1P0 T01P1 T01P0 T0P1 T0P0 --: Reserved bit T1P(1:0): Rollover value for T1 preescaler when T1 is in modes 0, 1, 2 and 3 T01P(1:0): Rollover value for TH0 preescaler when T0 is in mode 3 T0P(1:0): Rollover value for T0 preescaler when T0 is in modes 0, 1, and 2, and for TL0 preescaler when T0 is in mode 3 When T0 or T1 are in the timer function, the registers are incremented every 1, 2, 3 or 4 machine cycles. Since a machine cycle consists of 3 oscillator periods, the count rate is 1/3, 1/6, 1/9 or 1/12 of the oscillator frequency. In the counter function, the register is incremented in response to a 1-to-0 transition at its corresponding external input pin, T0(P3.4) or T1(P3.5). When in counter function, the external input is sampled once every machine cycle. When the samples show a high in one cycle and a low in the next cycle (1-to-0 transition), the count is incremented. The register value is updated during the cycle following the one in which the transition was detected, the maximum count rate is 1/2 of the machine cycle frequency. Either the timer or counter function is selected by control bit C/T in the Special Function Register TMOD where T0 and T1 have four operating modes, which are selected by bit-pairs (M1, M0) in TMOD. TIMER 1 TIMER 0 Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 B it 0 TMOD GATE C/T M1 M0 GATE C/T M1 M0 GATE: „1‟: Enables gate control. Device count is enabled only when both „INTi‟ pin and “TCON.TRi” are high. „0‟: Disables gate control. Device count is enabled when “TCON.TRi” is high. C/T: „1‟: Counter operation mode. Input from Ti input pin |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| 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 |