LCD Type MCU
Note
PC13~PC8: Current Program Counter bits.
@7~@0: PCL bits.
BP.5: Bank Pointer bit.
#12~#0: Instruction code bits.
S13~S0: Stack register bits.
For the HT49RU80/HT49CU80, the Program Counter is 14 bits wide, i.e. from b13~b0.
For the HT49R50A-1/HT49C50-1/HT49C50L, since their Program Counter is 12 bits wide,
the b12 column in the table is not applicable.
8. For the HT49R30A-1/HT49C30-1/HT49C30L, since their Program Counter is 11 bits wide,
the b11 and b12 columns in the table are not applicable.
9. The Timer/Event Counter 1 Overflow row is available only for the HT49R50A-1/HT49C50-1/
HT49C50L, HT49R70A-1/HT49C70-1/HT49C70L and HT49RU80/HT49CU80.
10. For the HT49R30A-1/HT49C30-1/HT49C30L the Timer/Event Counter 0 represents
the single timer.
11. The UART Bus interrupt and Multi-function interrupt are available only for the HT49RU80/
HT49CU80 devices.
1.
2.
3.
4.
5.
6.
7.
Stack
This is a special part of the memory which is used to save the contents of the Program Counter
only. The stack can have between 4, 6 or 16 levels depending upon which device is selected and is
neither part of the data nor part of the program space, and is neither readable nor writable. The acti-
vated level is indexed by the Stack Pointer (SP) and is neither readable nor writable. At a subrou-
tine call or interrupt acknowledge signal, the contents of the Program Counter are pushed onto the
stack. At the end of a subroutine or an interrupt routine, signaled by a return instruction (RET or
RETI), the Program Counter is restored to its previous value from the stack. After a chip reset, the
Stack Pointer will point to the top of the stack.
If the stack is full and an enabled interrupt takes place, the interrupt request flag will be recorded
but the acknowledge signal will be inhibited. When the Stack Pointer is decremented (by RET or
RETI), the interrupt will be serviced. This feature prevents stack overflow allowing the program-
mer to use the structure more easily. However, when the stack is full, a
²CALL
subroutine² instruc-
tion can still be executed which will result in a stack overflow. Precautions should be taken to avoid
such cases which might cause unpredictable program branching.
P ro g ra m
C o u n te r
T o p o f S T A C K
S ta c k
P o in te r
S ta c k L e v e l 1
S ta c k L e v e l 2
S ta c k L e v e l 3
P ro g ra m
M e m o ry
B a n k P o in te r
B o tto m
o f S T A C K
S ta c k L e v e l N
24
Home Index Bookmark Pages Text
Previous Next
Pages: Home Index