PIC16CXXXmicrocontrollersfromMicrochipTechnology,

Inc.,high-performance,EPROM-based8-bitmicrocon-

trollers.Someofthemembersofthisseries(likethe

PIC16C71andPIC16C84)donothaveanon-chiphard-

wareasynchronousserialport.Thisapplicationnote

describestheinterruptdrivensoftwareimplementationof

AsynchronousSerialI/O(HalfDuplexRS-232Communi-

cations)usingPIC16CXXXmicrocontrollers.These

microcontrollerscanoperateatveryhighspeedswitha

minimumof250nscycletime(withinputclockfrequency

of16MHz).TotesttheRS-232routines,asimpleDigital

Voltmeter(DVM)/AnalogDataAcquisitionSystemhas

beenimplementedusingaPIC16C71,inwhich,upon

receptionofacommandfromhost(IBMPC-AT

),an8-bit

valueoftheselectedA/Dchannelistransmittedbackto

thehost.MSoftwareImplementationofAsynchronousSerialI/OAN555TransmissionofabyteisperformedbycallingtheAuthor:AmarPalacherlaPutCharfunctionandthedatabyteintheTxRegisMicrochipTechnologytransmittedout.Beforecallingthisfunction(PutChar),CodeUpdate:ScottFinkthedatamustbeloadedintoTxRegandensuretheMicrochipTechnologyInc.serialportisfree.Theserialportisfreewhenboththe_txmtP

软件实现异步串行的I  O

软件实现异步串行的I  O