ORG 0640HMOV R000H 相当于计数器 MOV DPTR2000H 改变的起始地址LOOP:MOV A11H 赋得值 MO DPTRA INC DPTR INC R0 CJNE R010HLOOP
MCS-51单片机实验程序清单 ================== 软件实验一 清零程序 ORG 0640HSE01: MOV R000H MOV DPTR2000H (2000H)送DPTRLOO1: MO DPTRA 0送(DPTR) INC DPTR DPTR1
单片机程序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
违法有害信息,请在下方选择原因提交举报