GrayAngel

随笔分类 -  51单片机小项目

一些基本电子元器件的项目编程,如Led,Key
动态数码管
摘要:主要区分位选和段选 段选数据 unsigned char code DIG_CODE[17] = {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};//0、1、2、3、4、5、6、7、8 阅读全文

posted @ 2017-02-12 13:52 GrayAngel 阅读(193) 评论(0) 推荐(0)

51蜂鸣器
摘要:蜂鸣器的乐谱由频率和节拍构成 频率常数即音乐术语中的音调, 而节拍常数即音乐术语中的多少拍; 阅读全文

posted @ 2017-02-11 08:16 GrayAngel 阅读(205) 评论(0) 推荐(0)

51单片机头文件
摘要:intrins.h 在C51单片机编程中,头文件INTRINS.H的函数使用起来,就会让你像在用汇编时一样简便. 内部函数 描述 _crol_ 字符循环左移 _cror_ 字符循环右移 _irol_ 整数循环左移 _iror_ 整数循环右移 _lrol_ 长整数循环左移 _lror_ 长整数循环右移 阅读全文

posted @ 2017-02-11 07:27 GrayAngel 阅读(962) 评论(0) 推荐(0)

key单片机按键抖动
摘要:1 //write by:cyt 2 //Time:2017-2-10 3 //Porject Name:key shake_destory 4 #include<reg51.h> 5 #define GPIO_KEY P0/// 6 void Delay1ms(unsigned char n); 阅读全文

posted @ 2017-02-10 20:55 GrayAngel 阅读(842) 评论(0) 推荐(0)

code about led_shake
摘要:1 //write by:cyt 2 //Project Name:Led on/off 3 //Time:2017-2-10 4 #include<reg51.h> 5 void delay(int c) 6 { 7 int a=38; 8 int b=130; 9 for(;c>0;c--) 1 阅读全文

posted @ 2017-02-10 16:35 GrayAngel 阅读(182) 评论(0) 推荐(0)

51单片机延时计算方法
摘要:keil里面选取delay为断点 记录程序运行到此处所用的时间t_start 运行delay(1) 记录程序运行完后的时间t_end t_end-t_start即为运行1次的时间。 阅读全文

posted @ 2017-02-10 15:17 GrayAngel 阅读(1083) 评论(0) 推荐(0)