R5F100LEA

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

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

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

资源描述

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

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

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

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

×
保存成功