English
Language : 

UPD17P133 Datasheet, PDF (137/289 Pages) NEC – 4-BIT SINGLE-CHIP MICROCONTROLLER
CHAPTER 13 PERIPHERAL HARDWARE
Figure 13-3. Setting the Count Value in a Modulo Register
Example of setting count value 64H in timer modulo register
CONTDATL
CONTDATH
DAT
DAT
MOV
MOV
PUT
4H
; CONTDATL is assigned to 4H using the symbol definition instruction.
6H
; CONTDATH is assigned to 6H using the symbol definition instruction.
DBF0, #CONTDATL;
DBF1, #CONTDATH;
TMM, DBF
; The value is transferred with reserved word TMM.
Data Buffer
DBF3
DBF2
DBF1
DBF0
b3 b2 b1 b0 b3 b2 b1 b0 b3 b2 b1 b0 b3 b2 b1 b0
Don't care
Don't care
01100100
8-bit data
PUT TMM, DBF
TMM (Peripheral Address 03H)
b7 b6 b5 b4 b3 b2 b1 b0
0 1100 1 00
Caution The range of values that can be set in the module register is 01H to FFH. If 00H is set, normal
counting operation is not performed.
The modulo register is for writing only. If is not possible to read a value from the modulo register. Neither is
it possible, while the 8-bit timer counter is in operation, to stop the counting operation even by executing the PUT
TMM and DBF instructions.
122