华中科技大学硕士学位论文基于蓝牙的智能数据采集系统的设计与实现姓名:李勇申请学位级别:硕士专业:通信与信息系统指导教师:汪小燕20080601IATmega128LADCuC/OS-IIFlashuC/OS-IIIIAbstractWiththecontinuouslyimprovementofscienceandinnovationoftechnologiesrelated,theuseofbluetoothtechnologyisgrowingevenfasterinmanyaspects,indailyworkandlife.Bluetoothtechnology,high-dependability,lowpowerandcost,isakindofcommunicationstandardforwirelessandshortdistance,whichgivestheconvenienceforuse.Itaimstoreplacethecablebetweentheinformationequipmentswithradiowaveandestablishapersonalareanetworktocommunicationwitheachother.Themainresearchcontentofthisthesisistodesignandimplementationasmartsystembasedonthecommunicationtechnologyofbluetooth.Thisthesisaimstoresearch,designandrealizeasmartsystembasedonthecommunicationbluetoothtechnology.Thecontentsmainlyincludethedesignofsystemhardwareplatformandsoftwaredevelopmentbasedonthishardwareplatform,emphaticallyanalyzetheprocesshowtosetupthesystemhardwareplatformandhowtodesigntheimportantmodules'softwareandhardware.Afteranalysisofthesystemrequirementoffunction,aembeddedsystemwhichusesATmega128Lasmicroprocessorisdesignedonthehardwareplatform,whichincludesbluetoothmodule,dataacquisitionandprocessingmodule,real-timeclockmodule,powermoduleandman-machineinteractionmodule.Thedataacquisitionandprocessingmoduleincludesensors,analog-digitalconverterandFlashchip,respectivelyusedtoacquire,convertandmemorythefielddata.Real-timeclockmodulesuppliesthefunctionofpre-settingsystemclocktimeforusers.Onthesoftwareplatformdesignaspect,everymodule'sdriverisdesigned,theembeddedreal-timeoperatingsystemuC/OS-IIistransplantedandapplicationprogrambasedonitiscompiled,filesystemforFlashisalsodesignedsoastoconvenientlyoperateandmanagethedatafiles.Atlast,thesystemtestresultissuppliedwhichprovesthatthesystemrequirementoffunctionandperformancerequiredisachieved.Thesystemhasareasonablehardwarecircuitdesign,flexibleinterfaces.BaseonuC/OS-II,theapplicationprogramisdevelopedeasily,flexiblyandefficiently.Mostofall,thebluetoothmoduleworksnormallyandstability,itiseasytobefurtherdeveloped.Keywords:bluthooth;dataacquisition;sensor;Flash;uC/OS-II;filesystem “√”111.11.1.12050607080[1]90[2]21.1.21ADC(AnalogtoDigitalConvter)DSPFPGA2PCB3[3]4GSMCDMAZigbee51.1.33ADC1-11-112A/D345GSM/CDMAMODEMZigbee(1)(2)(3)(4)4(5)1.2IEEE802.11HomeRF101001Mb/s3Mb/s[4]UWB[5]1600ISMIEEE802.11[6]IEEE802.1130011Mb/sIEEE802.11HomeRFSWAP501Mb/s2Mb/s[7]PC65IEEE802.11HomeRF1.3622.1(1)ADC(2)NAND(3)(4)uC/OS-II(5)ATmega128LUARTADCNAND2-17ATmega128LLCD5V3.3VRAMISP2-12.22.2.1ADCAD22103ADXL103ADXL203ADCMAXIMMAX197BCNI812100Ksps6usK9F5608U0ANANDFlash32M8I/OI/O2.2.2CSRCambridgeSiliconRadioBlueCore2-External2.4GHz[8]82.2.3ATmelATmega128LRISC8AVR8MHzCPU8MIPS([9]5V3.3VL7805CV(LinearTechnologyCorporation)LT1117-3.32.2.4PCF8563RTCIIC0xA3H0xA2HLCD2.32-29UC/OS-II2-22.3.1MAX197K9F5608U0APCF8563LCDNANDFlash[10]FAT162.3.2PCWinAVRISPATmega128L102.42.4.1ADCA/DFATFATFAT2-3FATADCFAT2-32.4.2SerialPortProfileSPP11[12](1)(2)2-42-4122.4.3A000DB0000A000DB0000115.2Kb/s2.5HCI[13]2-52-6SSSSSSSSMMMMSSSSSSMSS2-52-61MasterSlave256725610136Mb/s2.6――1433.1[14]12100Ksps312432M5ATmega128L3.1.11AD22103AD22103AD(AnalogDevices)0+1003.3V0.25V03.3V+3.05V1003.3VADCAD22103RTDResistanceTemperatureDetector3-115IRT+VSVOUT3-1AD22103RTVOUT(VS/3.3V)×[0.25V+(28.0mV/)×TA]2ADXL103/ADXL203ADXL103/203AD/±1.7g–40+1253-2+5VADXL203+5V32KXOUTCXSTCOMCDCVS32KYOUTCYADXL10332KXOUTCXSTCOMCDCVS3-2/ADXL103/203ADXL103/203XOUTYOUT32kΩ3dBF–3dB=1/(2π(32kΩ)×CX)3-1162000pF3-1(uF)(Hz)4.710.10500.051000.0272000.01500ADXL103/20332KΩA/DMAX19712KΩuA7413-3ADCuA741+15V-15V3-3uA741+15V-15V106dB1MΩ75Ω[15]3.1.2MAX1971MAX197ADCMAX197Maxim12A/D17+5V6us8--8I/O[16]2MAX197283-2MAX1971CLKCclk=100pFfclk=1.56MHz345HBEN12486FULLPD7-15D0—D11/16-23CH0-CH72425REFADJ/0.01uF26REF/4.096VREFADJREFADJ183-33-43-3MAX197D7D6D5D4D3D2D1D0PD1PD0ACQMODRNGBIPA2A1A03-476PD1,PD05ACQMOD0=(6)1=4RNG3BIP210A2,A1,A03MAX197MAX197D5(D5=0)A/D(D5=1)A/DACQMOD1ACQMOD0MAX197A/DMAX197INTMAX1978MAX1973-43-4HBEN12484812193-4MAX1974MAX197MAX197ATmegal128PORTF0PORTF7MAX197D0D7MAX197ATmegal128LPORTD4MAX197SHDNPORTD7HBEN0.1uFMAX1973-53-5MAX197203.1.3K9F5608U0A1K9F5608U0AK9F5608U0AK9F5608U0ANAND+5V(32M+1024K)×865536(512+16)1651252751232[17]3-63-6K9F5608U0A2K9F5608U0AK9F5608U0A8I/O32M248163-58163-5I/O0A0A9I/O1A1A10I/O2A2A11I/O3A3A12I/O4A4A13I/O5A5A14I/O6A6A15I/O7A7A16A17A18A19A20A21A22A23A24I/O21(A0A7A9A16A17A21A8)3-63-6I/O0-I/O7CLEI/OWEALEWECECEstandbyCEREWEWEWPWPR/B2K9F5608U0AK9F5608U0AATmega128L3-7PORTAI/O0I/O7PORTE4CLEPORTE6ALEPORTE5CEPORTE3R/BPORTE7PORTE2WERE223-7K9F5608U0AATmega128L3.23.2.1BlueCore02-ExternalCSRCambridgeSiliconRadioBlueCore02-External2.4GHz0.18umCMOSMCU1.8V[18]RISCHCI[19]3-8BlueCore02-ExternalBlueCore02-External(1)UART23DSPRAMMCU2.4GHzI/OSPIUARTPIOPCM8MFlash3-8BlueCore02-External(2)PCMPCMPCM(3)USB(4)SynchronousSerialPortInterfaceSPISPIFlash(5)I/OBlueCore2-External15I/O12I/O3I/O3.2.2BlueCore02-ExternalFB2520[20]FB2520-07E2R4B2.42.5GHz50ohmBlueCore02-External3-7FB25203-7121.8V345624PIFA(PlanarInvertedFAntenna)[21]3UARTIO0IO1IO2LED3-93.3