IBM EM78P312N manual Timer Mode, Counter Mode, PDO Mode, Bit Microcontroller

Models: EM78P312N

1 68
Download 68 pages 28.33 Kb
Page 44
Image 44
5.11.1 Timer Mode

EM78P312N

8-Bit Microcontroller

 

 

 

 

TC4M (1,1)

TC4FF

 

 

 

 

 

 

TC4 Interrupt

 

 

 

 

 

F/F

/PWM, /PDO Pin

11

 

 

Clear

 

Clear

 

 

 

Q

fc/2

 

 

TC4M(1,*)

Set

fc/2 7

MUX

8-bit Up-counter

Toggle

fc/2 3

Overflow

 

 

TC4 pin

 

 

 

Match

 

 

 

 

 

 

 

 

 

 

 

 

Comparator

 

 

 

TC4CK

3

 

 

 

 

 

 

 

 

 

 

 

 

TC4S

 

 

 

 

 

 

TC4CR

TCR4

 

 

 

 

 

 

Fig. 5-24

Timer/Counter 4 Configuration

 

5.11.1 Timer Mode

In Timer mode, counting up is performed using the internal clock. When the contents of the up-counter matched with the TCR4, then interrupt is generated and the counter is cleared. Counting up resumes after the counter is cleared.

5.11.2 Counter Mode

In Counter mode, counting up is performed on the rising edge of the external clock input pin (TC4 pin). When the contents of the up-counter matched with the TCR4, then interrupt is generated and the counter is cleared. Counting up resumes after the counter is cleared.

5.11.3 PDO Mode

In Programmable Divider Output (PDO) mode, counting up is performed using the internal clock. The contents of TCR4 are compared with the contents of the up-counter. The F/F output is toggled and the counter is cleared each time a match is found. The F/F output is inverted and output to /PDO pin. This mode can generate 50% duty pulse output. The F/F can be initialized by the program and it is initialized to “0” during a reset. A TC4 interrupt is generated each time the /PDO output is toggled.

Source Clock

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Up-counter

0

1

2

3

n-1

n

0

1

n-1

n

0

1

n-1

n

0

1

2

TCR4

 

n

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

F/F

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

/PDO Pin

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TC4 Interrupt

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Fig. 5-25 Timing Chart for PDO Mode

40

Product Specification (V1.0) 10.03.2006

(This specification is subject to change without further notice)

Page 44
Image 44
IBM EM78P312N manual Timer Mode, Counter Mode, PDO Mode, Bit Microcontroller