I was wondering if I could snag your help again. I've read the Timing section, rewrote my code. It does everything I'm imagining I want to it to do, but it's not working, at least according to the online grader. Unfortunately I have no way of testing this in person.
Here are the relevant parts of my code:
void setup()
{ WDTCTL = WDTPW + WDTHOLD; // Stop Watchdog timer CCTL0 = CM_1 + SCS + CCIS_0 + CAP + CCIE; // Rising + CCI0A (P1.3) + Capture Mode + Interrupt Enable CCTL1 = CM_2 + SCS + CCIS_0 + CAP + CCIE; // Falling Edge + CCI0A (P1.3) + Capture Mode + Interrupt Enable
TACTL = TASSEL_2 + MC_2 + ID_3; // SMCLK + Continuous mode + Divide Counter by 8 ( 125 KHz)
_BIS_SR(GIE); }
// Timer A0 interrupt service routine
__interrupt void TimerA0(void) {
length = TACCR0;
TACTL = TACLR;
CCTL0 = CM_1 + SCS + CCIS_0 + CAP + CCIE; // Rising + CCI0A (P1.3) + Capture Mode + Interrupt Enable
CCTL1 = CM_2 + SCS + CCIS_0 + CAP + CCIE; // Falling Edge + CCI0A (P1.3) + Capture Mode + Interrupt Enable
TACTL = TASSEL_2 + ID_3 + MC_2;
}
// Timer A1 interrupt service routine
__interrupt void TimerA1(void) {
pulse = TACCR1;
}