Hello,
I have obtained a PWM code online written in C. What is the equivalent code if it is written in Energia - .ino file using Energia IDE libraries?
Here is the code:
#include <msp430g2553.h>
void setup()
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
if (CALBC1_1MHZ==0xFF) // If calibration constant erased
{
while(1); // do not load, trap CPU!!
}
DCOCTL = 0; // Select lowest DCOx and MODx settings
BCSCTL1 = CALBC1_1MHZ; // Set range
DCOCTL = CALDCO_1MHZ;