Panasonic MN103001G/F01K User Manual Page 247

  • Download
  • Add to my manuals
  • Print
  • Page
    / 466
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 246
8-bit Timers
10-27
Make the settings described below when cascading 8-bit timers.
(1) Set the timer division ratio.
Set the timer division ratio in TMnBR.
(Example 1) When using timers 0 and 1 as 16-bit timers and setting the interrupt cycle to x'1234:
In order to set the interrupt cycle to x'1234,
x'1234 - 1 = x'1233
must be set in TMnBR.
Set x'33 in the low-order byte, TM0BR, and x'12 in the high-order byte, TM1BR.
Because TMnBR can be accessed via 16-bit or 32-bit access, values can be set in multiple registers
simultaneously. (When cascading timers 1 and 2, 5 and 6, and 9 and A, or when using them as 24-bit timers, it
is not possible to simultaneously access only the registers for the cascaded timers.)
When changing the values that are set in TMnBR while the counter is in operation, change TMnBR for the
cascaded timers simultaneously.
(2) Select the clock source.
Select any desired clock source for the lowest-order timer.
Set the clock source for the higher timers (all except for the lowest timer) to "cascaded connection."
(Example 1) When using timer 0 and timer 1 as a 16-bit timer
Set the desired clock source for timer 0.
Set the clock source for timer 1 to "cascaded connection."
(Example 2) When using timers 0, 1, 2 and 3 as a 32-bit timer
Set the desired clock source for timer 0.
Set the clock source for timers 1, 2 and 3 to "cascaded connection."
(3) Initialize the timers
Set the TMnLDE flag to "1" for all cascaded timers in order to initialize the timers. (It is not necessary to set
the bit simultaneously in all of the registers.)
Page view 246
1 2 ... 242 243 244 245 246 247 248 249 250 251 252 ... 465 466

Comments to this Manuals

No comments