Hello just looking for some advise on why I can't get my input capture up and running, I am sure I am missing something here.
My problem is that the timmer interupt is never hit indicating that the setup of the capture compare is incorrect, or the CLK is wrong and messing thing up.
My CLK setup is to run off the DCO (tried bith the following methods
//CLK INIT routine -------------------------------------------------------------
void CLK_INIT()
{
//left stop modes out for now
// Initialize DCO to 4.25Hz
DCOCTL = DCO0 + DCO1; //set DCO to 4.25MHz DCO = 3
BCSCTL1 = XT2OFF + RSEL3 + RSEL1 + RSEL0; //XT2 off & DCO range declared as 4.25MHz RSEL = 11
//DCOCTL = 0; // Select lowest DCOx and MODx settings
//BCSCTL1 = CALBC1_8MHZ; // Set DCO to 8MHz
//DCOCTL = CALDCO_8MHZ;
}
//------------------------------------------------------------------------------
The input capture setup is
//CAPCOM INIT routine ----------------------------------------------------------
void CAPCOM_INIT()
{
TACTL = TASSEL_2 + ID_2 + MC_2 + TAIE; // Initialise TPM1 to use SMCLK/4, Up mode & enable IRQ
TACTL = TACTL & ~TAIFG; //clear IRQ flag
TACCTL1 = CM_2 + CAP + CCIE + SCS; //falling edge input, capture mode, IRQ enabled
TACCTL1 = TACCTL1 & ~CCIFG; //clear IRQ flag
P1SEL = P1SEL | BIT2; //Port setup for input cap mode
P1DIR = P1DIR & ~BIT2; //Port is a input
possible_preamble_flag = 0;
preamble_count = 0;
bit_counter = 0;
}
//------------------------------------------------------------------------------
and The interrupt I am using that never gets called is
// Timer A0 interrupt service routine ------------------------------------------
#pragma vector = TIMER0_A1_VECTOR
__interrupt void Timer0_A1 (void)
//------------------------------------------------------------------------------
Any help and advise would be apprecited.
Cheers Paul