MSP430 G2553 LCD1602 秒表

在这里插入图片描述

int main(void)
{
    unsigned char dis[15], count;

    WDTCTL = WDTPW | WDTHOLD;   // stop watchdog timer

    //设置单片机工作时钟 设置为1MHZ
    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;                     // Set DCO step + modulation */

    Port_init(); /* 显示器引脚初始化 */
    LCD_init(); /* 显示器初始化 */

猜你喜欢

转载自blog.csdn.net/x1131230123/article/details/108439061
今日推荐