欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索

單片機LED數碼管顯示數字及左移程序Proteus仿真(獨立按鍵)

查看數: 3537 | 評論數: 3 | 收藏 0
關燈 | 提示:支持鍵盤翻頁<-左 右->
    組圖打開中,請稍候......
發布時間: 2022-11-28 21:55

正文摘要:

單片機獨立按鍵控制LED數碼管顯示數字及左移 仿真原理圖如下(proteus仿真工程文件可到本帖附件中下載)

回復

ID:1135525 發表于 2024-11-5 14:31
U2是什么元件
ID:1135525 發表于 2024-11-5 10:53
終于找到關于多個數碼管動態顯示的帖子了
ID:1134495 發表于 2024-11-2 23:48
請問使用矩陣鍵盤的話應該怎么改


// 矩陣鍵盤讀取按鍵鍵碼
unsigned char MatrixKey()
{
    unsigned char KeyNumber = 0;

    P1 = 0xFF;
    P1_3 = 0;
    if (P1_7 == 0) {Delay_ms(20); while (P1_7 == 0); Delay_ms(20); KeyNumber = 16;}
    if (P1_6 == 0) {Delay_ms(20); while (P1_6 == 0); Delay_ms(20); KeyNumber = 15;}
    if (P1_5 == 0) {Delay_ms(20); while (P1_5 == 0); Delay_ms(20); KeyNumber = 14;}
    if (P1_4 == 0) {Delay_ms(20); while (P1_4 == 0); Delay_ms(20); KeyNumber = 13;}

    P1 = 0xFF;
    P1_2 = 0;
    if (P1_7 == 0) {Delay_ms(20); while (P1_7 == 0); Delay_ms(20); KeyNumber = 12;}
    if (P1_6 == 0) {Delay_ms(20); while (P1_6 == 0); Delay_ms(20); KeyNumber = 11;}
    if (P1_5 == 0) {Delay_ms(20); while (P1_5 == 0); Delay_ms(20); KeyNumber = 10;}
    if (P1_4 == 0) {Delay_ms(20); while (P1_4 == 0); Delay_ms(20); KeyNumber = 9;}

    P1 = 0xFF;
    P1_1 = 0;
    if (P1_7 == 0) {Delay_ms(20); while (P1_7 == 0); Delay_ms(20); KeyNumber = 8;}
    if (P1_6 == 0) {Delay_ms(20); while (P1_6 == 0); Delay_ms(20); KeyNumber = 7;}
    if (P1_5 == 0) {Delay_ms(20); while (P1_5 == 0); Delay_ms(20); KeyNumber = 6;}
    if (P1_4 == 0) {Delay_ms(20); while (P1_4 == 0); Delay_ms(20); KeyNumber = 5;}

    P1 = 0xFF;
    P1_0 = 0;
    if (P1_7 == 0) {Delay_ms(20); while (P1_7 == 0); Delay_ms(20); KeyNumber = 4;}
    if (P1_6 == 0) {Delay_ms(20); while (P1_6 == 0); Delay_ms(20); KeyNumber = 3;}
    if (P1_5 == 0) {Delay_ms(20); while (P1_5 == 0); Delay_ms(20); KeyNumber = 2;}
    if (P1_4 == 0) {Delay_ms(20); while (P1_4 == 0); Delay_ms(20); KeyNumber = 1;}

    return KeyNumber;
}

小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表