EasyManua.ls Logo

Holtek HT48R70A-1 - Interrupt Control Registers - INTC, INTC0, INTC1; Timer;Event Counter Registers; Input;Output Ports and Control Registers

Default Icon
174 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Interrupt Control Registers - INTC, INTC0, INTC1
These 8-bit registers control the operation of both the external and internal interrupts. For the
HT48RU80/HT48CU80 devices there are two interrupt control registers, known as INTC0 and
INTC1, while for the other devices there is only one interrupt control register, known as INTC. By
setting various bits within these registers using standard bit manipulation instructions, the en
-
able/disable function of the external interrupts and each of the internal interrupts can be independ
-
ently controlled. A master interrupt bit within these registers, the EMI bit, acts like a global
enable/disable and is used to set all of the interrupt enable bits on or off. This bit is cleared when
an interrupt routine is entered to disable further interrupt and is set by executing the ²RETI² instruc
-
tion.
Note
In situations where other interrupts may require servicing within present interrupt service routines,
the EMI bit can be manually set by the program after the present interrupt service routine has been
entered.
Timer/Event Counter Registers
Depending upon which device is selected, all devices contain one, two or three integrated
Timer/Event Counters of either 8-bit or 16-bit size. For the HT48R10A-1/HT48C10-1 and
HT48R30A-1/HT48C30-1 devices, which have a single 8-bit Timer/Event Counter, an associated
register known as TMR is the location where the timer¢s 8-bit value is located. An associated con
-
trol register, known as TMRC, contains the setup information for this timer. The HT48R50A-1/
HT48C50-1 devices contain a single 8-bit Timer/Event Counter with an associated register known
as TMR0, and a single 16-bit Timer/Event Counter with an associated register pair known as
TMR1L/TMR1H, where the timer¢s values are located. Two associated control registers, known as
TMR0C and TMR1C contain the setup information for these two timers. The HT48R70A-1/
HT48C70-1 devices contain two 16-bit Timer/Event Counters with two associated register pairs,
known as TMR0L/TMR0H and TMR1L/TMR1H, where the timer¢s 16-bit values are located. Two
associated control registers, known as TMR0C and TMR1C contain the setup information for
these two timers. Like the HT48R70A-1/HT48C70-1 devices, the HT48RU80/HT48CU80 devices
also contain two 16-bit Timer/Event Counters with the same register names. However, they also
contain an additional 8-bit Timer/Event Counter with an associated timer register known as TMR2
and timer control register known as TMR2C. Note that all timer registers can be directly written to
in order to preload their contents with fixed data to allow different time intervals to be setup.
Input/Output Ports and Control Registers
Within the area of Special Function Registers, the I/O registers and their associated control regis
-
ters play a prominent role. All I/O ports have a designated register correspondingly labeled as PA,
PB, PC, etc. These labeled I/O registers are mapped to specific addresses within the Data Mem
-
ory as shown in the Data Memory table which are used to transfer the appropriate output or input
data on that port. With each I/O port there is an associated control register labeled PAC, PBC,
PCC, etc., also mapped to specific addresses with the Data Memory. The control register specifies
which pins of that port are set as inputs and which are set as outputs. To setup a pin as an input,
the corresponding bit of the control register must be set high, for an output it must be set low. Dur
-
ing program initialization, it is important to first setup the control registers to specify which pins are
outputs and which are inputs before reading data from or writing data to the I/O ports. One flexible
Chapter 1 Hardware Structure
35

Table of Contents

Related product manuals