Datasheet AT89S53 (Microchip) - 6

FabricanteMicrochip
Descripción8-bit Microcontroller with 12K Bytes Flash
Páginas / Página35 / 6 — Special Function Registers. Timer 2 Registers. Watchdog Control Register. …
Formato / tamaño de archivoPDF / 892 Kb
Idioma del documentoInglés

Special Function Registers. Timer 2 Registers. Watchdog Control Register. Table 2. Symbol. Function. AT89S53

Special Function Registers Timer 2 Registers Watchdog Control Register Table 2 Symbol Function AT89S53

Línea de modelo para esta hoja de datos

Versión de texto del documento

link to page 5 link to page 6 link to page 11 link to page 7
Special Function Registers
A map of the on-chip memory area called the Special Func-
Timer 2 Registers
Control and status bits are contained in tion Register (SFR) space is shown in Table 1. registers T2CON (shown in Table 2) and T2MOD (shown in Note that not all of the addresses are occupied, and unoc- Table 9) for Timer 2. The register pair (RCAP2H, RCAP2L) cupied addresses may not be implemented on the chip. are the Capture/Reload registers for Timer 2 in 16-bit cap- Read accesses to these addresses will in general return ture mode or 16-bit auto-reload mode. random data, and write accesses will have an indeterminate
Watchdog Control Register
The WCON register contains effect. control bits for the Watchdog Timer (shown in Table 3). The User software should not write 1s to these unlisted loca- DPS bit selects one of two DPTR registers available. tions, since they may be used in future products to invoke new features. In that case, the reset or inactive values of the new bits will always be 0.
Table 2.
T2CON—Timer/Counter 2 Control Register T2CON Address = 0C8H Reset Value = 0000 0000B Bit Addressable TF2 EXF2 RCLK TCLK EXEN2 TR2 C/T2 CP/RL2 Bit 7 6 5 4 3 2 1 0
Symbol Function
TF2 Timer 2 overflow flag set by a Timer 2 overflow and must be cleared by software. TF2 will not be set when either RCLK = 1 or TCLK = 1. EXF2 Timer 2 external flag set when either a capture or reload is caused by a negative transition on T2EX and EXEN2 = 1. When Timer 2 interrupt is enabled, EXF2 = 1 will cause the CPU to vector to the Timer 2 interrupt routine. EXF2 must be cleared by software. EXF2 does not cause an interrupt in up/down counter mode (DCEN = 1). RCLK Receive clock enable. When set, causes the serial port to use Timer 2 overflow pulses for its receive clock in serial port Modes 1 and 3. RCLK = 0 causes Timer 1 overflows to be used for the receive clock. TCLK Transmit clock enable. When set, causes the serial port to use Timer 2 overflow pulses for its transmit clock in serial port Modes 1 and 3. TCLK = 0 causes Timer 1 overflows to be used for the transmit clock. EXEN2 Timer 2 external enable. When set, allows a capture or reload to occur as a result of a negative transition on T2EX if Timer 2 is not being used to clock the serial port. EXEN2 = 0 causes Timer 2 to ignore events at T2EX. TR2 Start/Stop control for Timer 2. TR2 = 1 starts the timer. C/T2 Timer or counter select for Timer 2. C/T2 = 0 for timer function. C/T2 = 1 for external event counter (falling edge triggered). CP/RL2 Capture/Reload select. CP/RL2 = 1 causes captures to occur on negative transitions at T2EX if EXEN2 = 1. CP/RL2 = 0 causes automatic reloads to occur when Timer 2 overflows or negative transitions occur at T2EX when EXEN2 = 1. When either RCLK or TCLK = 1, this bit is ignored and the timer is forced to auto-reload on Timer 2 overflow.
6 AT89S53
0787E–MICRO–3/06 Document Outline Block Diagram Instruction Set Features Description Pin Description VCC GND Port 0 Port 1 Pin Description Port 2 Port 3 RST ALE/PROG PSEN EA/VPP XTAL1 XTAL2 Special Function Registers Data Memory - RAM Programmable Watchdog Timer Timer 0 and 1 Timer 2 Capture Mode Auto-reload (Up or Down Counter) Baud Rate Generator Programmable Clock Out UART Serial Peripheral Interface Interrupts Oscillator Characteristics Idle Mode Status of External Pins During Idle and Power-down Modes Power-down Mode Program Memory Lock Bits Lock Bit Protection Modes(1)(2) Programming the Flash Programming Interface Serial Downloading Either an external system clock is supplied at pin XTAL1 or a crystal needs to be connected across pins XTAL1 and XTAL2. The max... Serial Programming Algorithm Serial Programming Instruction Flash Parallel Programming Modes Flash Programming and Verification Characteristics - Parallel Mode Flash Programming and Verification Waveforms - Parallel Mode Serial Downloading Waveforms Absolute Maximum Ratings* DC Characteristics AC Characteristics External Program and Data Memory Characteristics External Program Memory Read Cycle External Data Memory Read Cycle External Data Memory Write Cycle External Clock Drive Waveforms External Clock Drive Serial Port Timing: Shift Register Mode Test Conditions Shift Register Mode Timing Waveforms AC Testing Input/Output Waveforms(1) Float Waveforms(1) Ordering Information Pin Configurations