28 STC12C5Axx
Technical Summary
The PCA interrupt is generated by the logical OR of
CF
,
CCF0
~
CCF1
. The service routine should poll
CF
and
CCF0 ~ CCF1
to determine which one to request service and it will be cleared by software.
The Low Voltage Detect interrupt is shared by the flag
LVDF
in
PCON.5
register. They should be cleared
by software.
The UART2 interrupt is generated by the logical “1” of
S2RI
and
S2TI
. Neither of these flags is cleared
by hardware when the service routine is vectored to. The service routine should poll
S2RI
and
S2TI
to
determine which one to request service and it will be cleared by software.
All of the bits that generate interrupts can be set or cleared by software, with the same result as though it
had been set or cleared by hardware. In other words, interrupts can be generated or pending interrupts
can be canceled in software.
How does the STC12C5Axx take the Interrupts
External interrupt pins and other interrupt sources are sampled at rising edge of each clock cycle. The
samples are polled during the next clock cycle. If one of the flags was in a set condition of the first cycle,
the second cycle of polling cycles will find it and the interrupt system will generate an hardware LCALL to
the appropriate service routine as long as it is not blocked by any of the following conditions.
The 2B
H
interrupt is shared by the logical “1” of ADC interrupt and interrupt. Neither of these flags is
cleared by hardware when the service routine is vectored to. The service routine should poll them to
determine which one to request service and it will be cleared by software.
The 4B
H
interrupt is shared by the logical “1” of SPI interrupt and interrupt. Neither of these flags is
cleared by hardware when the service routine is vectored to. The service routine should poll them to
determine which one to request service and it will be cleared by software.
The 33
H
interrupt is shared by the logical “1” of LVD interrupt (Low-Voltage Detector) interrupt. Neither of
these flags is cleared by hardware when the service routine is vectored to. The service routine should
poll them to determine which one to request service and it will be cleared by software.
The 3B
H
interrupt is shared by the logical “1” of PCA interrupt and interrupt. Neither of these flags is
cleared by hardware when the service routine is vectored to. The service routine should poll them to
determine which one to request service and it will be cleared by software.
All of the bits that generate interrupts can be set or cleared by software, with the same result as though it
had been set or cleared by hardware. In other words, interrupts can be generated or pending interrupts
can be canceled in software.
http://www.DataSheet4U.net/
datasheet pdf - http://www.DataSheet4U.net/