Ing mamon
;- EEPROM Block Protect for E9 part, not A8
* Listing 11.8 * Measure time between a rising and a falling edge on IC1. *---------------------------------------------------------RISETIME PULSEWIDTH ORG LDAA STAA EQU EQU $100 #$10 ;config. to capture rising edge TCTL2,X Página 1 $10 $12
IC_TIEMPOFLANCO DE SUBIDA Y BAJADA LDAA #$04 ;clear flag IC1F if set STAA TFLG1,X * wait for rising edge POLLRISE BRCLR TFLG1,X $04 POLLRISE LDD TIC1,X ;store the risetime STD RISETIME LDAA #$20 ;config. to capture falling edge STAA TCTL2,X LDAA #$04 ;clear flag IC1F STAA TFLG1,X * wait for falling edge POLLFALL BRCLR TFLG1,X$04 POLLFALL LDD TIC1,X ;read the fall time SUBD RISETIME ;width = fall - rise STD PULSEWIDTH ;store width BRA * ;stop here for now
Página 2
Regístrate para leer el documento completo.