include<> include<> define uchar unsigned char define uint unsigned int uchar code DSY_CODE[]={0xc00xf90xa40xb00x990x920x820xf80x800x900xff} 延时void DelayMS(uint x) { uchar t while(x--) for(t=0t<120t)
奔跑的年轻人 QQ:1284562838include <>define uint unsigned intdefine uchar unsigned charuchar code DIS_SEG[]={0xc00xf90xa40xb00x990x920x820xf80x800x900x880x830xc60xa10x860x8e}void delay(uint k){uint data jwhi
数码管显示数字09include<> void delay(void){unsigned char ijfor(i=0i<255i)for(j=0j<255j)}void main(void){unsigned char iunsigned char code Tab[10]={0xc00xf90xa40xb00x990x920x820xf80x800x90}前面加关键字code 可以大大节约单片
ORG 00H JMP STARTSTART:MOV DPTRTABLE取地址 CLR A清零 MOV P2A清零 MOV P3A清零 MOVC AADPTR取数值LOOP: MOV P111111110BP1口左移一位MOV P0 0FCH输出0
#
#
#
数码管单个显示数字原理图:源C程序:include<>include<>define uchar unsigned chardefine uint unsigned intuchar code table[10]={0xc00xf90xa40xb00x990x920x820xf80x800x90} 将数码管的对应显示0-9的段选码存入代码段中void delay(uint t) 延时
:
机电工程学院课程设计报告书题 目: 8只数码管滚动显示单个数字 专 业: 电气自动化技术 班 级: DQ 09302 学 号: 09022890 学生: 杨 超 指导教师: 朱晓玲
违法有害信息,请在下方选择原因提交举报