Howdy Everybody,
I have a project that I have been trying to get through. It works great on a launchpad, I have been attempting to have it on its own board. I have the pullup resistor on the reset pin, the cap on it and also the caps between VCC and ground. I do not have the crystal. I have been trying to modify the code to not use the crystal, as when I attempt to use the chip off the board I can not get it to work correctly.
Delete crystal setup line
I thought I would need to enable the DCO, and I was going to use SMCLK and DIV8 I have tried many things with no luck.
If I change it to TASSEL_2 / DIV8 it does nothing at all, it will load but do nothing.
Thanks everybody for the help! I thought there was a document that that had the timers explained in a more basic level, but I have not been able to locate it.
// Set up 32768Hz crystal
BCSCTL3 |= XCAP_3; // select 12pF caps <- DELETE LINE
// NEED TO INTALIZE THE DCO ??
// initialize Timer0_A
TA0CCR0 = ( 32768 / TICKS_PER_SECOND ) - 1; // set up timer for 32Hz <- CHANGE TO (125000 / TICKS_PER_SECOND) - 1
TA0CTL = TASSEL_1 + ID_0 + MC_1; // configure and start timer <- CHANGE TO TASSEL_2 + ID_3 + MC_1
// enable interrupts
TA0CCTL0 = CCIE; // enable timer CCR0 interrupts
__enable_interrupt(); // set GIE in SR
LPM3; // select low power mode 3
while(1);
}
/**
* Timer interrupt called at 32Hz (TICKS_PER_SECOND)
*/
#pragma vector = TIMER0_A0_VECTOR
__interrupt void myTimerISR(void)