关于圣诞节的哦,有的话传到505232035@qq.com,加分哟。。
求一个用C语言编写的51单片机音乐程序代码。
unsigned char timer0h,timer0l,time;\/\/生日歌 code unsigned char sszymmh[]={5,1,1, 5,1,1, 6,1,2, 5,1,2, 1,2,2, 7,1,4,5,1,1, 5,1,1, 6,1,2, 5,1,2, 2,2,2, 1,2,4,5,1,1, 5,1,1, 5,2,2, 3,2,2, 1,2,2, 7,1,2, 6,1,2,4,2,1, 4...
求单片机 音乐播放的c代码
0x20,0x2B,0x40,0x20,0x20,0x1C,0x10,0x18,0x10,0x20,0x20,0x26,0x20,0x2B,0x20,0x30,0x20,0x2B,0x40,0x20,0x30,0x1C,0x10,0x18,0x20,0x15,0x20,0x1C,0x20,0x20,0x20,0x26,0x40,0x20,0x20,0x2B,0x20,0x26,0x20,0x20,0x20,0x30,0x80,0x20,0x30,0x1C,0x10,...
求一个51单片机C语言程序编程
unsigned chari,NO;void main(void) \/* 主函数*\/ { SCON=0x40; \/*方式1只发送,不接收*\/ TMOD=0x20;TH1=0xfd; \/*给定时器T1赋初值,波特率为9600*\/ TL1=0xfd;TR1=1;k=1;NO=0;while(1){ if(k==0){while(k==0);NO=(NO+1)%4;} switch (NO){case 0 :P0=0xff;b...
谁能给我几首51单片机流行歌曲 的源代码!
--[endif]-->程序代码:(以下代码奏出八月桂花香这首曲子) ORG 0000H LJMP START ORG 000BH INC 20H ;中断服务,中断计数器加1 MOV TH0, #0DBH MOV TL0, #0FFH ;11.0592M晶振,形成10毫秒中断 RETISTART: MOV SP, #50H ...
求51单片机蜂鸣器程序
开关C语言程序:sbit P2^0=KEY;sbit P2^1=BEEP;unsigned char KEYNUM=0;void main(){while(1){if(KEY==0)\/\/开关按下;{KEYNUM++; }if(KEYNUM==1)\/\/第一次按下;{BEEP=1; \/\/蜂鸣器响 }if(KEYNUM==2)\/第二次按下;{BEEP=0; \/\/蜂鸣器不响KEYNUM=0; }}} 51单片机,编写延时...
求51单片机蜂鸣程序代码
MUSIC1:NOP CLR A MOVC A,@A+DPTR ;查表取代码 JZ END0 ;是00H,则结束 CJNE A,#0FFH,MUSIC5 LJMP MUSIC3 MUSIC5:NOP MOV R6,A INC DPTR MOV A,B MOVC A,@A+DPTR ;取节拍代码送R7 MOV R7,A SETB TR0 ;启动计数 MUSIC2:NOP CPL SPK MOV A,R6 MOV R3,A LCALL DEL MOV A,...
单片机音乐程序代码
控制音频1234567MOV A,R1MOVC A,@A+DPTRMOV T0H,AINC DPTRMOV A,R1MOVC A,@A+DPTRMOV T0L,ALJMP LOOPLOOP1:JB P0.1,LOOP2MOV A,R1ADD A,#2MOVC A,@A+DPTRMOV T0H,AINC DPTRMOV A,R1ADD A,#2MOVC A,@A+DPTRMOV T0L,ALJMP LOOPLOOP2:JB P0.2,LOOP3MOV A,R1ADD A,#...
用C语言编写8051单片机程序
second++;P2=~P2;\/\/流水灯全部以1S速度闪烁 if(second==3)stop=1;\/\/判断3秒时间到,关闭中断,停止闪烁,数码管熄灭 } } rate++;P0=0XFF;\/\/消隐 if(rate==3)rate=0;P0=num_disp[buf[rate]];P1=bit_sel[rate];buf[0]=one;buf[1]=ten;\/\/因为百位没有变,所以不用赋值 } ...
51单片机蜂鸣器程序是什么?
51单片机蜂鸣器程序为:include"reg52.h"typedef unsigned char u8;typedef unsigned int u16;sbit beep=P1^5;void delay(u16 i){ while(i--);} void main(){ while(1){ beep=~beep;delay(1000);\/\/控制音调频率 beep=~beep;\/控制声音大小 delay(10);} } ...
用51单片机C语言编写程序实现6位共阴极数码管循环显示0123456789ABCDEF...
include<reg51.h># define uint unsigned int# define uchar unsigned charcode uchar shu[] = {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07, \/* 0 1 2 3 4 56 7*\/0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71}; \/\/数码管段选 \/* 8 9a b c def*\/...