English
Language : 

HT66F4360 Datasheet, PDF (25/263 Pages) Holtek Semiconductor Inc – Smart Card Reader Flash MCU
HT66F4360/HT66F4370/HT66F4390
Smart Card Reader Flash MCU
1
MOV A,[12H]
2
CALL DELAY
3
CPL [12H]
4
:
5
:
6 DELAY: NOP
Fetch Inst. 1
Execute Inst. 1
Fetch Inst. 2
Execute Inst. 2
Fetch Inst. 3
Flush Pipeline
Fetch Inst. 6
Execute Inst. 6
Fetch Inst. 7
Instruction Featching
Program Counter
During program execution, the Program Counter is used to keep track of the address of the
next instruction to be executed. It is automatically incremented by one each time an instruction
is executed except for instructions, such as “JMP” or “CALL” that demand a jump to a non-
consecutive Program Memory address. As these devices memory capacity are greater than 8K
words, the Program Memory address may be located in a certain program memory bank which
is selected by the program memory bank pointer bit, PBPn. Only the lower 8 bits, known as the
Program Counter Low Register, are directly addressable by the application program.
When executing instructions requiring jumps to non-consecutive addresses such as a jump
instruction, a subroutine call, interrupt or reset, etc., the microcontroller manages program control
by loading the required address into the Program Counter. For conditional skip instructions, once
the condition has been met, the next instruction, which has already been fetched during the present
instruction execution, is discarded and a dummy cycle takes its place while the correct instruction is
obtained.
Device
HT66F4360
HT66F4370
HT66F4390
Program Counter
High Byte
Low Byte (PCL)
PBP0, PC12~PC8
PBP1~PBP0, PC12~PC8
PBP2~PBP0, PC12~PC8
PC7~PC0
PC7~PC0
PC7~PC0
Program Counter
The lower byte of the Program Counter, known as the Program Counter Low register or PCL, is
available for program control and is a readable and writeable register. By transferring data directly
into this register, a short program jump can be executed directly; however, as only this low byte
is available for manipulation, the jumps are limited to the present page of memory that is 256
locations. When such program jumps are executed it should also be noted that a dummy cycle
will be inserted. Manipulating the PCL register may cause program branching, so an extra cycle is
needed to pre-fetch.
Stack
This is a special part of the memory which is used to save the contents of the Program Counter
only. The stack has multiple levels and is neither part of the data nor part of the program space,
and is neither readable nor writeable. The activated level is indexed by the Stack Pointer, and is
neither readable nor writeable. At a subroutine 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 device reset, the Stack Pointer will point to the top of the stack.
Rev. 1.30
25
December 15, 2016