MCHP公司蓝牙耳机方案培训

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

1HandsFreeModulewithBlueToothInterfaceAgenda•Hands-FreeBoardOverview•MicrophoneandSpeakerInterfaces•SoftwareOverview•NoiseSuppressionandAcousticEchoCancellationIntroduction•WhyuseHands-FreeKits?–Safety–Regulations•WhyusedsPICforHands-FreeKits?–PeripheralslikeDCI,SPI,etc.providesupportformultiplecellphoneinterfaces–SpecialfeatureslikeNoiseSuppression(NS)andAcousticEchoCancellation(AEC)requiresignificantDSPcapability•ResourceRequirements–20MIPS,23KBFlash,4.7KBRAMAPGHFKReferenceKitHFMBlue-ToothInterface•Bluetoothspecificationv1.2•CompleteCo-locationandCo-existencewith802.11•Full8-to128-bitencryption•HighSpeedSPIInterfacewithMCUMCUFeatures•EchoCancellation•NoiseSuppression•CODECInterface(OKIMSM7704-01)•Bluetoothinterface(Bluemod+P25)•Hands-FreeBoardwithdsPIC33FJ256GP506•BlueToothInterface–v1.2–HandsFreeProfile•40WattAudioAmplifiers–CandriveCarspeaker•AutomotiveCommunicationProtocols–CAN2.0Binterface–LIN2.0vinterfaceasMaster•RS232forfeedbacktoPCorcanbeuseasdiagnosticportComponentsofReferenceDesign(contd.)Hands-FreeBoardOverviewHands-FreeKitModeCodecInterfaceHands-FreeKitModeBluemodInterfaceHands-FreeKitMode•DoesnotusecodecforBlueToothInterface–dsPICcommunicateswithcellphonedirectlyviahighSPI–8kHzinput/outputsamplingrate,framed14-bitPCMsignal•Codecusedonlyformicrophoneandspeakersignals–Convertsanalogsignalsfrommicrophonetodigital–ConvertsdigitalsignalsfromdsPICtoanalogandplaysoutthroughspeaker–8kHzinput/outputsamplingrate•dsPICcommunicateswithcodecviaDCImodule–SPISlave(serialclockfromcellphone),16-bitdatawords–16-bitwordtransmittedfromdsPICtocodec•Upperbyte:8-bitµ-lawsamplestobeplayedoutthroughspeaker•Lowerbyte:Zerodata–16-bitwordtransmittedfromcodectodsPIC•Upperbyte:8-bitµ-lawdatasampledfrommicrophone•Lowerbyte:DiscardedMicrophoneAnalogInterface•MicrophoneinputamplifiedbyMCP602op-amp•Op-ampgaincontrolledbyvaryingR6andR7–Vout=(1+R7/R6)*Vin–Whencodecinputgainissetto1,theop-ampoutputshouldbelimitedto1.4Vp-pSpeakerAnalogInterface•SpeakeroutputamplifiedbyMCP602op-amp•Op-ampgaincontrolledbyvaryingR56andR57–Vout=(-R56/R57)*Vin•AudioamplifiergaincontrolledbyvaryingR2andR3SoftwareOverview•Self-containedhands-freekitsoftwareapplicationsourcecode•IncludesMPLABIDEWorkspace(HFK.mcw),Project(HFK.mcp)andMap(HFK.map)files•Sourcefiles–main.c:mainfunctionfortheapplication–BTCodecDrv.c:InitializesDMAtransferfromBTthroughSPImodule–OKICodecDrv.c:InitializesDMAtransferfromcodecthroughDCImodule–G711.s:µ-law/A-lawcompandingroutines–timer.c:Timer1initializationfunctionandISR–traps.c:Traphandlerroutinesforalltraps•Includefiles–aec.h:HeaderfileforAcousticEchoCancellationLibrary–ns.h:HeaderfilesforNoiseSuppressionLibrarySoftwareOverview(contd.)MainFunctionFlowchartMainFunctionFlowchart•NoiseSuppression(NS)Libraryisusedtoreduceunwantednoisemixedwithspeech•Suitableforsystemswithoutanisolated‘noisereference’source–MobileHandsFreeKits–Speakerphones–Intercoms–Teleconferencingunits–Anymicrophone-basedapplication•Alsousefulasaspeechpreprocessor–e.g.,inSpeechRecognition•Libraryitselfisperipheral-independent•Typicalnoisereduction10-15dBNoiseSuppressionOverviewNoiseSuppressionOverview(contd.)•FrequencyDomainalgorithmbasedonSpectralSubtraction–VoiceActivityDetectordifferentiatesnoiseandspeech–Noisereductionfiltersself-adjustevery10msduringperiodsofspeechinactivity(usesFFT)–Speechiscontinuouslyfiltered,reducingnoiseNoiseSuppressionLibraryUserApplicationSpeechNoiseNoiseNoise-suppressedSpeechNoiseSuppressionAlgorithmYESHighPassFilterFastFourierTransformBandSNRComputationBandEnergyComputationVoiceActivityDetectionNoiseBandEnergyComputationScaleFactorComputationScalingofFrequencyBandsSpeechFrame?NO1FrameDelayInverseFFTInputSignalOutputSignal•ObtainNoiseSuppressionLibrarylicenseandsoftwarepackageasneeded•TointegrateNSLibraryintosoftwareapplication–Copylibraryarchivefile“libns.a”from“lib”folderoflibrarysoftwarepackagetothe“Hands-FreeKitSoftware”folderoftheMobileHands-FreeKitReferenceDesign–Add“libns.a”tothe“HFK.mcw”workspace–Un-commentthefollowingfunctioncallsin“main.c”•NoiseSuppressionInit()•NoiseSuppression()–BuildandprogramthedsPIC33FdeviceontheHands-FreeBoardusingICD2–Beforeorduringprogramexecution,movetheSW1switchtoONpositionIntegratingNoiseSuppression•Usedtocancelunwantedechocausedbyacousticpathfromspeakertomicrophone•ITUG.167compliant(upto64msechotail-length)•Suitableforsystemswherespeakerandmicrophoneareclosetoeachother–MobileHandsFreeKits–Speakerphones–Intercoms–Teleconferencingunits•Libraryitselfisperipheral-independent•Supportsfull-duplexoperation•Typicalechoreduction40-50dB,typicalconvergencerate30-40dB/secAcousticEchoCancellationOverview•BasedonLeastMeanSquare(LMS)AdaptiveFiltering–VoiceActivityDetectorandDoubleTalkDetectordeterminewhenAdaptiveFiltershouldbeadjusted–LMSFilteriterativelymodelsechopropagationpathduringperiodsoffar-endspeech–Filteroutputissubtractedfrommicrophoneinputevery10ms,removingechoReceiverAECLibrarySenderAECLibraryAcousticEchoofFar-endSpeechFar-endSpeechSINROUTRINSOUTNear-endSpeechNear-endSpeechAcousticEchoCancellationOver

1 / 27
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功