Kb_Etivl 2021-07-19 01:25 采纳率: 0%
浏览 30

请问这个代码仿真该怎么接实物图?


sbit P1_0 =P1^0;
sbit P1_1 =P1^1;
sbit P1_2 =P1^2;
sbit P1_3 =P1^3;


uchar code s7_table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};
uchar time=30;
uchar timex=33;
uchar time_flag;
uchar timex_flag;
uchar led_change;
uchar led_change1;
uchar yellow_led_flag;
void delay_ms(uchar z) 
{
    uchar i,j;
    for(i=z;i>0;i--)
        for(j=110;j>0;j--);
}
void display_time()
{
    
    P1_0=0;P1_1=1;P1_2=1;P1_3=1;
    P2=s7_table[timex/10];
    delay_ms(2);
    P2=0;
    P1_0=1;
       
    P1_1=0;
    P2=s7_table[timex%10];
    delay_ms(2);
    P2=0;
    P1_1=1;

    P1_2=0;
    P2=s7_table[time/10];
    delay_ms(2);
    P2=0;
    P1_2=1;

    P1_3=0;
    P2=s7_table[time%10];
    delay_ms(2);
    P2=0;
    P1_3=1;
}

img

img

  • 写回答

1条回答 默认 最新

  • 少林and叔叔 2023-02-21 11:49
    关注

    需要提供该板卡的原理图,还是确认所使用板卡的数码管是否为共阴极的数码管;
    根据程序中,应该是使用的共阴极的数码管。
    以上两点确认后,才能提供具体的实物连接图。

    评论

报告相同问题?

问题事件

  • 创建了问题 7月19日

悬赏问题

  • ¥50 树莓派安卓APK系统签名
  • ¥15 maple软件,用solve求反函数出现rootof,怎么办?
  • ¥65 汇编语言除法溢出问题
  • ¥15 Visual Studio问题
  • ¥15 state显示变量是字符串形式,但是仍然红色,无法引用,并显示类型不匹配
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题
  • ¥20 在虚拟机的pycharm上
  • ¥15 jupyterthemes 设置完毕后没有效果
  • ¥15 matlab图像高斯低通滤波