em78p164n ELAN Microelectronics Corp, em78p164n Datasheet - Page 43

no-image

em78p164n

Manufacturer Part Number
em78p164n
Description
8-bit Microcontroller With Otp Rom
Manufacturer
ELAN Microelectronics Corp
Datasheet
Product Specification (V1.4) 05.28.2010
(This specification is subject to change without further notice)
5.8.2 Function Description
The following figure shows the TMRX block diagram followed by descriptions of its
signals and blocks:
Fosc: Input clock
Prescaler (TP2, TP1 and TP0 ): The Options 1:1, 1:2, 1:4, 1:8, 1:16, 1:64, 1:128, and
TMR (TMRH/TMRL): Timer register; TMR is increased until it matches with PRD, and
PRD: PWM time period register.
Comparator: Reset TMR while a match occurs. The TMRIF flag is set at the same
5.8.3 Programming the Related Registers
When defining TMR, refer to the operation of its related registers as shown in the table
below. It must be noted that the PWM bits must be disabled if their related TMR are
employed. That is, Bit 4 of the PWMCON register must be set to ‘0’.
5.8.3.1
5.8.4 Timer Programming Process/Steps
1. Load PRD with the Timer duration
2. Enable interrupt function by writing IOCF0, if required
3. Load a desired TMR prescaler value to PWMCON, enable TMR and disable PWM
Addr.
0x0B
1:256 are defined by TMR. It is cleared when any type of reset occurs.
then is reset to 1 (default valve).
time.
PWMCON/RB CPOUT COS1
TMR Related Control Registers
Name
Bit 7
Figure 5-14 TMRX Block Diagram
Bit 6
COS0
Bit 5
8-Bit Microcontroller with OTP ROM
PWME
Bit 4
Bit 3
TEN
Bit 2
TP2
EM78P164N
Bit 1
TP1
Bit 0
TP0
• 37

Related parts for em78p164n