Maxim-integrated MAXQ Family Users Guide: MAXQ8913 Supplement Manual de usuario Pagina 86

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 114
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 85
MAXQ Family Users Guide:
MAXQ8913 Supplement
21-11
21.2.8 EXENB Control During PWM/Output Control Mode
The TB0B input function (EXENB = 1) and the PWM/output control function (TBCS:TBCR<>00b) can be enabled at
the same time. However, the input function changes slightly when this is done. In this configuration, the detection of a
falling edge on the TB0B pin results in setting of the EXFB interrupt flag, but does not force an autoreload.
21.3 Timer B Examples
21.3.1 Timer B Example: Reloading Timer Mode
move PD5.2, #1 ; Set P5.2 to output mode
move PO5.2, #1 ; Drive high (LED off)
move TBCN, #0000010000000000b ; Timer mode, reload mode, clock/256
move TBR, #8000h ; Reload every 8000h timer cycles
move TBCN.2, #1 ; Start timer
;; Reload time is 1/sysclk * 256 * 8000h == 838ms
timerLoop:
move C, TBCN.7 ; Check reload flag
jump NC, timerLoop
move TBCN.7, #0 ; Clear reload flag
move Acc, PO5
xor #0100b ; Toggle bit 2
move PO5, Acc
jump timerLoop
Maxim Integrated
Vista de pagina 85
1 2 ... 81 82 83 84 85 86 87 88 89 90 91 ... 113 114

Comentarios a estos manuales

Sin comentarios