----- Original Message ----- > > Message: 1 > Date: Wed, 29 Jan 2003 20:42:37 +0200 > From: "Nir Shelly" <> > Subject: Use of TA3 in 56f805 > > Hi all, > I'm using the TA3 (pin of timer A)in order to trigger the timer A ch3. After > awhile, it looks like this pin became as an output and I'm wondering why. > Included my initialization code: > I don't know, but the ISR looks a lot like something I tried to do with a period counter timer. I tried to turn off the timer and reset the thing inside the ISR and ended up with a timer that wouldn't update. For some reason I don't quite understand, thing like this don't work very well inside the ISR. Perhaps you have to disable the timer interrupt first before you do this? Steven P. Cornett > asm(movei #$0,x:TMRA3_LOAD); > asm (move #$0,X:TMRA3_CNTR); > asm(movei #$0001 ,x:TMRA3_CMP1); > // asm(movei #$4640,x:TMRA3_CTRL); > asm(movei #$47C0,x:TMRA3_CTRL); > asm(movei #$4000,x:TMRA3_SCR); // Enable interrupt > > and the ISR: > > #pragma interrupt > void Sense3Int(void) > { > > asm(bfclr #$C000,x:TMRA3_SCR); // Clear TCF. > > asm(movei #$0,x:TMRA3_LOAD); > asm (move #$0,X:TMRA3_CNTR); > asm(movei #$0001,x:TMRA3_CMP1); > asm(movei #$47C0,x:TMRA3_CTRL); > > asm(bftsth #$0100,x:TMRA3_SCR); > asm(bcs LB3) > SensStat |= 0x8; > fader1[3]++; > asm(bra SKP3); > LB3: > SensStat &= 0xFFF7; > fader0[3]++; > SKP3: > > asm(bfset #$4000,x:TMRA3_SCR); > } > Any suggestions for this pin behavior? > > Thanks > Nir Shelly > |