Intel 80C196NU, 8XC196NP manual Table A-2. Processor Status Word PSW Flags, Mnemonic Description

Models: Microcontroller 80C196NU 8XC196NP

1 471
Download 471 pages 22.3 Kb
Page 309
Image 309

8XC196NP, 80C196NU USER’S MANUAL

 

 

Table A-2. Processor Status Word (PSW) Flags

Mnemonic

 

 

 

Description

 

 

C

The carry flag is set to indicate an arithmetic carry from the MSB of the ALU or the state of

 

the last bit shifted out of an operand. If a subtraction operation generates a borrow, the carry

 

flag is cleared.

 

 

C

 

Value of Bits Shifted Off

 

0

 

< ½ LSB

 

 

1

 

½ LSB

 

 

Normally, the result is rounded up if the carry flag is set. The sticky bit flag allows a finer

 

resolution in the rounding decision.

 

 

C

ST

Value of Bits Shifted Off

 

0

0

= 0

 

 

0

1

> 0 and < ½ LSB

 

 

1

0

= ½ LSB

 

 

1

1

> ½ LSB and < 1 LSB

 

N

The negative flag is set to indicate that the result of an operation is negative. The flag is

 

correct even if an overflow occurs. For all shift operations and the NORML instruction, the

 

flag is set to equal the most-significant bit of the result, even if the shift count is zero.

ST

The sticky bit flag is set to indicate that, during a right shift, a “1” has been shifted into the

 

carry flag and then shifted out. This bit is undefined after a multiply operation. The sticky bit

 

flag can be used with the carry flag to allow finer resolution in rounding decisions. See the

 

description of the carry (C) flag for details.

V

The overflow flag is set to indicate that the result of an operation is too large to be

 

represented correctly in the available space.

 

For shift operations, the flag is set if the most-significant bit of the operand changes during

 

the shift. For divide operations, the quotient is stored in the low-order half of the destination

 

operand and the remainder is stored in the high-order half. The overflow flag is set if the

 

quotient is outside the range for the low-order half of the destination operand. (Chapter 4,

 

“Programming Considerations,” defines the operands and possible values for each.)

 

Instruction

Quotient Stored in:

V Flag Set if Quotient is:

 

DIVB

Short-Integer

< –128 or > +127 (< 81H or > 7FH)

 

DIV

Integer

< –32768 or > +32767 (< 8001H or > 7FFFH)

 

DIVUB

Byte

> 255 (FFH)

 

DIVU

Word

> 65535 (FFFFH)

VT

The overflow-trap flag is set when the overflow flag is set, but it is cleared only by the CLRVT,

 

JVT, and JNVT instructions. This allows testing for a possible overflow at the end of a

 

sequence of related arithmetic operations, which is generally more efficient than testing the

 

overflow flag after each operation.

 

Z

The zero flag is set to indicate that the result of an operation was zero. For multiple-precision

 

calculations, the zero flag cannot be set by the instructions that use the carry bit from the

 

previous calculation (e.g., ADDC, SUBC). However, these instructions can clear the zero

 

flag. This ensures that the zero flag will reflect the result of the entire operation, not just the

 

last calculation. For example, if the result of adding together the lower words of two double

 

words is zero, the zero flag would be set. When the upper words are added together using

 

the ADDC instruction, the flag remains set if the result is zero and is cleared if the result is not

 

zero.

 

 

 

A-4

Page 309
Image 309
Intel 80C196NU, 8XC196NP manual Table A-2. Processor Status Word PSW Flags, Mnemonic Description, Value of Bits Shifted Off

Microcontroller, 80C196NU, 8XC196NP specifications

The Intel 8XC196NP and 80C196NU microcontrollers are part of Intel's renowned 16-bit microcontroller series that gained popularity in the 1980s and 1990s for embedded systems applications. Designed for a variety of applications, these microcontrollers are characterized by their robust performance, versatility, and industry-standard architecture.

The 8XC196NP features an enhanced instruction set with over 100 instructions, allowing for efficient code execution. It operates at clock speeds up to 16 MHz, which contributes to improved performance in time-sensitive applications. The microcontroller is equipped with a 16-bit data bus, enabling more efficient data handling compared to its 8-bit predecessors, thus accommodating complex algorithms and large data sets.

In terms of memory architecture, the 8XC196NP supports an addressable memory space of up to 64 KB of program memory and 64 KB of data memory. This configuration provides sufficient space for large applications while ensuring fast data access. The microcontroller includes integrated features such as timers, serial I/O capabilities, and interrupt processing, which enhance its functionality for real-time applications and control mechanisms.

The 80C196NU, on the other hand, is designed for lower power operation, making it suitable for battery-powered devices. This microcontroller maintains similar features to the 8XC196NP while offering advancements that support low-power consumption. The 80C196NU can also function in a range of temperature environments, making it adaptable for industrial applications.

Both the 8XC196NP and 80C196NU support external memory interfacing, allowing designers to expand the system's capability by connecting additional ROM and RAM. This flexibility makes them appealing for developing complex systems, such as motor controls, industrial automation, and consumer electronics.

Another standout feature of these microcontrollers is their built-in debugging capabilities. Intel provided hardware and software tools that enabled developers to test and troubleshoot their applications effectively, reducing the development time and increasing reliability.

Overall, the Intel 8XC196NP and 80C196NU microcontrollers stand out for their dependability, versatility, and performance, contributing significantly to the evolution of embedded system design. Their legacy continues to influence modern microcontroller technology, ensuring their relevance in a wide array of applications today.