Clock+Module+Setting

The basic clock module consists of three or four clock modules :
 * **LFXT1CLK** : low frequency/high oscillator that can be used with external clock sources of 32768 Hz.
 * **XT2CLK** : optional high frequency oscillator that can be used with standard crystals
 * **DCOCLK**(//Most important for our purpose//) : Internal digital controlled oscillator
 * **VLOCLK**: internal very low power, low frequency oscillator with 12 KHz typical frequency


 * NOTE:** Don’t pay much attention to all these clock sources as our purpose will be fully served by DCOCLK alone.The main point is that we can set a particular for DCO to operate and use that frequency for our timers purpose.Further SMCLK is also software selectable and can be divided by a factor of 1,2,4 or 8 depending on the purpose.

Three clock signals are available from the basic clock module :
 * ACLK** –Auxiliary clock
 * MCLK** – Master clock
 * SMCLK** – Sub-Main Clock

After Power UP, MCLK and DCLK are sourced from DCOCLK(digitally controlled oscillator) at around **1.1MHz** and ACLK is sourced from LFXT1CLK. We can change the frequency of operation of DCO. SMCLK is software selectable and can be divided by 1,2,4 or 8.

//BCSCTL1 = CALBC1_1MHZ//; //DCOCTL = CALDCO_1MHZ//; //For DCO calibration, the BCS+ registers (BCSCTL1 and DCOCTL) are used. //BCSCTL2 |= DIVS_3//; //dividing SMCLK by a factor of 8 ( DIVS_0 => /1 DIVS_1 => /2 DIVS_2 => /4 DIVS_3 => /8 )
 * __CODE for setting DCO at 1 MHZ and SMCLK at 125 KHZ__ :**

__**CODE FOR SETTING DCO AT 8 MHZ AND SMCLK AT 1MHZ**__ : //BCSCTL1 = CALBC1_8MHZ;// //DCOCTL = CALDCO_8MHZ;// //BCSCTL2 |= DIVS_3;//