文件名称:ds18b20
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:2.92kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
如何编写读/写一个字节的函数呢?
1. 读一个字节
uchar tmpread(void) //read a byte date 读一个字节
{
uchar i,j,dat
dat=0
for(i=1 i<=8 i++)
{
j=tmpreadbit()
dat=(j<<7)|(dat>>1) //读出的数据最低位在最前面,这样刚好一个字节在DAT里
}
return(dat) //将一个字节数据返回
}-How to write read/write one byte of the function does? 1. Reading a byte uchar tmpread (void)// read a byte date read one byte (uchar i, j, dat dat = 0 for (i = 1 i < = 8 i++) (j = tmpreadbit () dat = (j < < 7) | (dat> > 1) // read out data at the top of the minimum, this is just one byte in the DAT-ri) return (dat) // will be a word section of data to return)
1. 读一个字节
uchar tmpread(void) //read a byte date 读一个字节
{
uchar i,j,dat
dat=0
for(i=1 i<=8 i++)
{
j=tmpreadbit()
dat=(j<<7)|(dat>>1) //读出的数据最低位在最前面,这样刚好一个字节在DAT里
}
return(dat) //将一个字节数据返回
}-How to write read/write one byte of the function does? 1. Reading a byte uchar tmpread (void)// read a byte date read one byte (uchar i, j, dat dat = 0 for (i = 1 i < = 8 i++) (j = tmpreadbit () dat = (j < < 7) | (dat> > 1) // read out data at the top of the minimum, this is just one byte in the DAT-ri) return (dat) // will be a word section of data to return)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ds18b20.c
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.