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

<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)用 > 單片機(jī)和 FIFO 的接口匯編程序

        單片機(jī)和 FIFO 的接口匯編程序

        作者: 時(shí)間:2012-10-12 來源:網(wǎng)絡(luò) 收藏
        下面的程序中,中的出來后,從串口發(fā)送出去。
        ;***********************************
        ef bit p3.3 ;fifo empty flag
        rst bit p3.5 ;reset fifo
        read bit p3.7 ;read fifo

        org 0000h
        ljmp main

        org 0030h
        main:

        ;------ initial timer
        mov tmod,#00100001b ;timer0 mode 1 (16 bit)
        ;timer1 mode 2 (8 bit auto reload)
        mov a,pcon ;
        orl a,#10000000b ;
        mov pcon,a ;setb SMOD bit
        mov th1,#0fdh ;19200ps @ 11.0592Mhz OSC
        setb tr1 ;turn on timer1
        ;------ initial serial communication port
        mov scon,#01010000b ;mode 1 (8 bit UART,variable Baud)
        clr ti

        setb read
        clr rst
        nop
        setb rst ;reset fifo
        start:
        jnb ef,$ ;if no data then wait

        clr read
        nop
        mov a,p1
        nop
        setb read ;read data from fifo

        jnb ti,$ ;send data
        clr ti
        mov sbuf,a
        ajmp start

        end


        評(píng)論


        相關(guān)推薦

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

        關(guān)閉