自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(0)
  • 资源 (1)
  • 收藏
  • 关注

空空如也

18B20温度检测,单片机

#include <reg52.h> #define uchar unsigned char #define uint unsigned int sbit DS=P2^7; //define interface 定义接口 uint temp; // variable of temperature 定义一个变量用来表示温度 uchar flag1; // sign of the result positive or negative 定义一个标志,标志温度是否还是正 sbit P2_0=P2^0; //数码管位选 sbit P2_1=P2^1; sbit P2_2=P2^2; unsigned char code table[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82, //数字编码 0xf8,0x80,0x90}; unsigned char code table1[]={0x40,0x79,0x24,0x30,0x19,0x12,0x02, //带小数点的编码 0x78,0x00,0x10}; void delay(uint count) //delay 延时子程序 { uint i; while(count) { i=200; while(i>0) i--; count--; } }

2011-06-14

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除