標(biāo)題: 單片機(jī)+點(diǎn)陣的一系列東西怎樣實(shí)現(xiàn)的,為什么程序輸上去沒有任何反應(yīng)呢? 求幫助 [打印本頁]

作者: 小黑屋@    時間: 2020-1-3 17:20
標(biāo)題: 單片機(jī)+點(diǎn)陣的一系列東西怎樣實(shí)現(xiàn)的,為什么程序輸上去沒有任何反應(yīng)呢? 求幫助
點(diǎn)陣的一系列東西怎樣實(shí)現(xiàn)的,為什么程序輸上去沒有任何反應(yīng)呢?
我用的是74hc595來擴(kuò)展的I/O口。請各位幫忙指點(diǎn)一下,謝謝。
#include<reg51.h>
#include<intrins.h>
#define uchar unsigned char
#define uint unsigned int
sbit RCLK=P3^5;
sbit SER=P3^4;
sbit SRCLK=P3^6;
void Hc595SendByte(uchar dat)
{
         uchar a;
        SRCLK=0;
        RCLK=0;
        for(a=0;a<8;a++)
        {
                 SER=dat>>7;
                dat<<=1;
                SRCLK=1;
                _nop_();
                _nop_();
                SRCLK=0;
        }
        RCLK=1;
        _nop_();
        _nop_();
        RCLK=0;
}
void main()
{
         Hc595SendByte(0x80);
        P0=0x7f;
        while(1);
}






歡迎光臨 (http://www.torrancerestoration.com/bbs/) Powered by Discuz! X3.1