![](https://img-blog.csdnimg.cn/a2b8f182bfff4c4b80c3adaa4e410a7b.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
51单片机
文章平均质量分 77
单片机的小实验
Sea_Rainbow
Everything is possible.
展开
-
51单片机:4位数码管动态显示,从1234开始,每次按S1键加1
#include <reg52.h>#include <stdlib.h>#define uint unsigned long #define uchar unsigned charsbit N1 = P1^0;sbit N2 = P1^1;sbit N3 = P1^2;sbit N4 = P1^3;sbit S1 = P...原创 2019-10-14 19:19:43 · 19297 阅读 · 3 评论 -
51单片机:每按一次按键,流水灯移位演示
#include<reg52.h>#include<intrins.h>#define uchar unsigned char#define uint unsigned intsbit S1 = P3^7;void delayms(uint xms){ uint i,j; for(i = xms;i > 0;i--) fo...原创 2019-10-14 19:18:29 · 2785 阅读 · 0 评论 -
51单片机:4位数码管动态显示,从6000开始,每0.5秒加1
#include <reg52.h>#include <stdlib.h>#define uint unsigned long#define uchar unsigned charsbit N1 = P1^0;sbit N2 = P1^1;sbit N3 = P1^2;sbit N4 = P1^3;uchar code table[]={0xc0,0xf...原创 2019-10-14 19:17:14 · 3571 阅读 · 1 评论 -
51单片机:在2位数码管上循环显示00-99,间隔0.5秒
#include<reg51.h>sbit P12=P1^2;sbit P13=P1^3;unsigned char code DSY_CODE[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0xff};void DelayMS(unsigned int x){ unsigned char t; wh...原创 2019-10-14 19:13:06 · 20300 阅读 · 1 评论 -
51单片机:温度采集、显示和发射接收
发射:TX接收:RXNRF24L01.c#include "typedef.h"#include <intrins.h>#include <string.h>#include "NRF24L01.h"#include "delay.h"#define uchar unsigned charuchar const TX_A...原创 2019-10-14 19:27:41 · 1834 阅读 · 0 评论 -
51单片机:多点发射、单点接收
#include "typedef.h"#include <intrins.h>#include <string.h>#include "NRF_24L01.h"#include "delay.h"#define uchar unsigned charuchar const TX_ADDRESS[TX_ADR_WIDTH] = {0x3...原创 2019-10-14 19:33:05 · 519 阅读 · 0 评论 -
51单片机:STC_1602显示18B20温度
NRF2401_TX.H程序#include<reg52.h>#include<intrins.h>#define uchar unsigned char#define uint unsigned int#define TX_ADR_WIDTH 5 // 5 uints TX address width#define ...原创 2019-10-14 19:43:30 · 903 阅读 · 0 评论 -
51单片机:STC_1602温度采集和显示
LCD1602.c#include<LCD1602.h>/********************延时函数,延时一毫秒************************/void LCD1602_Delay(uint z){ uint x,y; for(x=z;x>0;x--) fo...原创 2019-10-14 19:57:46 · 2165 阅读 · 0 评论 -
51单片机:STC_1602显示自己的名字与学号
#include <reg51.h>#include <intrins.h>#define uchar unsigned char#define uint unsigned int#define LcdBus P0sbit LED1602_RS=P1^0; //LCD端口定义sbit LED1602_RW=P1^1 ;sbit LED160...原创 2019-12-14 15:30:34 · 16663 阅读 · 1 评论