欢迎来到天天文库
浏览记录
ID:20901119
大小:130.64 KB
页数:8页
时间:2018-10-17
《90614驱动程序》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、#include//i2c总线sbitscl=P2A4;sbitsda=P2八5;//commandmode#defineRamAccessOxOO#defineEepomAccess0x20#defineMode0x60#defineExitMode0x61#defineReadFlagOxfO#defineEnterSleepOxff0x03//周闱温度0x040x050x06//环境温度//ramaddressreadonly#defineAbmientTempAddr#de
2、fineIRlAddr//defineIR2Addr#defineLineAbmientTempAddrr*0x00000x4074165000.01/单元-40125*///defineLineObjlTempAddr0x07//目标温度,红外温度/*0x27ad-0x7fff0x3559226100.02/单元-70.01-382.190.01452.2*/#defineLineObj2TempAddr0x08//eepomaddress#defineTObjMaxAddr0x00#define
3、TObjMinAddr0x01//definePWMCtrlAddr0x02#defineTaRangeAddr0x03#defineKeAddr0x04#defineConfigAddr0x05//defineSMbusAddrOxOe#defineReserverdlAddrOxOf#defineReserverd2Addr0x19#defineIDlAddrOxlc//defineID2AddrOxld//defineID3AddrOxle#defineID4AddrOxIf/♦PWMCtrl
4、Addrbit[15,9]pwmclockconfiguration2MHzdividedbynumberwritteninthisplace.(128incasethenumberis0.)AsinglePWMperiodconsistsof2048clocksandextendedPWMof4096clocksforeachperiod(2Tinfigure6).The2MHzclockisvalidforthenominalHFOfrequency.bits[8:4]ExtemdedPWMde
5、finitionNumberofrepetitionsdividedby2ofsensor1and2inExtendedPWMmode.Thenumberofrepetitionscanvaryfrom0to64times.Bit3Modeselection1-ThermoRelay,0-PWM,FactorydefaultBit2ConfigurationofthepinPWM:1-Push-Pull,0—OpenDrainNMOS,factorydefaultBit1Enable/disable
6、thePWM:1-EnablePWM,disableSMBus0-DisablePWM(EnableSMBus),FactorydefaultBit0SelectthetypeofPWMmode:1-SinglePWM,factorydefaultforMLX90614xAx0-ExtendedPWM,factorydefaultforMLX90614xBxconfigurationregister1Bit15-Definethesignofthermoshockcompensation:1-neg
7、ative,0-positive.Bits[13:ll]-Configurethegainofamplifier:0->ll->32->63->12.54->255->506->1007->100Bits[10:8]-ConfigurecoefficientNofFIRdigitalfilter:0->81->162->323->644->1285->2566->5127->1024Bit7-DefinethesignKs(Ks=dAlpha/dTobj):Factorycalibration,do
8、notalterBit6-DefinethenumberIRsensors:1-2sensors,0-1sensor.Bits[5:4]-ConfigurethetypeofdatatransmittedthroughPWM:0->TaIR1l->TaIR23->IR1IR24->IR2UndefinedSinglePWMformatExample:Tobjl=>ConfigReg[5:4]=ll'bTomin=0°C=>Tomin[EEPROM]=100*(tomi
此文档下载收益归作者所有