Panasonic MN103001G/F01K User Manual Page 272

  • Download
  • Add to my manuals
  • Print
  • Page
    / 466
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 271
16-bit Timers
11-18
11.6 Description of Operation of Timer 10
This section describes the operation of timer 10.
Timer 10 includes an up-counter and two compare/capture registers. The compare/capture registers are independent
of each other, and can each be used as either a compare register or a capture register.
11.6.1 Compare Register Settings
In order to use either the timer 10 compare/capture A register or B register as a compare register, the following
settings must be made according to the procedure described below before timer 10 is initialized.
The explanation below refers only to the compare/capture A register, but similar settings would also need to be
made for the compare/capture B register.
(1) Set the compare/capture A register mode.
Set the TM10MDA register as follows:
TM10AO2,1,0 Don't care
TM10ACE 0: Capture operation disabled
TM10AEG Don't care
TM10AM1,0 00:Compare register (single-buffer)
or
01:Compare register (double-buffer)
If the value in the compare register will change while the counting operation is in progress,
be certain to set "double-buffer."
(2) Set the comparison value in the compare/capture A register.
Set the comparison value in TM10CA.
If the double-buffer is set, the value that is set is not loaded into the compare register at this point. Even if
TM10CA is read at this point, the previous value that was set is read. The set value is loaded when timer 10
is initialized.
Once the timer 10 counting operation is enabled, a compare/capture A interrupt request is generated according to
the timing shown in Fig. 11-6-1.
If the double-buffer is set, the value that is set in the buffer is loaded into the compare register at the same time that
TM10BC is cleared.
Page view 271
1 2 ... 267 268 269 270 271 272 273 274 275 276 277 ... 465 466

Comments to this Manuals

No comments