文件名称: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
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
