Timer and Counter Instructions
Example 5:
Flicker Bits
60
1000 TIM 01
1000
1000 TIM 01
0000
0204
1.5 s
Bits can be programmed to turn ON and OFF at a regular interval while a
designated execution condition is ON by using TIM twice. One TIM functions
to turn ON and OFF a specified bit, i.e., the Completion Flag of this TIM turns
the specified bit ON and OFF. The other TIM functions to control the opera-
tion of the first TIM, i.e., when the first TIM's Completion Flag goes ON, the
second TIM is started and when the second TIM's Completion Flag goes ON,
the first TIM is started.
TIM 02
0000
TIM 01
TIM 01
0000
0205
1.0 s
1.5 s
An easier but more limited method of creating a flicker bit is to AND one of
the SR area clock pulse bits with the execution condition that is to be ON
when the flicker bit is operating. Although this method does not use TIM, it is
included here for comparison. This method is more limited because the ON
and OFF times must be the same and they depend on the clock pulse bits
available in the SR area.
0000
1.5 s
1.0 s
1.5 s
Section 5–11
1000
TIM 0100
1.5 s
0204
TIM 01
1.0 s
TIM 02
1.5 s
0205