CHAPTER 3 CPU

3.2.1Condition Code Register (CCR)

The condition code register (CCR) is the lower 8 bits of the program status register (PS). The condition code register consists of bits (C, V, Z, N, and H) for indicating the results of arithmetic operations or data to be transferred and control bits (I, IL1, and IL0) for controlling the acceptance of interrupt requests.

Configuration of the Condition Code Register (CCR)

Figure 3.2-2 Configuration of Condition Code Register

 

 

 

 

RP

 

 

 

 

 

 

CCR

 

 

 

 

 

bit15 bit14 bit13 bit12 bit11 bit10

bit9

bit8

bit7

bit6

bit5

bit4

bit3

bit2

bit1

bit0

CCR initial value

PS

R4

R3

R2

R1

R0

-

-

-

H

I

IL1

IL0

N

Z

V

C

X011XXXXB

 

 

Half carry flag

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Interrupt enable flag

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Interrupt level bits

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Negative flag

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Zero flag

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Overflow flag

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Carry flag

 

 

 

 

 

 

 

 

 

 

 

 

 

X: Undefined

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Bits for Indicating Arithmetic Operation Results

Half carry flag (H)

When a carry from bit3 to bit4 or a borrow from bit4 to bit3 occurs as a result of an arithmetic operation, the half carry flag is set to "1". Otherwise, the half carry flag is cleared with "0". The half carry flag is intended only for decimal adjustment instructions, and thus should not be used for operations other than addition or subtraction.

Negative flag (N)

When the highest bit becomes "1" as a result of an arithmetic operation, the negative flag is set to "1". When it becomes "0", it is cleared with "0".

Zero flag (Z)

When the result of an arithmetic operation is "0", the zero flag is set to "1". Otherwise, the zero flag is cleared with "0".

Overflow flag (V)

When a complement on 2 overflow occurs as a result of an arithmetic operation, the overflow flag is set to "1". Otherwise, the overflow flag is cleared with "0".

Carry flag (C)

When a carry from bit7 or a borrow to bit7 occurs as a result of an arithmetic operation, the carry flag is set to "1". Otherwise, the carry flag is cleared with "0". The shift instruction causes the value to be shifted out.

29

Page 45
Image 45
Fujitsu F202RA, MB89202 manual Condition Code Register CCR, Bits for Indicating Arithmetic Operation Results

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.