include<>sbit X0=P10sbit X1=P11sbit X2=P12sbit X3=P13define uchar unsigned chardefine uint unsigned intuchar code lie[8]={0xfe0xfd0xfb0xf70xef0xdf0xbf0x7f}uchar code lie[8]={0xfe0xfd0xfb0xf70xef0xd
附录一主机源程序include <reg52.H>unsigned char xdata table[5]unsigned char code tab[]={0x030x9f0x250x0d 0x990x490x410x1f 0x010x090x050xc1 0x63
单片机程序include <>include <>extern float sqrt(float x)extern float exp(float x)extern float tan(float x)extern float cos(float x)extern float sin(float x)extern float log10(float x)void reset()void di
行线接-列线接-根据扫描键盘返回的键值编码查键值编码表从而得到键值并送数码管显示开机时数码管显示-当键按下时数码管显示按下键的键值蜂鸣器响一声 include <>include <>define uchar unsigned chardefine uint unsigned intsbit BEEP = P36 蜂鸣器驱动线uchar keyunsig
1. 延时跑马灯 ORG 0 AJMP MAINMAIN: MOV SP5FH MOV DPTRTAB LOOP0: MOV A0 MOV R28LOOP: MOV BA MOVC AADPTR MOV P0A LCALL DEL MOV AB INC A
5include <>void delay(void){unsigned int aa=55400while(a--)}void main(){while(1){P0=0xfe11111110delay()P0=0xffdelay()}}61include <>sbit led0=P00sbit led1=P01sbit led2=P02sbit led3=P03sbit led4=P04sbit
#
ORG0000HLJMPSTARTORG001BHT1中断入口地址LJMPINTT1ORG0030HSTART:MOVR717定时1S循环次数MOVR660秒钟定时60SMOVR560分种钟定时60SMOVR424时钟定时60SMOVSP30H设置栈底movp00ffh读P0口数据初始化(读引脚)ACALLDISPLAY1显示初始化acallDISPLAY2显示初始化acallDISPLAY3显示
定时中断1秒闪烁include<>unsigned char tempvoid main(void) { TMOD=0x01 TH0=0x3c TL0=0xb0 EA=1 ET0=1 TR0=1 temp=10 while(1) } void timer0_int(void) interrupt 1 {TH0=0x3cTL0=0xb0temp=temp-1if(te
ORG 0000H LJMP MAINMAIN: MOV R030HMOV R210HCLR A A1:MOV R0A INC R0INC ADJNZ R2A1MOV R030HMOV R140HMOV R210H A2: MOV A R0 MOV R1AINC R0INC R1DJNZ R2 A2MOV
违法有害信息,请在下方选择原因提交举报