
For instructions involving branches, such as jump or call instructions, two machine cycles are re-
quired to complete instruction execution. An extra cycle is required as the program takes one cy-
cle to first obtain the actual jump or call address and then another cycle to actually execute the
branch. The requirement for this extra cycle should be taken into account by programmers in tim-
ing sensitive applications.
Program Counter
During program execution, the Program Counter is used to keep track of the address of the next in-
struction to be executed. It is automatically incremented by one each time an instruction is exe-
cuted except for instructions, such as
²
JMP
²
or
²
CALL
²
that demand a jump to a non-consecutive
Program Memory address. For the Cost-Effective I/O series, the Program Counter is 9 bits wide
for the HT48R05A-1/HT48C05, 10 bits wide for HT48R06A-1/HT48C06 and HT48R07A-1/
HT48C07 devices and 11 bits wide for the HT48R08A-1/HT48C08 and HT48R09A-1/HT48C09 de-
vices. However, it must be noted that only the lower 8 bits, known as the Program Counter Low
Register, are directly addressable by user.
When executing instructions requiring jumps to non-consecutive addresses, such as a jump in-
struction, 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 pres-
ent instruction execution, is discarded and a dummy cycle takes its place while the correct instruc-
tion is obtained.
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 writable 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 loca-
tions. When such program jumps are executed it should also be noted that a dummy cycle will be
inserted.
Note
The lower byte of the Program Counter is fully accessible under program control. The use of the
PCL might cause program branching, so an extra cycle is needed to pre-fetch. Further information
on the PCL register can be found in the Special Function Register section.
12
Cost-Effective I/O Type MCU
F e t c h I n s t . 1
E x e c u t e I n s t . 1
F e t c h I n s t . 2
F l u s h P i p e l i n e
1
2
3
4
5
6
D E L A Y :
M O V A , [ 1 2 H ]
C A L L D E L A Y
C P L [ 1 2 H ]
:
:
N O P
E x e c u t e I n s t . 2
F e t c h I n s t . 3
F e t c h I n s t . 6
E x e c u t e I n s t . 6
F e t c h I n s t . 7
Summary of Contents for HT48R05A-1
Page 7: ...vi Cost Effective I O Type MCU...
Page 8: ...P a r t I Microcontroller Profile Part I Microcontroller Profile 1...
Page 9: ...2 Cost Effective I O Type MCU...
Page 52: ...P a r t I I Programming Language Part II Programming Language 45...
Page 53: ...46 Cost Effective I O Type MCU...
Page 59: ...52 Cost Effective I O Type MCU...
Page 90: ...P a r t I I I Development Tools Part III Development Tools 83...
Page 91: ...84 Cost Effective I O Type MCU...
Page 101: ...94 Cost Effective I O Type MCU...
Page 104: ...Appendix Appendix 97...
Page 105: ...98 Cost Effective I O Type MCU...
Page 115: ...108 Cost Effective I O Type MCU...
Page 116: ...A p p e n d i x B Package Information Appendix B Package Information 109 B...
Page 123: ...116 Cost Effective I O Type MCU...
Page 125: ...Amendments...