767
Chapter 37 Output Compare
6.Settings
6. Settings
*: For the setting procedure, refer to the section indicated by the number.
*: For the setting procedure, refer to the section indicated by the number.
*: For the setting procedure, refer to the section indicated by the number.
Table 6-1 Settings Necessary for Using Output Compare
Settings Setting Register
Setting
Procedure*
Free-run timer setting See “Chapter 35 Free-Run Timer (Page No.733)” ---
Compare value setting Compare register (OCCP0 - OCCP7) See 7.1
Compare mode setting
Output control register
(OCS01, OCS23, OCS45, OCS67)
See 7.2
Stop compare operation See 7.3
Set initial level of compare pin output See 7.4
Set OCU0-OCU7 pins to output
Port function register (PFR15.0 - PFR15.7)
Extra port function register (EPFR15.0 - EPFR15.7)
See 7.5
Clear free-run timer
Timer control register
(TCCS2, TCCS3, TCCS6, TCCS7)
See “Chapter 35 Free-Run Timer (Page No.733)”
See 7.6
Enable compare operation (activate)
Output control register
(OCS01, OCS23, OCS45, OCS67)
See 7.7
Table 6-2 Item Necessary to Clear the Free-run Timer upon Compare-match.
Setting Setting Register
Setting
Procedure*
Select free-run timer clear mode
Timer control register
(TCCS2, TCCS3, TCCS6, TCCS7)
See “Chapter 35 Free-Run Timer (Page No.733)”
See 7.8
Table 6-3 Item Necessary for Performing Interrupts
Setting Setting register
Setting
Procedure*
Output compare interrupt vector,
output compare interrupt level setting
See “Chapter 24 Interrupt Control (Page No.311)” See 7.9
Output compare interrupt setting
Clear interrupt request
Enable interrupt request
Output control register
(OCS01, OCS23, OCS45, OCS67)
See 7.11