基于8051的MCP3201的A / D转换
Inembeddedcontrollerapplications,itisoftendesir-
abletoprovideameanstodigitizeanalogsignals.The
MCP320112-bitAnalog-to-Digital(A/D)Converter
givesthedesigneraneasymeanstoaddthisfeatureto
amicrocontrollerwithaminimalnumberofconnec-
tions.
ThisApplicationNotewilldemonstratehoweasyitisto
connecttheMPC3201toan8051-compatiblemicro-
processor.
TheMCP3201isafast100kHz12-bitA/DConverter
featuringlowpowerconsumptionandpowersaving
standbymodes.Thefeaturesofthedeviceincludean
onboardsample-holdandasinglepseudodifferential
input.OutputdatafromtheMCP3201isprovidedbya
highspeedserialinterfacethatiscompatiblewiththe
SPI
®
protocol.TheMCP3201operatesoverabroad
voltagerange(2.7V–5.5V).Thedeviceisofferedin
8-pinPDIPand150milSOICpackages.AN702InterfacingMicrochipMCP3201A/DConverterto8051-BasedMicrocontrollerAuthor:LeeStudleyI/OPORTMETHODMicrochipTechnologyInc.TheserialdataformatsupportedbytheMCP3201isillustratedinFigure1.TheA/DConverterwillcomeoutINTRODUCTIONofitssleepmodeonthefallingedgeofCS.Theconver-sionistheninitiatedwiththefirstrisingedgeofCLK.Inembeddedcontrollerapplications,itisoftendes