自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(1)
  • 资源 (2)
  • 收藏
  • 关注

原创 centos tftp配置

yum install tftp_server yum install tft 安装tftp服务端和客户端 修改tftp的配置文件 vim /etc/xinetd.d/tftp service iptables stop    关闭防火墙 service xinetd    restart   重启xinetd vim /etc/sysconfig/selin

2017-05-11 17:35:13 258

ITE6801 驱动源码和Programming Guide

ite6801 驱动源码和 Programming 手册,The serial programming output ports are not real open-drain drivers. Sink current is guaranteed by I/O design under the condition of driving the output pin with 0.2V. In a real I 2 C environment, multiple devices and pull-up resistors could be present on the same bus, rendering the effective pull-up resistance much lower than that specified by the I 2 C Standard. When set at maximum current, the serial programming output ports of the IT6801FN are capable of pulling down an effective pull-up resistance as low as 500Ω connected to 5V termination voltage to the standard I 2 C V IL . When experiencing insufficient low level problem, try setting the current level to higher than default. Refer to IT6801FN Programming Guide for proper register setting

2017-09-05

颜色传感器

#include //包含头文件,这个嘛,就不用多说了~~ #include "L1602.h" //#define hong 10000 //out接p3.5 sbit tcs230_en=P1^0; sbit tcs230_s2=P1^1; sbit tcs230_s3=P1^2; uint ryz,gyz,byz; uint rb,gb,bb; //白平衡子程序 void celiang() { //*********求R值************************************ TH0=(65536-10000)/256; TL0=(65536-10000)%256; TH1=0; TL1=0; tcs230_s2=0; tcs230_s3=0;//选择红色滤光器 tcs230_en=0; TR0=1;//10毫秒开始计时 TR1=1;//开始计数 while(TF0==0);//等待定时器溢出 TF0=0;//清楚定时器0溢出标志 TR0=0;//关闭定时0 TR1=0; rb=(unsigned long)(TH1*256+TL1)*255/ryz; if(rb>255)rb=255;//判断RGB值是否合法 //***********求B值************************************** TH0=(65536-10000)/256; TL0=(65536-10000)%256; TH1=0; TL1=0; tcs230_s2=0; tcs230_s3=1;//选择蓝色滤光器 TR0=1;//10毫秒开始计时 TR1=1;//开始计数 while(TF0==0);//等待定时器溢出 TF0=0;//清楚定时器0溢出标志 TR0=0;//关闭定时0 TR1=0; bb=(unsigned long)(TH1*256+TL1)*255/byz; if(bb>255)bb=255;//判断RGB值是否合法 //***********求G值************************************** TH0=(65536-10000)/256; TL0=(65536-10000)%256; TH1=0; TL1=0; tcs230_s2=1; tcs230_s3=1;//选择绿色滤光器 TR0=1;//10毫秒开始计时 TR1=1;//开始计数 while(TF0==0);//等待定时器溢出 TF0=0;//清楚定时器0溢出标志 TR0=0;//关闭定时0 TR1=0; tcs230_en=1; gb=(unsigned long)(TH1*256+TL1)*255/gyz; if(gb>255)gb=255;//判断RGB值是否合法 } //****************************************************** //白平衡子程序 void baipingheng() { //**************求取红色因子*********************** TH0=(65536-10000)/256; TL0=(65536-10000)%256; TH1=0; TL1=0; tcs230_s2=0; tcs230_s3=0;//选择红色滤光器 tcs230_en=0; TR0=1;//10毫秒开始计时 TR1=1;//开始计数 while(TF0==0);//等待定时器溢出 TF0=0;//清楚定时器0溢出标志 TR0=0;//关闭定时0 TR1=0; ryz=TH1*256+TL1;//其实这里的比例因子应该为255/(TH1*256+TL1) //**************求取蓝色因子*********************** TH0=(65536-10000)/256; TL0=(65536-10000)%256;

2015-07-27

空空如也

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

TA关注的人

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