I believe the Debug_BlinkyLED-Advanced is now complete; need to test now

This commit is contained in:
William Miceli
2021-05-18 12:57:24 -04:00
parent b719769971
commit 02d9ac3003
10 changed files with 230 additions and 65 deletions

View File

@@ -0,0 +1,16 @@
/*
* Initialize Timer B
* - Provides timer tick timebase at 100 Hz
*/
#include "SunseekerTelemetry2021.h"
#include "timers.h"
void timerB_init(void)
{
TBCTL = CNTL_0 | TBSSEL_1 | ID_3 | TBCLR; // ACLK/8, clear TBR
TBCCR0 = (ACLK_RATE/8/TICK_RATE); // Set timer to count to this value = TICK_RATE overflow
TBCCTL0 = CCIE; // Enable CCR0 interrupt
TBCTL |= MC_1; // Set timer to 'up' count mode
}