ht82m9aae Holtek Semiconductor Inc., ht82m9aae Datasheet - Page 34

no-image

ht82m9aae

Manufacturer Part Number
ht82m9aae
Description
Usb Mouse Encoder 8-bit Mcu With Eeprom
Manufacturer
Holtek Semiconductor Inc.
Datasheet
CPLA [m]
Description
Operation
Affected flag(s)
DAA [m]
Description
Operation
Affected flag(s)
DEC [m]
Description
Operation
Affected flag(s)
DECA [m]
Description
Operation
Affected flag(s)
Rev. 1.20
Complement data memory and place result in the accumulator
Each bit of the specified data memory is logically complemented (1¢s complement). Bits
which previously contained a 1 are changed to 0 and vice-versa. The complemented result
is stored in the accumulator and the contents of the data memory remain unchanged.
ACC ¬ [m]
Decimal-Adjust accumulator for addition
The accumulator value is adjusted to the BCD (Binary Coded Decimal) code. The accumu-
lator is divided into two nibbles. Each nibble is adjusted to the BCD code and an internal
carry (AC1) will be done if the low nibble of the accumulator is greater than 9. The BCD ad-
justment is done by adding 6 to the original value if the original value is greater than 9 or a
carry (AC or C) is set; otherwise the original value remains unchanged. The result is stored
in the data memory and only the carry flag (C) may be affected.
If ACC.3~ACC.0 >9 or AC=1
then [m].3~[m].0 ¬ (ACC.3~ACC.0)+6, AC1=AC
else [m].3~[m].0 ¬ (ACC.3~ACC.0), AC1=0
and
If ACC.7~ACC.4+AC1 >9 or C=1
then [m].7~[m].4 ¬ ACC.7~ACC.4+6+AC1,C=1
else [m].7~[m].4 ¬ ACC.7~ACC.4+AC1,C=C
Decrement data memory
Data in the specified data memory is decremented by 1.
[m] ¬ [m]-1
Decrement data memory and place result in the accumulator
Data in the specified data memory is decremented by 1, leaving the result in the accumula-
tor. The contents of the data memory remain unchanged.
ACC ¬ [m]-1
TO
TO
TO
TO
¾
¾
¾
¾
PDF
PDF
PDF
PDF
¾
¾
¾
¾
OV
OV
OV
OV
¾
¾
¾
¾
34
¾
Z
Z
Z
Z
Ö
Ö
Ö
AC
AC
AC
AC
¾
¾
¾
¾
HT82M9AEE/HT82M9AAE
¾
¾
¾
C
C
C
C
Ö
August 13, 2007

Related parts for ht82m9aae