Microcontroller Architecture

pleasanthopebrothersΗλεκτρονική - Συσκευές

2 Νοε 2013 (πριν από 3 χρόνια και 7 μήνες)

80 εμφανίσεις

EmbeddedSystemsDesign
(630470)
Lecture3
MicrocontrollerArchitecture
Prof.KasimM.Al-Aubidy
ComputerEng.Dept.
INTERNALARCHITECTURE
•AllMCsuseoneoftwobasicdesignmodels:
HarvardArchitectureandvon-Neumannarchitecture.
•TheyrepresenttwodifferentwaysofexchangingdatabetweenCPUand
memory.
•VON-NEUMANNARCHITECTURE:
•HARVARDARCHITECTURE:
CISCandRISC
•MCswithHarvardarchitecturearecalled"RISCMCs".MCswithvon-
Neumann'sarchitecturearecalled'CISCmicrocontrollers'.
•ThePIC16F84MChasaRISCarchitecture.
•Harvardarchitectureisanewerconceptthanvon-Neumann's.
•InHarvardarchitecture,databusandaddressbusareseparate.Thus
agreaterflowofdataispossiblethroughtheCPU,andofcourse,a
greaterspeedofwork.
•PIC16F84uses14bitsforinstructionswhichallowsforallinstructions
tobeonewordinstructions.
•ItisalsotypicalforHarvardarchitecturetohavefewerinstructions
thanvon-Neumann's,andtohaveinstructionsusuallyexecutedinone
cycle.
•ThePIC16F84MChas35instructions.Alloftheseinstructionsare
executedinonecycleexceptforjumpandbranchinstructions.
THEPIC16F887BASICFEATURES:
RISCarchitecture
Only35instructionstolearn
Allsingle-cycleinstructionsexceptbranches
Operatingfrequency0-20MHz
Precisioninternaloscillator
Factorycalibrated
Softwareselectablefrequencyrangeof8MHzto31KHz
Powersupplyvoltage2.0-5.5V
Consumption:220uA(2.0V,4MHz),11uA(2.0V,32KHz)
50nA(stand-bymode)
Power-SavingSleepMode
35input/outputpins
Highcurrentsource/sinkfordirectLEDdrive
softwareandindividuallyprogrammablepull-upresistor
Interrupt-on-Changepin
8KROMmemoryinFLASHtechnology
Chipcanbereprogrammedupto100.000times
In-CircuitSerialProgrammingOption
Chipcanbeprogrammedevenembeddedinthetarget
device
THEPIC16F887BASICFEATURES:
256bytesEEPROMmemory
Datacanbewrittenmorethan1.000.000times
368bytesRAMmemory
A/Dconverter:
14-channels
10-bitresolution
3independenttimers/counters
Watch-dogtimer
Analoguecomparatormodulewith
Twoanaloguecomparators
Fixedvoltagereference(0.6V)
Programmableon-chipvoltagereference
PWMoutputsteeringcontrol
EnhancedUSARTmodule
SupportsRS-485,RS-232andLIN2.0
Auto-BaudDetect
MasterSynchronousSerialPort(MSSP)
Pipelining:
Pinno.1:RA2SecondpinonportA.
Pinno.2:RA3ThirdpinonportA.
Pinno.3:RA4FourthpinonportA.TOCK1which
functionsasatimerisalsofoundonthispin.
Pinno.4:MCLRReseti/pandVppprogrammingvoltage.
Pinno.5:VssGroundofpowersupply.
Pinno.6:RB0ZeropinonportB.Interruptinput.
Pinno.7:RB1FirstpinonportB.
Pinno.8:RB2SecondpinonportB.
Pinno.9:RB3ThirdpinonportB.
Pinno.10:RB4FourthpinonportB.
Pinno.11:RB5FifthpinonportB.
Pinno.12:RB6SixthpinonportB.'Clock'lineinprogram
mode.
Pinno.13:RB7SeventhpinonportB.'Data'lineinprogram
mode.
Pinno.14:VddPositivepowersupplypole.
Pinno.15:OSC2Pinforconnectingwithanoscillator.
Pinno.16:OSC1Pinforconnectingwithanoscillator.
Pinno.17:RA2SecondpinonportA.
Pinno.18:RA1FirstpinonportA.
Clockgenerator-oscillator
OscillatorcircuitisusedforprovidingaMCwithaclock.
Typesofoscillators:
•PIC16F84canworkwithfourdifferentconfigurationsofan
oscillator.
ResetMC:
MicrocontrollerPIC16F84knowsseveralsourcesofresets:
•Resetduringpoweron,POR(Power-OnReset)
•ResetduringregularworkbybringinglogicalzerotoMCLRmicrocontroller'spin.
•ResetduringSLEEPregime.
•Resetatwatchdogtimer(WDT)overflow.
•ResetduringatWDToverflowduringSLEEPworkregime.
STATUSRegister
–bit7IRP(RegisterBankSelectbit)
–bits6:5RP1:RP0(RegisterBankSelectbits)
–bit4TOTime-out;Watchdogoverflow
–bit3PD(Power-downbit)
–bit2Z(Zerobit)Indicationofazeroresult
–bit1DC(DigitCarry)DCTransfer
–bit0C(Carry)Transfer