在线看毛片网站电影-亚洲国产欧美日韩精品一区二区三区,国产欧美乱夫不卡无乱码,国产精品欧美久久久天天影视,精品一区二区三区视频在线观看,亚洲国产精品人成乱码天天看,日韩久久久一区,91精品国产91免费

<menu id="6qfwx"><li id="6qfwx"></li></menu>
    1. <menu id="6qfwx"><dl id="6qfwx"></dl></menu>

      <label id="6qfwx"><ol id="6qfwx"></ol></label><menu id="6qfwx"></menu><object id="6qfwx"><strike id="6qfwx"><noscript id="6qfwx"></noscript></strike></object>
        1. <center id="6qfwx"><dl id="6qfwx"></dl></center>

            新聞中心

            ICCAVR看門狗

            作者: 時(shí)間:2016-11-13 來源:網(wǎng)絡(luò) 收藏
            tools -Application Builder.

            Watchdog Timer選中enable后。右邊選時(shí)鐘。自動(dòng)生成Watchdog Timer所需的數(shù)據(jù)

            本文引用地址:http://www.biyoush.com/article/201611/316378.htm

            //ICC-AVR application builder : 2009-11-1 12:59:57
            // Target : M16
            // Crystal: 4.0000Mhz

            #include
            #include

            void port_init(void)
            {
            PORTA = 0x00;
            DDRA = 0x00;
            PORTB = 0x00;
            DDRB = 0x00;
            PORTC = 0x00; //m103 output only
            DDRC = 0x00;
            PORTD = 0x00;
            DDRD = 0x00;
            }

            //Watchdog initialize
            // prescale: 2048K
            void watchdog_init(void)
            {
            WDR(); //this prevents a timout on enabling
            WDTCR = 0x0F; //WATCHDOG ENABLED - dont forget to issue WDRs
            }

            //call this routine to initialize all peripherals
            void init_devices(void)
            {
            //stop errant interrupts until set up
            CLI(); //disable all interrupts
            port_init();
            watchdog_init();

            MCUCR = 0x00;
            GICR = 0x00;
            TIMSK = 0x00; //timer interrupt sources
            SEI(); //re-enable interrupts
            //all peripherals are now initialized
            }



            關(guān)鍵詞: ICCAVR看門

            評論


            技術(shù)專區(qū)

            關(guān)閉