3 processor status flags register (psf) -47, 3 processor status flags register (psf) – Maxim Integrated MAXQ7666 User Manual

Page 49

Advertising
background image

Bits 2 to 0: Accumulator Pointer Auto-Increment/Decrement Modulus (MOD2 to MOD0). If these bits are set to a non-zero value,
the accumulator pointer (AP3:AP0) will be automatically incremented or decremented following each arithmetic or logical operation.
The mode for the auto-increment/decrement is determined as follows:

1.4.3 Processor Status Flags Register (PSF)

Register Description:

Processor Status Flags Register

Register Name:

PSF

Register Address:

Module 08h, Index 04h

Bit 7: Zero Flag (Z). The value of this bit flag equals 1 whenever the active accumulator is equal to zero, and it equals 0 otherwise.

Bit 6: Sign Flag (S). This bit flag mirrors the current value of the high bit of the active accumulator (Acc.15).

Bit 5: Reserved. Read 0, write ignored.

Bits 4 and 3: General-Purpose Software Flag 1 and 0 (GPF1 and GPF0). These general-purpose register bits are provided for user
software control.

Bit 2: Overflow Flag (OV). This flag is set to 1 if there is a carry out of bit 14 but not out of bit 15, or a carry out of bit 15 but not out
of bit 14 from the last arithmetic operation, otherwise, the OV flag remains as 0. OV indicates a negative number resulted as the sum
of two positive operands, or a positive sum resulted from two negative operands.

Bit 1: Carry Flag (C). This bit flag is set to 1 whenever an add or subtract operation (ADD, ADDC, SUB, SUBB) returns a carry or bor-
row. This bit flag is cleared to 0 whenever an add or subtract operation does not return a carry or borrow. Many other instructions poten-
tially affect the carry bit. See

Section 14: MAXQ7665/MAXQ7666 Instruction Set Summary for details.

Bit 0: Equals Flag (E). This bit flag is set to 1 whenever a compare operation (CMP) returns an equal result. If a CMP operation returns
not equal, this bit is cleared.

MAXQ7665/MAXQ7666 User’s Guide

1-47

MOD2:MOD0

AUTO-INCREMENT/DECREMENT MODE

000 No

auto-increment/decrement

(default).

001

Increment/decrement AP[0] modulo 2.

010

Increment/decrement AP[1:0] modulo 4.

011

Increment/decrement AP[2:0] modulo 8.

100

Increment/decrement AP modulo 16.

101 to 111

Reserved (modulo 16 when set).

Bit #

7

6

5

4

3

2

1

0

Name Z

S

GPF1

GPF0

OV

C

E

Reset

1 0 0 0 0 0 0 0

Access

r r r

rw

rw r rw

rw

r = read, w = write
Note: This register is cleared to 80h on all forms of reset.

Maxim Integrated

Advertising
This manual is related to the following products: