277
for(s = 0; s < 10; s++)
{
LCD_goto((3 + s), 1);
LCD_putchar(txt4[s]);
delay_ms(60);
}
s = 0;
LCD_clear_home();
LCD_goto(3, 0);
LCD_putstr(txt1);
while(1)
{
show_value(s);
s++;
delay_ms(200);
};
}
void BCSplus_graceInit(void)
{
/*
* Basic Clock System Control 2
*
* SELM_0 -- DCOCLK
* DIVM_0 -- Divide by 1
* ~SELS -- DCOCLK
* DIVS_0 -- Divide by 1
* ~DCOR -- DCO uses internal resistor
*
* Note: ~<BIT> indicates that <BIT> has value zero
*/
BCSCTL2 = SELM_0 | DIVM_0 | DIVS_0;
if (CALBC1_16MHZ != 0xFF)
{
/* Adjust this accordingly to your VCC rise time */
__delay_cycles(1000);
/* Follow recommended flow. First, clear all DCOx and MODx bits. Then
* apply new RSELx values. Finally, apply new DCOx and MODx bit values.
*/
DCOCTL = 0x00;
BCSCTL1 = CALBC1_16MHZ; /* Set DCO to 16MHz */
DCOCTL = CALDCO_16MHZ;
}
/*
* Basic Clock System Control 1
*
* XT2OFF -- Disable XT2CLK
* ~XTS -- Low Frequency
* DIVA_0 -- Divide by 1
*
* Note: ~XTS indicates that XTS has value zero
*/