1. 首页
  2. 课程学习
  3. 嵌入式
  4. PIC16C74及其外围设备的照顾和保养

PIC16C74及其外围设备的照顾和保养

上传者: 2022-10-20 12:38:11上传 PDF文件 90.74 KB 热度 3次

ThePIC16C74isoneofthelatestmid-rangemicrocon-trollersfromMicrochipTechnologyInc.Inthisarticlewe

willbeaddressingafewofthenewfeaturesand

peripheralsofthisnewpart.Themainfocuswillbeon

theA/D(Analog-to-Digital)Converter,theSCI(Serial

CommunicationInterface),andthePWM(PulseWidth

Modulator).Ourintentionistogiveyouasmallprogram

thatinitializestheseperipheralsaswellasexercises

them.Aschematicisprovided.ThePICDEM

TM

2board

fromMicrochipwillrunthisprogram.Thesecondtrim-potdoesnotexistonthePICDEM2board,sothesec-ondA/Dvaluemayfloataround.Thesecondtrimpotis

onlyusedtoshowamethodofchangingA/Dinputpins.

IfyouareusingthePICDEM2board,thentheLEDand

acurrentlimitingresistormustbeconnectedtothe

PWMoutput.Whentheprogramisrun,theRS-232ter-minalwilldisplaytwoA/Dvalues.Thebrightnessofan

LEDisadjustedusingpulsewidthmodulation.Theduty

cycleisdeterminedbythetrimpotsetting.

MFACT003CareandFeedingofthePIC16C74andItsPeripheralsA/DConverterMysteriesAuthor:RobertAngeloTheA/DconverteranditseightinputchannelswillbeMicrochipTechnologyInc.ourfirsttopic.SettinguptheA/Dconverterinvolvestwospecialfunctionregisters:ADCON0ThePIC16C74isoneofthelatestmid-rangemicrocon-

用户评论