您好,欢迎访问三七文档
APPLICATIONNOTERL78/G13R01AN0458EJ0100Rev.1.00Sep.30,2011TimerArrayUnit(PulseIntervalMeasurement)IntroductionThisapplicationnotedescribeshowthetimerarrayunit(TAU)measurestimeintervalsbetweenpulses.Thisunitmeasuresthetimeelapsedbetweenpulseswhicharriveatthetimerinputpin(TI00).Then,itstoresthemeasuredvalueintheon-chipRAM.TargetDeviceRL78/G13Whenapplyingthesampleprogramcoveredinthisapplicationnotetoanothermicrocomputer,modifytheprogramaccordingtothespecificationsforthetargetmicrocomputerandconductanextensiveevaluationofthemodifiedprogram.R01AN0458EJ0100Rev.1.00Page1of21Sep.30,2011RL78/G13TimerArrayUnit(PulseIntervalMeasurement)R01AN0458EJ0100Rev.1.00Page2of21Sep.30,2011Contents1.Specifications......................................................................................................................................32.OperationCheckConditions.................................................................................................................43.RelatedApplicationNote......................................................................................................................44.DescriptionoftheHardware.................................................................................................................54.1HardwareConfigurationExample.........................................................................................................54.2PintobeUsed.....................................................................................................................................55.DescriptionoftheSoftware..................................................................................................................65.1OperationOutline................................................................................................................................65.2ListofOptionByteSettings..................................................................................................................75.3ListofConstants..................................................................................................................................75.4ListofVariables..................................................................................................................................75.5ListofFunctions..................................................................................................................................85.6FunctionSpecifications........................................................................................................................85.7Flowcharts..........................................................................................................................................95.7.1InitializationFunction.....................................................................................................................95.7.2Systemfunction............................................................................................................................105.7.3I/OPortSetup..............................................................................................................................115.7.4CPUClockSetup.........................................................................................................................125.7.5TimerArrayUnitSetup.................................................................................................................135.7.6MainProcessing...........................................................................................................................185.7.7TimerArrayUnitStartup..............................................................................................................196.SampleCode.....................................................................................................................................217.DocumentsforReference...................................................................................................................21RevisionRecord........................................................................................................................................22GeneralPrecautionsintheHandlingofMPU/MCUProducts........................................................................23RL78/G13TimerArrayUnit(PulseIntervalMeasurement)1.SpecificationsThisapplicationnotedescribesthemeasurementoftimeintervalsbetweeninputpulsesonchannel0ofthetimerarrayunit(TAU).Eachtimeavalidedgeisdetectedonthetimerinputpin(TI00),thecountvalueofthetimeriscapturedtomeasurethepulseinterval.Themeasurementresultisstoredintheon-chipRAM.Table1.1showstherequiredperipheralfunctionsandtheiruses.Figure1.1presentsanoverviewofthepulseintervalmeasurement.Table1.1RequiredPeripheralFunctionsandTheirUsesPeripheralfunctionUseTimerarrayunitchannel0Measurementofthetimeintervalbetweeninputpulsesonthetimerinputpin(TI00)TI00InputpinforpulsesignalsR01AN0458EJ0100Rev.1.00Page3of21Sep.30,2011Eachtimeapulseintervalismeasured,themeasurementresu
本文标题:R5F100LEA
链接地址:https://www.777doc.com/doc-6891177 .html