ADXL345的详细介绍资料 本模块使用说明书。 本压缩文件能够利用角度传感器对x,y,z三方的加速度值,角度值进行测量,并集成了1602对其进行显示。 为了便于使用,我们分别将模块单独化,如果您有使用的意向,可以单独摘出 angle.c 引入到您自己新建的工程中。 关于angle.c文件的内部函数使用说明。 首先为了便于使用和方便引用我们对内部函数进行了高度集成化,您在引入angle.c后直接在您的主程序中调用 dis_data();函数,可完成ADXL345芯片的测量数据, 测量数据说明: char as_Xjiasu[6],as_Yjiasu[6],as_Zjiasu[6]; //定义3轴静态重力加速度值的ASCII码值 unsigned char as_Xangel[4],as_Yangel[4],as_Zangel[4]; //定义3轴角度值的ASCII码值 as_Xjiasu[x]数组里边我们为了您的使用直接将 加速度值转换成了 能够直接显示到 1602上的ASCII码值,同理as_Xangel 真实数据存放说明。 float jiasu_xyz[3]; angel_xyz[3]; //存放X,Y,Z 轴的静态重力加速度,角度值 存放了 加速度和角度的真实值(未经转换成ASCII码的数据)--本数据可以用于其他用途,直接参与MCU内部运算等。
上传时间: 2013-11-17
上传用户:wpwpwlxwlx
多远程二极管温度传感器-Design Considerations for pc thermal management Multiple RDTS (remote diode temperature sensing) provides the most accurate method of sensing an IC’s junction temperature. It overcomes thermal gradient and placement issues encountered when trying to place external sensors. PCB component count decreases when using a device that provides multiple inputs.Better temperature sensing improves product performance and reliability. Disk drive data integrity suffers at elevated temperatures. IBM published an article stating that a 5°C rise in operating temperature causes a 15% increase in the drive’s failure rate. The overall performance of a system can be improved by providing a more accurate temperature measurement of the most critical devices allowing them to run just a few degrees hotter.The LM83 directly senses its own temperature and the temperature of three external PN junctions. One is dedicated to the CPU of choice, the other two go to other parts of your system that need thermal monitoring such as the disk drive or graphics chip. The SMBus-compatible LM83 supports SMBus timeout and logic levels. The LM83 has two interrupt outputs; one for user-programmable limits and WATCHDOG capability (INT), the other is a Critical Temperature Alarm output (T_CRIT_A) for system power supply shutdown.
标签: Considerat Design 远程 二极管
上传时间: 2014-12-21
上传用户:ljd123456
此资料网上搜集。你可以到其他地方找到。我不负责专利和知识产权。.txt
上传时间: 2014-01-01
上传用户:caiiicc
1.1 我如何决定使用那种整数类型? 如果需要大数值(大于32, 767 或小于¡32, 767), 使用long 型。否则, 如果空间很重要(如有大数组或很多结构), 使用short 型。除此之外, 就使用int 型。如果严格定义的溢出特征很重要而负值无关紧要, 或者你希望在操作二进制位和字节时避免符号扩展的问题, 请使用对应的无符号类型。但是, 要注意在表达式中混用有符号和无符号值的情况。
上传时间: 2013-11-22
上传用户:ming529
10种软件滤波方法的示例程序 假定从8位AD中读取数据(如果是更高位的AD可定义数据类型为int),子程序为get_ad(); 1、限副滤波 /* A值可根据实际情况调整 value为有效值,new_value为当前采样值 滤波程序返回有效的实际值 */ #define A 10 char value; char filter() { char new_value; new_value = get_ad(); if ( ( new_value - value > A ) || ( value - new_value > A ) return value; return new_value; }
上传时间: 2013-11-11
上传用户:gxf2016
简单电子琴的51单片机程序 #include<reg51.h> //包含51单片机寄存器定义的头文件 sbit P14=P1^4; //将P14位定义为P1.4引脚 sbit P15=P1^5; //将P15位定义为P1.5引脚 sbit P16=P1^6; //将P16位定义为P1.6引脚 sbit P17=P1^7; //将P17位定义为P1.7引脚 unsigned char keyval; //定义变量储存按键值 sbit sound=P2^0; //将sound定义为P2.0 unsigned int C; //全局变量,储存定时器的定时常数 unsigned int f; //全局变量,储存音阶的频率 //以下是C调低音的音频宏定义 #define l_dao 262 //将“l_dao”宏定义为低音“1”的频率262Hz #define l_re 294 //将“l_re” 宏定义为低音“2”的频率294Hz #define l_mi 330 //将“l_mi” 宏定义为低音“3”的频率330Hz #define l_fa 349 //将“l_fa” 宏定义为低音“4”的频率349Hz #define l_sao 392 //将“l_sao”宏定义为低音“5”的频率392Hz #define l_la 440 //将“l_la” 宏定义为低音“6”的频率440Hz #define l_xi 494 //将“l_xi” 宏定义为低音“7”的频率494Hz //以下是C调中音的音频宏定义 #define dao 523 //将“dao”宏定义为低音“1”的频率Hz #define re 587 //将“re” 宏定义为低音“2”的频率Hz #define mi 659 //将“mi” 宏定义为低音“3”的频率Hz #define fa 698 //将“fa” 宏定义为低音“4”的频率Hz #define sao 784 //将“sao”宏定义为低音“5”的频率Hz #define la 880 //将“la” 宏定义为低音“6”的频率Hz #define xi 988 //将“xi” 宏定义为低音“7”的频率Hz
上传时间: 2013-11-09
上传用户:tian126vip
C语言函数大全,已包含绝大部分的函数。每个函数包含函数名,功能,用法,举例,内容详尽。希望对大家有所帮助~~ 函数名: abort 功 能: 异常终止一个进程 用 法: void abort(void); 程序例: #include #include int main(void) { printf("Calling abort()\n"); abort(); return 0; /* This is never reached */ } 函数名: abs 功 能: 求整数的绝对值 用 法: int abs(int i); 程序例: #include #include int main(void) { int number = -1234; printf("number: %d absolute value: %d\n", number, abs(number)); return 0; }
上传时间: 2013-12-06
上传用户:feifei0302
你是否曾经这样定义过变量:int a[50]; ?或许你会说,这是一句再普通不过的代码了。那么int a[1000000]; 呢?int a[512][512]; 呢?用了这么久的VC,直到今天才发现,自己连最基本的东西还没弄清楚。
上传时间: 2014-04-06
上传用户:15736969615
//------------------------------------------------------------------------------------//此程序为ADC转换程序,可以选择向ADC0BUSY写1或用定时器0,1,2,3作为ADC的启动信号。////------------------------------------------------------------------------------------//头文件定义//------------------------------------------------------------------------------------//#include <c8051f330.h> #include <stdio.h> //-----------------------------------------------------------------------------// 定义16位特殊功能寄存器//----------------------------------------------------------------------------- sfr16 ADC0 = 0xbd; sfr16 TMR0RL = 0xca; sfr16 TMR1RL = 0xca; sfr16 TMR2RL =0xca; sfr16 TMR3RL =0xca; sfr16 TMR0 = 0xCC; sfr16 TMR1 = 0xCC; sfr16 TMR2 = 0xcc; sfr16 TMR3 = 0xcc; //-----------------------------------------------------------------------------// 全局变量定义//-----------------------------------------------------------------------------char i;int result; //-----------------------------------------------------------------------------//定义常量//-----------------------------------------------------------------------------#define SYSCLK 49000000 #define SAMPLE_RATE 50000 //------------------------------------------------------------------------------------// 定义函数//------------------------------------------------------------------------------------void SYSCLK_Init (void);void PORT_Init (void);void Timer0_Init (int counts);void Timer1_Init (int counts);void Timer2_Init (int counts);void Timer3_Init (int counts);void ADC0_Init(void);void ADC0_ISR (void);void ADC0_CNVS_ADC0h(void);//------------------------------------------------------------------------------------// 主程序//------------------------------------------------------------------------------------ void main (void) { int ADCRESULT[50] ; int k; PCA0MD &= ~0x40; // 禁止看门狗 SYSCLK_Init (); PORT_Init (); Timer0_Init (SYSCLK/SAMPLE_RATE); //Timer1_Init (SYSCLK/SAMPLE_RATE); //选择相应的启动方式 //Timer2_Init (SYSCLK/SAMPLE_RATE); //Timer3_Init (SYSCLK/SAMPLE_RATE); ADC0_Init(); EA=1; while(1) { //ADC0_CNVS_ADC0h(); k=ADC0; ADCRESULT[i]=result; //此处设断点,观察ADCRESULT的结果 } }
上传时间: 2013-10-13
上传用户:SimonQQ
一个24c16的读写程序(已经调试过)(arens) //////////////////////////////////////////////////////////////// //24c16读写驱动程序,FM24C16A-AT24C16中文资料pdf //=-------------------------------------------------------------------------------/*模块调用:读数据:read(unsigned int address)写数据:write(unsigned int address,unsigned char dd) dd为要写的 数据字节*///---------------------------------------------------------------------------------- sbit sda=P3^0;sbit scl=P3^1; sbit a0=ACC^0; //定义ACC的位,利用ACC操作速度最快sbit a1=ACC^1;sbit a2=ACC^2;sbit a3=ACC^3;sbit a4=ACC^4;sbit a5=ACC^5;sbit a6=ACC^6;sbit a7=ACC^7; //--------------------------------------------------------------------------------------#pragma disablevoid s24(void) //起始函数{_nop_(); scl=0; sda=1; scl=1; _nop_(); sda=0; _nop_(); _nop_(); scl=0; _nop_(); _nop_(); sda=1;
上传时间: 2013-10-31
上传用户:fdfadfs