TIMER/COUNTERS AND WATCHDOG TIMER

For timer operation (C/Tx# = 0), the timer register counts the divided-down system clock. The timer register is incremented once every peripheral cycle, i.e., once every six states (see section 2.2.2, “Clock and Reset Unit”). Since six states equals 12 clock cycles, the timer clock rate is FOSC/12. Exceptions are the timer 2 baud rate and clock-out modes, where the timer register is incremented by the system clock divided by two.

For counter operation (C/Tx# = 1), the timer register counts the negative transitions on the Tx ex- ternal input pin. The external input is sampled during every S5P2 state. Section 2.2.2, “Clock and Reset Unit,” describes the notation for the states in a peripheral cycle. When the sample is high in one cycle and low in the next, the counter is incremented. The new count value appears in the register during the next S3P1 state after the transition was detected. Since it takes 12 states (24 oscillator periods) to recognize a negative transition, the maximum count rate is 1/24 of the os- cillator frequency. 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.

Table 8-2. External Signals

Signal

Type

Description

Alternate

Name

Function

 

 

 

 

 

 

T2

I/O

Timer 2 Clock Input/Output. This signal is the external clock input

P1.0

 

 

for the timer 2 capture mode; and it is the timer 2 clock-output for the

 

 

 

clock-out mode.

 

 

 

 

 

T2EX

I

Timer 2 External Input. In timer 2 capture mode, a falling edge

P1.1

 

 

initiates a capture of the timer 2 registers. In auto-reload mode, a

 

 

 

falling edge causes the timer 2 registers to be reloaded. In the up-

 

 

 

down counter mode, this signal determines the count direction:

 

 

 

high = up, low = down.

 

 

 

 

 

INT1:0#

I

External Interrupts 1:0. These inputs set the IE1:0 interrupt flags in

P3.3:2

 

 

the TCON register. TCON bits IT1:0 select the triggering method:

 

 

 

IT1:0 = 1 selects edge-triggered (high-to-low);IT1:0 = 0 selects level-

 

 

 

triggered (active low). INT1:0# also serves as external run control for

 

 

 

timer 1:0 when selected by TCON bits GATE1:0#.

 

 

 

 

 

T1:0

I

Timer 1:0 External Clock Inputs. When timer 1:0 operates as a

P3.5:4

 

 

counter, a falling edge on the T1:0 pin increments the count.

 

 

 

 

 

8.3TIMER 0

Timer 0 functions as either a timer or event counter in four modes of operation. Figures 8-2, 8-3, and 8-4 show the logical configuration of each mode.

Timer 0 is controlled by the four low-order bits of the TMOD register (Figure 8-5) and bits 5, 4, 1, and 0 of the TCON register (Figure 8-6). The TMOD register selects the method of timer gating (GATE0), timer or counter operation (T/C0#), and mode of operation (M10 and M00). The TCON register provides timer 0 control functions: overflow flag (TF0), run control (TR0), inter- rupt flag (IE0), and interrupt type control (IT0).

8-3

Page 137
Image 137
Intel 8XC251SQ, 8XC251SA, 8XC251SP, 8XC251SB manual Timer, External Signals, Signal Type Description Alternate Name Function

Embedded Microcontroller, 8XC251SP, 8XC251SA, 8XC251SQ, 8XC251SB specifications

The Intel 8XC251 series of embedded microcontrollers is a family of versatile and powerful devices, designed to meet the demands of a wide range of applications. With models such as the 8XC251SB, 8XC251SQ, 8XC251SA, and 8XC251SP, this series offers unique features while maintaining a high level of performance and reliability.

At the heart of the 8XC251 microcontrollers is the 8051 architecture, which provides a 16-bit processor capable of executing complex instructions efficiently. This architecture not only allows for a rich instruction set but also facilitates programming in assembly language and higher-level languages like C, which are essential for developing sophisticated embedded systems.

One of the significant features of the 8XC251 family is its integrated peripherals, including timer/counters, serial communication interfaces, and interrupt systems. These peripherals enable developers to implement timing functions, data communication, and real-time processing, all of which are crucial in modern embedded applications. The 8XC251SB and 8XC251SQ models, for instance, come equipped with multiple I/O ports that allow for interfacing with other devices and systems, enhancing their functionality in various environments.

The memory architecture of the 8XC251 devices is noteworthy, featuring on-chip ROM, RAM, and EEPROM. The on-chip memory allows for fast access times, which is essential for executing programs efficiently. Moreover, the EEPROM serves as non-volatile memory, enabling the storage of configuration settings and important data that must be retained even when power is lost.

In terms of operating voltage, the 8XC251 devices are designed to operate in a wide range, typically between 4.0V and 6.0V. This flexibility makes them suitable for battery-powered applications, where energy efficiency is critical. The power management features, including reduced power modes, further enhance their suitability for portable devices.

Lastly, the 8XC251 series is supported by a wide range of development tools and resources, allowing engineers and developers to streamline the development process. This support, combined with the microcontrollers' robust features, makes the Intel 8XC251 family a reliable choice for various embedded applications, such as industrial automation, automotive systems, and consumer electronics.

Overall, the Intel 8XC251SB, 8XC251SQ, 8XC251SA, and 8XC251SP deliver high performance, versatility, and ease of use, making them a preferred choice for embedded system designers looking to develop efficient and effective solutions.