- 博客(1)
- 资源 (2)
- 收藏
- 关注
原创 dsp入门
dsp多核通信之ipc 多核之间通信ipc: ipc通信是一种基于messageQuene的一种消息机制。 通信一般采用与三种模式,1.共享内存 2.硬件中断 3.任务中断 1.共享内存:可以有效的节省系统资源,多核之间访问同一内存,若数据只读,可以采用共享内存,若数据可写,要设计每个核之间对内存的操作顺序,防止出现数据被胡乱的篡改。 2.硬件中断:硬件中断有很好的
2016-12-21 19:30:43 794
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关注的人