Download as pdf
Download as pdf
You are on page 1of 22
Micre cowkn Nev Applica cas machines <> wi sort me ka uP Wn. Decimal —— for ws UBimerye 2 . Herxadec inal [> ren’? “BeD inter fore eo (displogt) } YY (ii) — F), Unsigned (1 /I aliseys rep ave) _* = -!) Signed Cl! a1ep sue aye) 437] ee EZ \ - G2) —? {!O+ 00/ — (10) Apit unsigned Signed (2 conplonet) | ah ‘gned @ 5 000 o Co FO 00 I I \ I Olo 2 2 } 2 y | O 3 3 | 3 | nu OD 4 4 ~3 (ou cP 33 -2 = 0 6 -2 -| I z =! (ce a {o-F#) [-3. 4) \ ] (4 3/ G-bit wechive 0 - (24 -l2F , 127 Ge. ast) unsigned, oigned — _— adders bua \ yt & [ | pac | f- [ Peviphenl dewiew L{cpul | [Memory [B) Lispley, mani ek — l@ Priwkers key boomed) nic doka bus wot plo desicer Control Bi (EMR, “MEMW, IC TORD. an d JOWR) ‘ontrol Buses MEMW an ) Le _ cml os Muyide 4 Mayid 0s M_CPV__ puke appropri ake contr sod ow cowltol wo @D_cev piks__ appreprite addres ov addy bw Q crv cready | writes dak Wray Aosr buns 23 24av “A 7 Pin ot PE ovOe Unceart ais take device 7 canoe mee —_———_—_——J @-Hi! Impedance take Mewory. (-RaM/ ROM ) — fer Cho + process Come in fovmmio~ dale yaw ne prereat” in Rhm/Rom — Rom dala ‘is Fined fh exmomen)— PU canned modaty daXa_in —> RAM is ak He Ai spesal of cpu - ‘palate ite while _emecuhny print snl sSoupyV Program Counter uni jnstruction decoder, timing! and control sna viet} sosng fonue3, Register A Register B Register C Register D Cr | : ear: => A i 4 E Foatrucion : Tr is a bimary reord vctrich imstaucts He CPU Fo on e Lojljoo] -—»> add A,B ae oo Tnstruchm decode decoden Thre mslructon awd els tthe CPO knew vohsl7 He cPY is supposed +o de bit 1 ov DO byt @- bits oboe 4- pits Word ge bik lb- bits, 32-bits Cy-bxts | e wale e- Mit ae =LAi6 tyhep Io= bit gle ES S36 bytes Foti font spate GER) 3 Mewary addveas Ue data ¢ wreaniney = | 00 Ceolieinty move_a value Suet 0 Histor A (yor oh sh add a number S1yos L to register Si o4 BE) nt sent to A i405 Pau) — tale RAM Timer |$ General- Serial Purpose VO | | Timer Micro- Port |] = fort processor = “Address bus | (a) General-Purpose Microprocessor System System 0 processor __vs. wConkerller chip (4% Tafel Corsk e051 L T- Sitake Machine cycle & Instruction. as TAC Cycle Machine Cycle 1 Machine Cycle 2 (344) 3 ™]4 1S 16 INR adds f ole gwen veal He In creme OS Opcode fetch Machine cycle Ye Lmstiuchon Cycle. Assowly InsFeucho Feregtan adler keno INR 50004 2000 (38) ( . {200 | 00 Vaena Sof lo T-Stake Jona ee, Dake memory Born (264) > 25-4 KISc kc C COUN ept Reduced Trsktucheo Selo Coup uke Comp lee Ton sructisn Se Comp udiene Cube) Sk: Tnsteuctio Seb Architect AVR —— ran (RIisc-V_ ) Foss wWadedui_~P AAM — Shakti Le STM Type of Tsk s M RI Qc cisc RISC The original microprocessor ISA | Redesigned ISA that emerged in the early 1980s Instructions can take several Singl clock cycles Hardware-centric design Software-centric design — the ISA does as much as possible using hardware circuitry — High-level compilers take on most of the burden of coding. many software steps from the programmer More efficient use of RAM than RISC Heavy use of RAM (can cause bottlenecks if RAM is limited) ‘Complex and variable length instructions Simple, standardized instructions May support microcode (micro- programming where instructions are treated like Only one layer of Instructions nly one layer of Instruction small progranps) [Garge numbero eal numbeb of fixed-length instru ictions: ‘Compound addressing modes Limited addressing modes Eben vale, fea] eulex Hawerd & Von- Neumann anclaitectures. << Von Neuman Architecture >> cre ——<«d| Data bus Peers Address bus, // 4K Mag AISC: pipelining “" Uy U te, Ip, fe, we action Fel etry. Docede — Execulc Dvd 1F Ip yew A me — ey HBP Inside C5] Meo < wl ee —}— externa AK che — INTERRUPTS : e eb wt 20 ¢ — \ | INTERRUPT for ETC, g —_h] CONTROL program OH TIMER 3 — \ = code ean TIMER 1 ja 2 é a ll | Cae /s ERIAL « an PORTS. PORT, eh x x | crystal deci ldo Sj gO m +) Gu be — aponesenarsA\’ \ B2- pm of ap rol Digital) LX DO) s Analog do Digatal Converter 0 Praag Tafewugt Sewer Roti Tsk her mont “ | f Fintererse aN Cs a Gos miceo csnka\\er farai \ye VO pins => 32 732 32, Serial port — 1 a 71 | Interrupt sources — 6 (8) 76 a ATES4C L \ { Atwell Ss gebT fart Part Number ROM _ RAM pins Timer Interrupt _Vec__Packaging | ATgOCST aK 728 32 2 6 3V 40 | AT89LVSL 4l 128 32 2 6 3V. 40, |, ATOCIOSI tits 74) (1S) T 3 3V 202— he F ATS9C2051__2K___— TAR 15 2 6 3V) 20 ‘ATB9CS2_8K 128 32 3 8 3V 40 ATSILVS2__8K 128 32 3 8 3V 40 Dakloer —Semet covadberets CMa iw} DS¢4Ch20 DSF4lYULO Any Me —_ Progamming Sie v Co phachiine Cede? [Registers] |$05/ has @-bit Opeode SS | cyegicters [ N@octand (| Assen Mnemonic U Accumulator (ACC) R TH lof Ro, Wik _ Dio 0100) Ade MoV A) erga Coole 16 - bik 4 DPTR: Dala poinler> 16-bit ~ tt ves fowe ess Accumbtea. (Acc) A +2__ perform nu ove (ontryrbic 4 Logical) Ro - Ry ‘ 1e4, ters of 9 -bit each Froeyyonm * add aA ad Lad Opemwds memo wie J MV inglrus tion: MoV AztHnabtion, source \ Lo) Mol A + S3ZW Loads ttre ACC pot numbed 53h Mov RI & &— copy 4 ralennts oto A iw RI Mov RD 19h Po Led ee rurrtber 19 into He yegrster RO - _—e(Mov A, # 12 DM nwelid: Results in exec Lohy! ADD instruction: fADD ft puree | meron ppedamnde PDD ON, Fark — add pumbe ark cto tee numbed in ACC PDE AR — add tte nunthber stir im 2, te ttre numbers n A= KhtR Ctoveh iy Be Fecppr(na adn 53k +o 14d AUSWEe iS FRA J Mov A, #253] AMD A FF IQR Ath: bolo 000) b + Axle +ixt? = |6) ActinaL alate a 00010010001] b p01 OP |DO DT 1a- bit mn oe aint Mov A, #lesk CPZD Bpcode — 3 &— “©pesmnd. ASSe@wh ley ¢hauld 94 I>. a, ! LIEEDEK We warded fo MOV A, + 53d add PDi> A, at (TA Atte execution of these imslructou verak is ttre cowliewl ef Acc 2 2 53h Mov A, #35 LT ih ADD AG dt 13 ch 6 Ls oe nek aid 123 Jf — FB Amd be —— G05] addressing Mader , T i 0 S23 to a ess 4. Lmmediale 2. Register -— Tiveckh UV A. Reqisrew indarecl”_- 5- F 4. Immediate (at) Mov A #538h oad sak in ACC Mov RO, +614 [ond lo decimal in RO MV pPeTR, 4 4523 Q mvata ( CMV. DPTR, + +0000 )N SesOy wovyt tooord = Wii Pok ——— \pPTR Fs ct is 2 Kepister Gemiers “D inect wittul( 4 ) Mov A, 53h ee5| hey Byte address TF 2Ee Eee Ce Bay Ae ol 77/76 75 74 73 72 71 70) Bit-addressable locations 6F 6E 6D 6C 6B 6A 69 68 E 7 453 52 |4F 46 4D 4C 4B 4A 49 46 | 47 46 45 44 43 42 41 40 27 _|3F 35 3D 3C 3B 3A 39 38 26 137 36 35 34 33 32 31 30 25 |2F 28 2D 2C 2B 2A 29 28 24 |27 26 25 24 23 22 21 20 23 |iF 1B 1D 1¢ 1B 1A 19 18 —22_|17 16 15 14 13 12 11 10 | [OF OF OD OC OB OA 09 08 | 07 06 05 04 03 02 O1 00 2D -Rq Banks RO- RF Bank? \— RO-RP Bankl v~ = ‘ vegister ke in O51 Navas of egisvors awe RO, RIS, .-RF tox al Hid banles any MOV A, RS - copier te sentad pk AG into ACC --- bul RS vemister is available in alk Soran qegisiren Ipanales - (which crepasveY bank s RE ji used) U How te seleck the reg toy bamk? = Rearsker bmks ave _wleeted Us in Ogso % est bits of Ps Klik ( SER) Speer ion Sted Icy | ac | Fa Ar, a ail wy SS Ad, AKI AY 0 cary used Oyen fanty alee elec ba ae by genord Hog type peal ACCC o 0 seepistess bank - 0 o | - | \ DD 4 abo \ 4 -3 — Whee youl ppp A a2 ~ eae sh if RS =] £& asd =0 ialeol- is tre addwess of R30 = | a Ae eegsstey Regi few ind inect @ s-Howwing Gi on hdr tBhn Mov A, @RO J RO holds an addvess of RAM pir tthe conten in tre RAM locabon whore address ic in RO Mov _@RI, RS = [pie eaten wt OKI, AS into RAM locale AT Male an aaldeess hoe adders ic Ctoved in R| euly RO X Ry cm be wed y in eeyisked — inkivecl addvessingr mode. MOV & ORF incorvect. a 9 Cine tation of gegisker ind veel “abd \ ELL ye RB Al both AR e-bil- wegisters bul? or feanaL Manor ot FLASH ts LU PB yebrdictr meoedS 16 bil add qe DETR is a _1b-bile vegistey (SFR) US wed TD. Ltt CLR _A — clean He ACO Mov DeTR, #O400K — ONODH Vm addvers in meray Move k, @A+DPTR | am - CC acts aS\an im oye Go ae Ts = Domne aE Se = + [or i a cane ra [one AB z coat © Tone fe evorre « fone [ane @ 7) = 7 we ie = ‘eros = a oe z risen 2 2 [ae amt 72 Fen 3 2 [ne hae 2 Pada S Tae Age 7. 7 = pa nar =o = [ow Af = om A [ae AR 2 coseaa = sae i a ose acer se Ta i @ cma 2 [oe Ate o rons = ae Af x ry © me AR 3s ry = zz ete = =e 1 2 [ae a @ cone 2 2 pr anak n conve % pre rm a er a re Aga 2 ceases pI Dae Af = case m me Ata 1 Cera ee Ata * cole = 7 pee ns = mS = Par we 3 A a De AR aan 2 [az oie = mo 0000 img VA, HSsh- 0-0-0d |, 002 | 32 A, #14 [ BDDIA = po pooLh How to progam 4 micro corkeot\er 2 oO @ hank cabing | Assombbles | c —— - Conv - - Gass cng | a ______|4o nadine dode | asswdaley is wad is med to comm by hank ty conn” ass \4\) C code do R g coh int werhne coke Hex? | HEX HER) | oS (t: arm (Agu) Atmnega[AVR, Atmel) ok / \Asserblev Divectives awe used volar am assewthler: EDITOR PROGRAM aa “aed or? maine foo bare, wh ave CAA at \ ° ie: (numli DA &¢ int num! 22¢ 5 Yun2? De ah) {nt nuwm2 2 0x34; [ assemble’ divective : oR G C Dagin) Sy ORG Sool vuml. DB Le Mum 2+ DB sah ibe stv. DB “MCA Cowrse” Asstwwhley irechve 2 S - COUNT EQU Ro Pav RO, FCOUNT assewb\e Arvecve: END’ mdicator om of te sormbly Grego Mov A, #0 fi MOV RL, #10 \ a0 ra 12g Copan: apd A, 03 7 €aCeed DINZ RL, AGIA > END Coun Tale a lep totrich hor ins tervction tL . cto_be wepealeed 00 Hues @ Not waingy above. req tam Rl ic am “&- BE cope sere Which can etore mumimnuyn yelre of nurtoe 256. Acc Sop tes | Mol ok, SEW Jp exec uke impor lng To Awus MdV _ R2, se Io 0 @ @ (NEXT= O\AGqmNn: fi ©\ ® —=" @ ov Ri, + 50D So time DINZ Rl, AGA \| DINZ RA, NEXT END

You might also like