Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    一个变态的项目,要用一个几毛钱的单片机驱动64个LED,64个按键输入。

    其它全志芯片讨论区
    2
    7
    1898
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tigger
      tigger LV 7 last edited by

      QQ截图20210721150342.png

      74HC595 和 74HC165 都安排上了。

      1 Reply Last reply Reply Quote Share 0
      • tigger
        tigger LV 7 last edited by

        https://www.cnblogs.com/helloworldtoyou/p/5125916.html

        https://blog.csdn.net/networkhunter/article/details/108723925

        http://m.elecfans.com/article/628718.html

        一些参考资料。

        1 Reply Last reply Reply Quote Share 0
        • tigger
          tigger LV 7 last edited by

          http://www.mcublog.cn/software/2020_01/74hc165-jilian/

          word-image-9.png

          uint8_t ReadByte_165(void)
          {
          	u8 i,dat=0;
          	CLK_H;
          	SL_H;	
          	for(i=0;i<8;i++)
          	{
          		dat=dat<<1;
          		if(DAT==1)
          			dat=dat+1;
          		CLK_L;
          		Delay_Us(1);
          		CLK_H;
          	}
          	sw_buf = dat;
          	for(i=0;i<8;i++)
          	{
          		dat=dat<<1;
          		if(DAT==1)
          			dat=dat+1;
          		CLK_L;
          		Delay_Us(1);
          		CLK_H;
          	}
          	in_buf = dat;
          	CLK_L;
          	SL_L;
          	return dat;
          }
          

          其中,CLK是CP,SL是PL,DAT是Q7。

          1 Reply Last reply Reply Quote Share 0
          • tigger
            tigger LV 7 last edited by

            https://www.amobbs.com/thread-4445280-1-1.html

            uchar OUT_165()
            {
                    uchar i,aa,DATA_BUF;
                    for(i=0;i<8;i++)
                    {
                            CLK2=1;
                            aa<<=1;                   //这里要先移位,否则会出现最低位被补0而最高位被移出的现象
                            delay(10);
                            CLK2=0;                         //上升沿脉冲
                            if(OUT_data==1)
                            aa|=0x01;
                            DATA_BUF=aa;  //将串行移出的8位数据存在DATA_data中
                    }
                            return(DATA_BUF);
            }
            
                    while(1)
                    {       
                            STR=1;
                            for(j=0;j<4;j++)
                            {
                            send_4094(buffer[j]);
                            }
                            STR=0;
                            delay(7);          //此处延时不可丢
                            S_L=1;                 //置入并行数据
                            delay(40);
                            S_L=0;                //启动串行移位,准备好
                            delay(5);
                            for(j=0;j<4;j++)
                            {
                            b[j]=OUT_165();
                            }
                      }
            

            ourdev_603671AACYPO.jpg

            1 Reply Last reply Reply Quote Share 0
            • tigger
              tigger LV 7 last edited by

              20191024182155210.png

              https://blog.csdn.net/qingwufeiyang12346/article/details/102729009

              1 Reply Last reply Reply Quote Share 0
              • BedRock
                BedRock LV 6 last edited by

                突然想给你找一下,我们学校用的51开发平台,因为里面就是使用总线进行连接的各个外设,每个外设只需要一根总线连接即可

                1 Reply Last reply Reply Quote Share 0
                • tigger
                  tigger LV 7 last edited by

                  SCH-4.jpg 22222-768x488.jpg CONNECTIONS-5-1024x480.jpg GERB-TOPVW-600x239.jpg

                  https://www.electronics-lab.com/project/24-leds-bargraph-display-using-74hc595-shift-register/

                  1 Reply Last reply Reply Quote Share 0
                  • 1 / 1
                  • First post
                    Last post

                  Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

                  行为准则 | 用户协议 | 隐私权政策