所需E币: 4
时间: 2019-12-24 21:23
大小: 90.74KB
ThePIC16C74isoneofthelatestmid-rangemicrocon-trollersfromMicrochipTechnologyInc.Inthisarticlewewillbeaddressingafewofthenewfeaturesandperipheralsofthisnewpart.ThemainfocuswillbeontheA/D(Analog-to-Digital)Converter,theSCI(SerialCommunicationInterface),andthePWM(PulseWidthModulator).Ourintentionistogiveyouasmallprogramthatinitializestheseperipheralsaswellasexercisesthem.Aschematicisprovided.ThePICDEMTM2boardfromMicrochipwillrunthisprogram.Thesecondtrim-potdoesnotexistonthePICDEM2board,sothesec-ondA/Dvaluemayfloataround.ThesecondtrimpotisonlyusedtoshowamethodofchangingA/Dinputpins.IfyouareusingthePICDEM2board,thentheLEDandacurrentlimitingresistormustbeconnectedtothePWMoutput.Whentheprogramisrun,theRS-232ter-minalwilldisplaytwoA/Dvalues.ThebrightnessofanLEDisadjustedusingpulsewidthmodulation.Thedutycycleisdeterminedbythetrimpotsetting.MFACT003CareandFeedingofthePIC16C74andItsPeripheralsA/DConverterMysteriesAuthor:RobertAngeloTheA/DconverteranditseightinputchannelswillbeMicrochipTechnologyInc.ourfirsttopic.SettinguptheA/Dconverterinvolvestwospecialfunctionregisters:ADCON0ThePIC16C74isoneofthelatestmid-rangemicrocon-……