User guide

54
SmartBook for Renesas R8C/Tiny Microcontrollers
www.MightyMicons.com
interrupts are controlled by the KEIN register, which keeps
the details like interrupt enabling/disabling and the polarity
type.
Along with four port lines, a key matrix of 4 x 4 size can be
easily realized using these key interrupts. The 16 keys are
connected at the intersection of four rows using the port lines and
four key interrupt lines configured as columns. When a key is pressed,
at any key interrupt line, an interrupt is generated, which prompts the
micon to service a routine that may identify the exact key to proceed further.
In the applications, these key interrupt lines can be used in Key-on-Wake-up
function to get the micon active from the wait or stop modes.
5.5.5 Software Support for the Interrupt Operations.
The versatile and flexible interrupt facilities are properly complemented with a set
of special instructions which make these interrupt calls fast and easy using
minimum code. Here, you may come to know about few relevant instructions to
understand the interrupt processing power of the R8C/Tiny micon.
There is a single instruction available (PUSHM and POPM), to push and pop all
important registers in a single shot using a single instruction with minimum code.
Then you can move and locate the interrupt vector table as per your convenience
anywhere in the memory space. It is an useful feature when handling more tasks.
There is another interesting instruction, STCTX, available to make the designers
life easy when incorporating full-fledged multi tasking environment in their designs.
When managing multiple tasks, this instruction stores the context ( all the required
registers meant for the task ) of any task in the memory in a single shot using
only one instruction. The complementary instruction, LDCTX, retrieves the context
from memory with the minimum code.
Combination of these power interrupts and flexible instructions makes the
complicated process of managing multiple tasks look like a breeze.
D
a
t
a
4
D
e
s
i
g
n
There is a single
instruction avail-
able (PUSHM
and POPM),
to push and
pop all
important registers in a
single shot with mini-
mum code.