CHAPTER 8 8/16-BIT CAPTURE TIMER/COUNTER

Count clock selectors 0/1

Circuits that select input clocks. In timer 0 for the 8-bit mode or in the 16-bit mode, count clock selector 0/ 1 can select seven internal clocks and one external clock. In timer 1 for the 8-bit mode, the selector can select only seven internal clocks.

Counter circuits 0/1

Counter circuit 0 and counter circuit 1 each consist of an 8-bit counter, a comparator, a comparator data latch, and data registers (TDR0, TDR1).

The 8-bit counter is incremented according to the selected count clock and clock edge (rising/falling). The comparator compares the counter value with the comparator data latch value. When these values match, the counter is cleared and the data register value is set in (loaded to) the comparator data latch.

In the 8-bit mode, counter circuits 0 and 1 operate independently as timer 0 and timer 1, respectively. In the 16-bit mode, counter circuits 0 and 1 operate as the 16-bit counter in which counter circuit 0 is concatenated as lower 8 bits and counter circuit 1 is concatenated as higher 8 bits.

Square wave output control circuit

When the comparator detects that the counter value matches the comparator data latch value in the 8- or 16- bit mode, an interrupt request is generated. In this case, if square wave output is allowed, the corresponding output control circuit inverts the output of the square wave output pin.

Timer 0/1 data registers (TDR0, TDR1)

TDR0 and TDR1 are used to set the data to be compared with each 8-bit counter value at write.

Timer 0/1 control registers (TCR0, TCR1)

TCR0 and TCR1 are used to select functions, allow and prohibit operations, control interrupts, and check interrupt states.

8/16-bit capture timer/counter interrupt

IRQ3: If the interrupt request output is allowed when the counter value equals the value set in the data register in the interval timer or counter function, an IRQ3 interrupt request is generated. (In timer 0 for the 8-bit mode or in the 16-bit mode, the interrupt request output is allowed when TCR0: T0IEN=1. In timer 1 for the 8-bit mode, the interrupt request output is allowed when TCR1: T1IEN =1.)

8/16-bit capture counter interrupt

IRQ4: If the interrupt request output is allowed each time a capture input edge is detected, an IRQ4 interrupt request is generated. (In timer 0 for the 8-bit mode or in the 16-bit mode, the interrupt request output is allowed when TCCR: TCEN=1.)

Capture data registers (TCPL, TCPH)

TCPL and TCPH store the number of events detected in the capture mode.

When capture data is read in the timer mode, the counter value is also read.

Timer output control register (TCR2)

TCR2 is used to allow and prohibit square wave output and select timer 0 output/timer 1 output.

167

Page 183
Image 183
Fujitsu F202RA, MB89202 manual Count clock selectors 0/1, Counter circuits 0/1, Square wave output control circuit, 167

F202RA, MB89202 specifications

The Fujitsu MB89202 and F202RA microcontrollers are part of the 16-bit microcontroller family, renowned for their robust performance and versatility in a variety of embedded system applications. These devices are tailored for high-efficiency operation across diverse industries, including automotive, consumer electronics, and industrial automation.

One of the main features of the MB89202 is its powerful CPU core, which operates at a clock speed of up to 20 MHz. This enables the microcontroller to perform complex calculations and consumer-grade applications seamlessly. The architecture is designed to handle multiple tasks effectively, making it suitable for real-time operations.

Memory capacity is a vital characteristic of the MB89202, featuring on-chip RAM and ROM configurations. The microcontroller can accommodate different memory variants, providing developers with flexibility in memory allocation based on their application requirements. This adaptability facilitates applications ranging from simple control systems to complex data processing tasks.

The F202RA variant extends the capabilities of the MB89202 by integrating advanced peripheral functions. It includes built-in timers, A/D converters, and serial communication interfaces, which are essential for interfacing with other hardware components or sensors. The availability of these peripherals reduces the need for additional external circuits, thus contributing to a more compact and cost-effective design.

In terms of power management, the MB89202 series employs advanced power-saving technologies. The microcontroller offers various low-power modes, enabling devices to conserve energy during idle times, making it highly suitable for battery-operated applications. This characteristic not only enhances the efficiency of devices but also extends their operational lifespan.

Moreover, the Fujitsu MB89202 series incorporates robust protection features, including watchdog timers and failure detection mechanisms. These safety features ensure reliable operation in critical systems, making them a preferred choice in applications where failure is not an option.

The MB89202 and F202RA microcontrollers also support a range of development tools and environments, including integrated development environments (IDEs) and software libraries, which facilitate rapid application development. With these tools, developers can efficiently prototype, debug, and optimize their applications.

In summary, the Fujitsu MB89202 and F202RA microcontrollers stand out with their efficient performance, extensive memory options, integrated peripherals, and power-saving capabilities, making them ideal for a wide array of embedded applications. Their reliability and robustness further enhance their attractiveness for designers seeking advanced microcontroller solutions.