51单片机控制喇叭的程序(c语言)
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,0x20, 0x10, 0x1C , 0x10,0x20, 0x20...
求51单片机风扇转速监控程序 C语言
给你个我写的基于89c52的单片机测频率的程序,你参考下 include <reg52.h>#include <intrins.h>#include <stdlib.h>#define uchar unsigned char#define uint unsigned int#define LCD_data P0sbit LCD_RS=P2^0;sbit LCD_RW=P2^1;sbit LCD_EN=P2^2;sbit LCD_PSB=P2^3;bit flag=0;uint n...
要写一个基于51单片机的c语言程序控制彩灯效果,要求一个按键控制一种...
调用输入输出指令啊
求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单片机c语言操作使蜂鸣器奏出“祝你生日快乐”音乐的全部程序...
include <reg51.h> sbit speaker=P1^2;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,...
求一个用C语言编写的51单片机音乐程序代码。
sbit speaker=P2^2;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,...
求 数码管CH451 初始化程序 51单片机C语言的 THANKU~
define ucharunsigned char define uintunsigned int define ch451_rst 0x0201 \/\/复位 define ch451_lmov 0x0300 \/\/设置移动方式-左移 define ch451_lcyc 0x0301 \/\/设置移动方式-左循 define ch451_rmov 0x0302 \/\/设置移动方式-右移 define ch451_rcyc 0x0303 \/...
求一个关于单片机的蜂鸣器的C语言程序,如果好,可行的话有追加分~
7. C语言源程序 include <AT89X51.H> include <INTRINS.H> bit flag;unsigned char count;void dely500(void){ unsigned char i;for(i=250;i>0;i--){ _nop_();} } void main(void){ while(1){ if(P1_7==0){ for(count=200;count>0;count--){ P1_0=~P1_0;dely500();}...
求大神在keil上帮写51单片机C语言程序
\/\/第一个实验:\/\/假设8个LED阴极指向单片机,D11连接P0.1,D12连接P0.2 ... D18连接P0.7\/\/假设K1按键在P2.3引脚#include<reg51.h>#include<intrins.h>sbit k1=P2^3;\/\/假设K1按键在P2.3引脚void main(){P0=0xfe;while(1){if(k1==0){while(k1==0);P0=_crol_(P0,1);}}}...
求51单片机蜂鸣器播放音乐的教程 C语言
void delay(uint i); \/\/延时子程序\/*--- T0的值,及输出频率对照表 ---*\/ uchar code freq[36*2]={ 0xA9,0xEF, \/\/0x3F,0XEE,\/\/00220HZ ,1 \/\/0 0x93,0xF0, \/\/0X3D,0XEF,\/\/00233HZ ,1 0x73,0xF1, \/\/0X30,0XF0,\/\/00247HZ ,2 0x49,0xF2, \/\/0X18,0XF1...