HT48CA0-2 Holtek Semiconductor, HT48CA0-2 Datasheet - Page 6

no-image

HT48CA0-2

Manufacturer Part Number
HT48CA0-2
Description
(HT48RA0-2 / HT48CA0-2) Remote Type 8-Bit MCU
Manufacturer
Holtek Semiconductor
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
HT48CA0-200J
Manufacturer:
HOLTEK/合泰
Quantity:
20 000
Part Number:
HT48CA0-201T
Manufacturer:
HOLTEK/合泰
Quantity:
20 000
www.DataSheet4U.com
Arithmetic and Logic Unit - ALU
This circuit performs 8-bit arithmetic and logic operation.
The ALU provides the following functions.
The ALU not only saves the results of a data operation but
also changes the contents of the status register.
Status Register - STATUS
This 8-bit status register (0AH) contains the zero flag
(Z), carry flag (C), auxiliary carry flag (AC), overflow flag
(OV), power down flag (PDF) and watchdog time-out
flag (TO). It also records the status information and con-
trols the operation sequence.
With the exception of the TO and PDF flags, bits in the
status register can be altered by instructions like most
other register. Any data written into the status register
will not change the TO or PDF flags. In addition it should
be noted that operations related to the status register
may give different results from those intended. The TO
and PDF flags can only be changed by the Watchdog
Timer overflow, chip power-up, clearing the Watchdog
Timer and executing the HALT instruction.
The Z, OV, AC and C flags generally reflect the status of
the latest operations.
In addition, on executing the subroutine call, the status
register will not be automatically pushed onto the stack.
If the contents of the status are important and if the sub-
routine can corrupt the status register, precautions must
be taken to save it properly.
Rev. 1.50
Arithmetic operations (ADD, ADC, SUB, SBC, DAA)
Logic operations (AND, OR, XOR, CPL)
Rotation (RL, RR, RLC, RRC)
Increment and Decrement (INC, DEC)
Branch decision (SZ, SNZ, SIZ, SDZ ....)
Labels
C
AC
Z
OV
PDF
TO
Bits
6~7
0
1
2
3
4
5
C is set if the operation results in a carry during an addition operation or if a borrow does not
take place during a subtraction operation; otherwise C is cleared. C is also affected by a rotate
through carry instruction.
AC is set if the operation results in a carry out of the low nibbles in addition or no borrow from
the high nibble into the low nibble in subtraction; otherwise AC is cleared.
Z is set if the result of an arithmetic or logic operation is zero; otherwise Z is cleared.
OV is set if the operation results in a carry into the highest-order bit but not a carry out of the
highest-order bit, or vice versa; otherwise OV is cleared.
PDF is cleared when either a system power-up or executing the CLR WDT instruction. PDF is
set by executing the HALT instruction.
TO is cleared by a system power-up or executing the CLR WDT or HALT instruction. TO is set
by a WDT time-out.
Unused bit, read as 0
Status Register
6
Oscillator Configuration
There are two oscillator circuits implemented in the
microcontroller.
Both are designed for system clocks; the RC oscillator
and the Crystal oscillator, which are determined by code
options. No matter what oscillator type is selected, the
signal provides the system clock. The HALT mode stops
the system oscillator and ignores the external signal to
conserve power.
If an RC oscillator is used, an external resistor between
OSC1 and VSS in needed and the resistance must
range from 51k to 1M . The system clock, divided by
4, is available on OSC2, which can be used to synchro-
nize external logic. The RC oscillator provides the most
cost effective solution. However, the frequency of the
oscillation may vary with V
itself due to process variations. It is, therefore, not suit-
able for timing sensitive operations where accurate os-
cillator frequency is desired.
If the Crystal oscillator is used, a crystal across OSC1
and OSC2 is needed to provide the feedback and phase
shift for the oscillator. No other external components are
needed. Instead of a crystal, the resonator can also be
connected between OSC1 and OSC2 to get a frequency
reference, but two external capacitors in OSC1 and
OSC2 are required.
Function
HT48RA0-2/HT48CA0-2
System Oscillator
DD
, temperature and the chip
July 23, 2004

Related parts for HT48CA0-2