ht82a836r Holtek Semiconductor Inc., ht82a836r Datasheet - Page 29

no-image

ht82a836r

Manufacturer Part Number
ht82a836r
Description
Usb Audio Mcu
Manufacturer
Holtek Semiconductor Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
HT82A836R
Manufacturer:
HOLTEK/合泰
Quantity:
20 000
not full and the A/D conversion completes, a subroutine
call to location 014H will take place. The Multi-function
Interrupt request flag MFF1 will be reset automatically
and the EMI bit will be cleared to disable other inter-
rupts. The A/D Interrupt flag will not be reset automati-
cally and needs to be reset manually by the application
program.
Serial Interface Interrupt
The device contains an internal Serial Interface with its
own interrupt function. For a Serial Interface Interrupt to
occur, the corresponding Serial Interface Interrupt en-
able bit must be first set. This is bit 0 in the MFI1C regis-
ter and known as ESII. A Serial Interface Interrupt is
generated when a data reception or transmission is
complete, after which the related interrupt request flag,
SIF, which is bit 4 in the MFI1C register, will be set. The
interrupt vector for the Serial Interface Interrupt is the
Multi-function Interrupt, located at 014H. Therefore if the
Multi-function and Serial Interface Interrupt are enabled,
the stack is not full and a serial interface data reception
or transmission is complete, a subroutine call to location
014H will take place. The Multi-function Interrupt re-
quest flag MFF1 will be reset automatically and the EMI
bit will be cleared to disable other interrupts. The Serial
Interface Interrupt flag will not be reset automatically
and needs to be reset manually by the application pro-
gram.
Record Interrupt
For a Record Interrupt to occur, the global interrupt en-
able bit, EMI, and the corresponding Record Interrupt
bit, RECI, must first be set. An actual Record Interrupt
will take place when the Record Interrupt request flag,
RECF, is set, a situation that will occur when the record
data is valid. When the interrupt is enabled, the stack is
not full and a Record Interrupt occurs, a subroutine call
to the Record Interrupt vector at location 18H, will take
place. When the interrupt is serviced, the Record Inter-
rupt request flag, RECF, will be automatically reset and
the EMI bit will be automatically cleared to disable other
interrupts. If the A/D Converter is powered down
(AD_ENB =1), PLL clock disabled (PLLEN=1) or USB
clock disabled (USBCKEN=0), the record interrupt also
be disabled.
Programming Considerations
By disabling the interrupt enable bits, a requested inter-
rupt can be prevented from being serviced, however,
once an interrupt request flag is set, it will remain in this
condition in the interrupt control register until the corre-
sponding interrupt is serviced or until the request flag is
cleared by a software instruction.
It is recommended that programs do not use the CALL
subroutine instruction within the interrupt subroutine.
Interrupts often occur in an unpredictable manner or
Rev. 1.00
29
need to be serviced immediately in some applications. If
only one stack is left and the interrupt is not well con-
trolled, the original control sequence will be damaged
once a CALL subroutine is executed in the interrupt
subroutine.
All of these interrupts have the capability of waking up
the processor when in the Power Down Mode. Only the
Program Counter is pushed onto the stack. If the con-
tents of the accumulator or status register are altered by
the interrupt service program, which may corrupt the de-
sired control sequence, then the contents should be
saved in advance.
Reset and Initialisation
A reset function is a fundamental part of any
microcontroller ensuring that the device can be set to
some predetermined condition irrespective of outside
parameters. The most important reset condition is after
power is first applied to the microcontroller. In this case,
internal circuitry will ensure that the microcontroller, af-
ter a short delay, will be in a well defined state and ready
to execute the first program instruction. After this
power-on reset, certain important internal registers will
be set to defined states before the program com-
mences. One of these registers is the Program Counter,
which will be reset to zero forcing the microcontroller to
begin program execution from the lowest Program
Memory address.
In addition to the power-on reset, situations may arise
where it is necessary to forcefully apply a reset condition
when the microcontroller is running. One example of this
is where after power has been applied and the
microcontroller is already running, the RESET line is
forcefully pulled low. In such a case, known as a normal
operation reset, some of the microcontroller registers
remain unchanged allowing the microcontroller to pro-
ceed with normal operation after the reset line is allowed
to return high. Another type of reset is when the Watch-
dog Timer overflows and resets the microcontroller. All
types of reset operations result in different register con-
ditions being setup.
Another reset exists in the form of a Low Voltage Reset,
LVR, where a full reset, similar to the RESET reset is im-
plemented in situations where the power supply voltage
falls below a certain threshold.
Reset Functions
There are five ways in which a microcontroller reset can
occur, through events occurring both internally and ex-
ternally:
Power-on Reset
The most fundamental and unavoidable reset is the
one that occurs after power is first applied to the
microcontroller. As well as ensuring that the Program
Memory begins execution from the first memory ad-
HT82A836R
March 20, 2008

Related parts for ht82a836r