中文字幕 另类精品,亚洲欧美一区二区蜜桃,日本在线精品视频免费,孩交精品乱子片免费

<sup id="3hn2b"></sup>

    1. <sub id="3hn2b"><ol id="3hn2b"></ol></sub><legend id="3hn2b"></legend>

      1. <xmp id="3hn2b"></xmp>

      2. 新聞中心

        EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > AVR的SPI驅(qū)動(dòng)74HC595測試程序

        AVR的SPI驅(qū)動(dòng)74HC595測試程序

        作者: 時(shí)間:2013-12-09 來源:網(wǎng)絡(luò) 收藏

        #includeavr/io.h>
        #define uchar unsigned char
        #define uint unsigned int
        #define lat_on PORTB|=0x10
        #define lat_off PORTB=0xe0
        void spi_init(void)
        {

        SPCR=0x70;
        SPSR=0X01;
        }

        void spi_send(uchar dd)
        {
        SPDR=dd;
        while(0==(SPSR0X80));

        }

        int main(void)
        {
        DDRB=0xff;
        PORTB=0XFF;
        spi_init();

        lat_off;
        spi_send(0x92);
        spi_send(0x24);
        lat_on;
        while(1);
        }



        關(guān)鍵詞: AVR SPI驅(qū)動(dòng) 74HC595

        評(píng)論


        相關(guān)推薦

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

        關(guān)閉