|
OUTPUT COMPARE |
|
The simplest output compare programm
ORG $B600 |
TCTL1 EQU $1020 TFLG1 EQU $1023 TOC2 EQU $1018 TOC2 ORG $B600 LDAA #01010101B Toggle PA6,PA5,PA4,PA3 STAA TCTL1 LOOP LDAA #01000000B CHECK BITA TFLG1 BEQ CHECK Wait until TCNT == TOC2 STAA TFLG1 Clear TFLG1 with WRITE-Operation LDD TOC2 ADDD #20000 20000 * 0,5 micro = 10 msec STD TOC2 BRA LOOP *********************************
|
INPUT CAPTURE |