ds18b20-1602测温

#include<reg51.h> #define uchar unsigned char #define uint unsigned int sbit DQ=P2^4;//temp sbit RS=P2^6; sbit RW=P2^5; sbit EN=P2^7; uchar code str1[]={" temperature: "}; uchar code str2[]={""}; uchar data disdata[5]; uint tvalue; uchar tflag; ...
2020-03-30 21:47 | 阅读 2073 次 | 评论 2 条

单片机音频

#include <REGX52.H> sbit speaker=P2^1; unsigned char timer0h,timer0l,time; //定义每个音阶的长度的数组 《世上只有妈妈好》 code unsigned char song_mother[]= { 6,2,3,5,2,1 ,3,2,2,5,2,2, 1,3,2,6,2,1,5,2,1, 6,2,4,3,2,2, 5,2,1, 6,2,1, 5,2,2, 3,2,1 ,2,2,1,1,2,1, 6,1,1,5,2,1, 3,2,1 ,2,2,4, 2,2,3, 3,2,1, 5,2,2, 5,...
2019-12-15 14:31 | 阅读 1842 次 | 评论 0 条
浏览233225次
最新评论