1、StructureandfunctionoftheMCS-51seriesName NumberIntroductionMCS-51seriesMCS-51seriesconstitutesMCS-51seriesmemoryaddressspaceRestoredtothethroneinthecircuitlStructure and function of the MCS-51 series one-chipcomputerMCS-51isanameofapieceofone-chipcomputerserieswhichIntelCompanyproduces.lThis compan
2、y introduced 8 top-grade one-chipcomputers of MCS-51 series in 1980 afterintroducing8one-chipcomputersofMCS-48seriesin1976.lTheir basic composition,basic performance andinstruction system are all the same.8051 dailyrepresentatives-51serialone-chipcomputers.Anone-chipcomputersystemismadeupofseveralfo
3、llowingparts:Onemicroprocessorof8(CPU).AtslicedatamemoryRAM(128B/256B),itusenotdeposittingnotcanreading/datathatwrite,suchasresultnotmiddleofoperation,finalresultanddatawantedtoshow,etc.ProcedurememoryROM/EPROM(4KB/8KB),isusedtopreservetheprocedure,someinitialdataandforminslice.Four8runsidebysideI/O
4、interfaceP0fourP3,eachmouthcanuseasintroduction,mayuseasexportingtoo.Twotimer/counter,eachtimer/countermaysetup and count in the way,used to count to theexternalincident.Fivecutoffcuttingoffthecontrolsystemofthesource.OneallduplexingserialI/OmouthofUART(universalasynchronousreceiver/transmitter(UART
5、).Stretchoscillatorandclockproducecircuit.Every the above-mentioned part was joined throughtheinsidedatabus.Among them,CPU is a core of the one-chip computer,it is the control of the computer andcommandcenter,madeupofsuchpartsasarithmeticunitandcontroller,etc.The arithmetic unit can carry on 8 perso
6、ns ofarithmeticoperationandunitALUoflogicoperationwhileincludingone,the1storingdevicetemporariliesof 8,storing device 2 temporarily,8s accumulationdevice ACC,register B and procedure state registerPSW,etc.PersonwhoaccumulateACCcountby2inputendsenteredofcheckingetc.temporarilyasoneoperationoften,come
7、frompersonwhostore1operationisitisit make operation to go on to count temporarily,operationresultandloopbackACCwithanotherone.In addition,ACC is often regarded as the transferstationofdatatransmissionon8051inside.Thesameasgeneralmicroprocessor,itisthebusiestregister.Theprocedurecounterismadeupofcoun
8、terof8fortwo,amountsto16.Itisabyteaddresscounteroftheprocedureinfact,thecontentisthenextIAthatwillcarriedoutinPC.This pulse signal,as 8051 basic beats of working,namelytheminimumunitoftime.8051isthesameasother computers,the work in harmony under thecontrol of the basic beat,just like an orchestraacc
9、ordingtothebeatplaythatiscommanded.ThereareROM(procedurememory,canonlyread)andRAMin8051slices(datamemory,canisitcanwrite)two to read,they have each independentmemoryaddressspace,disposewaytobethesamewithgeneralmemoryofcomputer.Procedure 8051 memory and 8751 slice procedurememory capacity 4KB,address
10、 begin from 0000H,usedforpreservingtheprocedureandformconstant.Data 8051-8751 8031 of memory data memory128B,address false 00FH,use for middle result todepositoperation,thedataarestoredtemporarilyandthedataarebufferedetc.It is not very the same that the memory of MCS-51series one-chip computer and g
11、eneral computerdisposesthewayinaddition.General computer for first address space,ROM andRAMcanarrangeindifferentspacewithintherangeofthisaddressatwill,namelytheaddressesofROMandRAM,with distributing different address space in aformation.Whilevisitingthememory,correspondingandonlyanaddressMemoryunit,
12、canROM,itcanbeRAMtoo,andbyvisitingtheordersimilarly.ThiskindofmemorystructureiscalledthestructureofPrinceton.8051memoriesaredividedintoprocedurememoryspace and data memory space on the physicsstructure.Therearefourmemoryspacesinall:Theprocedurestores in one and data memory space outside datamemoryan
13、doneinprocedurememoryspaceandoneoutsideone.Thestructureformsofthiskindofproceduredeviceanddatamemoryseparatedformdatamemory,calledHarvardstructure.Butusetheanglefromusers,8051memoryaddressspaceisdividedintothreekinds:(1)Intheslice,arrangeblocksofFFFFH,0000Hoflocation,inunisonoutsidetheslice(use16add
14、resses).(2)The data memory address space outside one of64KB,the address is arranged from 0000H 64KBFFFFH(with16addresses)tootothelocation.(3)Data memory address space of 256B(use 8addresses).Resetcircuitislikeacomputersrestartpart.Single chip micorcomputers reset rely on externalcircuit.MCS-51single
15、-chip micorcomputer have a reset pinRSTwhichismadeupof Schmitttrigger.After theoscillator(振荡器)startup,thepinwillkeepmorethantwomachinecycleshighlevel,whichcanresetit.MCS-51single-chipusetwokindsofmethodes.Theoneistheelectricautomaticresetcircuit(left),theantheroneisbuttonreset(right).Thoughresetcircuitissimple,itsfunctionisveryimportant.Pieces of single-chip miccomputer system whichcouldrunnormallyshouldcheckitwhetherhaveasuccessfulresetcircuitfirstly.Whenweobservethewaveform,theoutputrangeis very large.So wo can use the reset circuit tochangesignal.