ebook img

Microcontrollers and Microcomputers Principles of Software and Hardware Engineering PDF

245 Pages·2009·64.865 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Microcontrollers and Microcomputers Principles of Software and Hardware Engineering

Fredrick M. Cady OXFORD UNIVERSITY PRESS Microcontrollers and Microcomputers Principles of Software and Hardware Engineering Second Edition Fredrick M. Cady Departlllent of Electrical and CompUler Engineering Montana State University New York Oxford OXFORD UNIVERSITY PRESS 2010 O,hc-u l hI\~H" ,ly-t'''. Irk: p'lt'I. ... hc:'1 ",)f'" 1h.illUnhc:-f O\hlfl.i rnl\(,~II)', '*'j\"\. ~\C \11 C\~l."nl."n..c III rc'\(..sn;h. \.\.h .., IM,h1r. ilO\J tl.Iu~JII(ln Contents (hfl"fJ ' .... '" 'I1H'!t. "I'"' \u.. 1.mJ (~T~,.,.n Oar n S ... I.LJm H('m~ "JrJdl ~1oLll;a 1 urnrut' \IJdnJ 'klt-..'Umc \t~"":'l C'I\ '.&ll'fltIt '~[)enu "ihan~1 r"lf"J T\.C\lOh" \\ th K~lIl Prt'fac~ L\ 3.4 Design Partitioning 53 \~Ina \u...ut.a Br...,&! l1ulc l/C\:h Repubh.. frark:C' Grccrc 3.5 Bottom-Up Design 53 (,~ll t1u~ !loth La"ln P 1l.&04J Ponug.aJ SlngJpon: 3.6 The Real-Wor1d Approach 50\ ,.",.tb ~xn '\~.ur.'.a.nd Th. .u lJ.1kJ rurl-c) Llt41rl1.": \Icln.lm Introduction 3.7 Types of Design Activity 50\ 3.8 Design Tools 55 1.1 Computers, Microprocessors, 3.9 Top-Down Oebugging and Tesbng 62 Microcomputers, Microcontrollers 3.10 Structured Programming in (I" U,bI' t-.~b'eKdJ bC\)' (\h\Cl'lAJUfdC' l '(r"tJA\C'tf'.'.L:s1r}" f"'C'rn\o\.\l n)oo.:n .. If.Htl 111...324 MMSooicmorroeec 'Bsoa nLstaricow lD leerfsin itions 6 33..1112 APSsroosfgtewrmaabmrely C DLooamcnugmmueaengntest a tion 666338 httr "" au~ur 1.5 Notation 8 3.13 A Top-Down Design Example 69 1.6 S1udy Plan 8 3.14 Chapter Summary Points 73 3.15 Bibliography and Further Reading 75 '0 3.16 Problems 75 r~~ p;&tt of hi rubh .. allOn mol}' tilt rCprt-..llKN, 2 General Principles of Microcontrollers 9 Ir;d m "1'(U')C\::aJ '" I'D.. ur fDn mltteJ. In .any h1f1l1 0( h) ... n) me ... n, -':.lLplk'lt'll,:'~InJ m:orhn,: orOC~I'-C 2.1 Introduction 9 4 Introduction to the CPU: Registers and 2.2 A Typical Mlcrocontroller 9 Condition Codes 78 2.3 The Picocontroller 11 2.4 The Microcontrollerls Memory 21 4.1 Introduction 78 2.5 The Central Processor Unit 26 4.2 CPU Regist"", 78 2.6 Timing 30 4.3 Register Trans1ers ;-g 2.7 The 110 Interface 35 4.4 The Condition Code Register 80 2.8 The Address. Data, and Control Buses 36 4.5 The Programmer's Model 88 2.9 Some Moro Instructions 36 4,6 Conclusion and Chapter SUmmary ~ts 88 2.10 The Final Picocontroller Design 38 4.7 Problems 88 2.11 Software/Firmware Development 38 2.12 The Software Deyelopment Tool Set 40 2.13 Remaining Questions 44 5 Memory Addressing Modes 91 2.14 Conclusion and Chapter Summary Points 44 5.1 Introcluctlon i1 2.15 Problems 45 5.2 AddreSSIng Termonolog) 91 5.3 Memory Types 92 5.4 Computer Types .nd Memory 92 3 Structured Program Design 48 5_5 Memory ArctlItectures tIS 5.6 Addressing Modes 98 3.1 Tho Need for Software Design 48 5.7 Stack Addressong 05 3.2 Tho Software Doyelopmont Process 49 5.8 Chapt. ... ConcIu5lon and ~ 3.3 Top-Down Design 49 5.9 Problem. vi Contents Contents VIi 6 Assembly Language Programming 110 10 Inlerrupts and Real-TIme Events 222 13 Analog Inpul and Output 309 15.2 Simple Input Devices 351 15.3 Simple Display Devices 365 6.1 Assembly Language Programming Style 110 10.1 Introduction 222 13.1 Introduction 309 15.4 Parallel 110 Expansion 368 6.2 Structured Assembly Language 10.2 The Interrupt Process 226 13.2 Data Acquisition and Conversion 310 15.5 Parallel 110 Electronics 372 Programming 119 10.3 Multiple Sources of Interrupts 231 13.3 Shannon's Sampling Theorem and 15.6 Temperature Measurements 376 6.3 Interprocess Communication 125 lOA Simultaneous Interrupts: Priorities 232 Aliasing 313 15.7 Motor Control 377 6.4 Assembly Language Tricks 0' the Trade 132 10.5 Nested Interrupts 234 13.4 AID Errors 316 15.8 Conclusion and Chapter 6.5 Making It look Pre1ty 133 10.6 Other Interrupts 236 13.5 Choosing the AlO Converter 320 Summary Points 396 6.6 Conclusion and Chapter Summary Points 133 10.7 The Interrupt Service Routine or 13.6 The Analog·to·Oigital Converter 15.9 Bibliography and Further Reading 397 6.7 Bibliography and Further Reading 134 Interrupt Handler 237 Interlace 323 15.10 Problems 397 6.8 Problems 134 10.8 An Interrupt Program Template 238 13.7 Analog·to·Oigital Converter Types 324 10.9 Advanced Interrupts 240 13.8 Dlgital·to·Analog Conversion 328 10.10 Watchdog TImer or Computer 13.9 Other Analog I/O Methods 332 16 Real-TIme Operating Systems 399 7 C Programming for Embedded Systems 141 Operating Property (COP) 241 13.10 Conclusion and Chapter 10.11 Real-TIme Intorrupt 242 Summary Points 332 16.1 Introduction 399 7.1 Introduction 141 10.12 Conclusion and Chapter Summary Points 242 13.11 Problems 334 16.2 The Real· TIme Operating 7.2 Major Differences Between C for 10.13 Problems 244 System (RTOS) 400 Embedded and Oesktop Applications 141 16.3 Conclusion and Chapter 7.3 Architecture of a C Program 144 14 Counters and TImers 336 Summary Points 415 7.4 Assembly Language Interlace 146 11 Memory 246 16.4 Bibliography and Furthet' Reading '16 7.5 Bits and Bytes; Accessing I/O Registers 149 14.1 Introduction 336 16.5 Problems 416 7.6 Interrupts 155 11.1 Introduction 246 14.2 The TImer/Counter 336 7.7 Conclusion and Chapter Summary Points 156 11.2 A Short History 01 Random 14.3 Pulse·Width Modulation (PWM) 7.8 Bibliography and Further Reading 156 Access Memory 246 Wavefonns 343 Appendix Binary Codes 419 7.9 Problems 157 11.3 Semiconductor Memory 248 14.4 "Rea'" Real·Time Clock: Clock TIme 344 11.4 Memory Timlng ReqUirements 254 14.5 Conclusion and Chapter Summary Points 344 A.1 Binary Codes ReVIew '19 8 Oebugging Microcontroller Software and 11.5 Chapter Conclusion and 14.6 Problems 346 A.2 Problems 432 Hardware 159 Summary POints 258 11.6 Probloms 258 15 Single-Chip Microcontroller Interfacing Solutions to Selected Problems 43S 8.1 Introduction 159 Techniques 348 88..23 PDreobgurgagmin Dge Ybouugrg Cinogd e 116519 12 Serial 1/0 260 111<11\ .J"-v SA Debugging Tools 170 15.1 Microcontroller Chip VO 348 8.5 Typical Assembly language Program Bugs 174 12.1 Introductton 260 8.6 Oebugglnll and Tesbng C Programs 182 12.2 The Asynchronous Serial 8.7 Other Oebugglng Techniques 184 CommunicatJon System 260 8.8 ConcllJSk)n and Chapter Summary POints 186 12.3 Standards 'or the Asynchronous Serial 8.9 Blbhography and Further R.adlng 187 110 Interlace 2&4 8.10 Problems 187 12.4 Asynchronous Serial Hardware Interlace. 267 12.5 ASCII Oa", and Control Code. 273 9 Computer Buses and Parallel 110 189 12.6 Aaynchronou!I Data Aow Control 276 12.7 Oobuggmg and Trouble Shoo ling 276 9.1 Introduction 189 12.8 A.synchronous SenoillO Softwaro 277 9.2 The Computer Bus 191 12.9 Synchronous Serial Ponpherol 9.3 110 Addre ..m g 197 Inl.r1ae. (SPI) 278 9.~ Mor. Bus Ideas 206 12.10 SPllnt.r1ue. Eltampl. . 283 9.5 M ICrocontroUer va 209 12.11 Inter·lntegralod C,r<:Ult OIC or I·C) 2113 9.8 More I/O Ideas 211 12.12 The Control! r Ar a Network (CAN) Bus 298 9.7 I/O Softwar. 211 12 13 Conelu Ion and CIlnpl.r 9.8 ConclustOn and Chapter Summary Point. 21\1 Summ ry Point 305 9.\1 Problem. 219 12.14 Problem. 306 Preface Much has changed ,ince the first edition ofMicrtJconrrtJllersand .\f,crocomputers. PnnClplesCJJ Software atul Hardware E"g,"eeri"g. Many more mlCTOControllersare available. and ad"lll,e in integrated circuit technology no\\ allo\\ man) feature, needed in an embedded ~ tern to be integrated into the microcontroller. making S) tern de"gn much e3>ler. As the hardware has improved over the year;. so ha; the \oft\\are development emiron· men!. In earlier day. software wa; wriuen in alsembl~ (or C) and downloaded to RA'1 for testing. ROM·ba;ed debugging monnor progT3I1l' allowed student:. to run therr pr p-am • ,et breakpoints. lface and inspecl regi"eT\ and memo~ to \ent') that the prognun "'3: run· ning correclly. and debug it if il wa> no!. Someume, '1mul31ors were u>cd. bul the ,.ere limited in how they simulated input and OUIPUI functions. ~owada), we Implement m.1I1. software designs in a high·le\el language. primaril) C. De\elopment en\lronment e Freescale Semiconduclor"s CodeWarrior® offer a.<",mbl). C. and C-Iangua,;e-al og ".:11 sophisticated. high·le\el debugging IOOb. Chip manufactureT\. 100. have Inlegrated into therr microcontroller chips development and debugging feature, such", 8a ·'!!'Wnd DeOO!;gl ,; (Freeseale). On·Chip Debugging. (Atme\. MIcrochIp). Embedded ICE® \Clrru, up· . and JTAG Debug (~1a"m. T\). These hardware and software loob. along WIth ,·q,i '3Illl'Uot of Flash program memory. h,,·e made the de\ elopment of embedded appheau n, much e3: er than In the pas!. Nonethele". "uden" must ha\C b3>l, ,no\\ ledfe about the nu,ro.; and nucrocompule" before they can appl~ the nev\ tool, in embedded ~ tern' Thi,cdiuon of M,cmconrmllfl"< <It,d lI'fm<:,'mp"""" Prilld!';' of ift>. arr and Harm. Engineerillg is de,igned to be an tdeal tmroductol) h!'\l 10 an em~ ~'em 01 cro- :nbc . controller cour-.e. It i~ not tlrgcted to\\a.N. nor d lie' It de' .m~ '("e\.~,fi ~ ml~ or nllcroproce sor While there are ,orne ",-emt>l~ langu.ge ,oJ< e amp" t en f Frec'cale HC I" 1111 rocontrollcr. thcse -.er" l'nl~ ., an mU1'Ju..·u n t" I 3d Ihe ",'cmbly language of their own ml~n><:"ntrolld, The mal na.\ m thl' .... ophomorc. junior, or r...emor ~lcclrical en~,"eering. to; mpuler en£'[K"('rin:;~ or ~ cncc 'lUUl!nl!>. taking a fir..t C(lUI'\e '" cl11bc..~ddcJ ,~,tem ... "'r mtCru~" ntrolh.: 1 progr.ul1 c'Iampk:"l iU'e glH'n in and;l ,,~hJ.i ter i, de\ ,ted tl' th.! y, "I ... 10 an appli atlon. ,Iuden" w III ~netil 0) hl' Ing a r",requl\ne hl);h·\ .\<1 \an<!u ubi) . Bcc3u,e the te\l j, PUflX"dull) not rn""~"l r.'pt"clh-:. tl to;'1U\ boe u "pccific materiul. .... ueh a, lll~mutJeturt·",· dJ.\J. ,hech and reiC'f('tK· n ... uch ~,... c!/,\\ art' (lIhf H,JnJ\\'tlll' Fngmt'« rm ": \ftlt mu,. \If). 'Hell. ",\( ,.·, .....' w'".,,' Engmt'frillg .•\ fOl(Jrfl/a \fr.~~HC J2 The fundal11ent.11 "(,,,mHon <,1 '1.IIIJaNml,n ',ntn lIer I alUre 1/0 interface .... Hltcrrup". J.nJh'~~h'-d'g"3.1 ~,,'n\t'''h n. and h Preface Preface xi pJ.ill 10 thc: c1(!dnC~,1 tnt~rr.h:C:' nt!~lkJ. On~ ('hapta I' JCHl1\'U hl 'h,,'''ng h,)\\ Ok \ ari!.!1) of 10. Interrupts and Real-Time Events: The genoral principles of intenup~' appropnate for lIc\ ICC' Cln tx· lhed any microcontroller are co,ered. Hint, for wnllng Intenupl "''' ice roulln", or handler> are given, II. I\I.mor)': Thi\ chapler co'ers the basiC princIple' of memo!) elemen~ and memo" lrganization and Features archileclUre'>. Wc explain the differenllYpe' of memory and discu" the interaction of memory wilh IheCPU. Thl' l'\,htl4..ln ot \/u"rfioltJlnlllt'n (Jlltl \I/{'",( PIII/IU"'''' Prill« ,pic" til \O}I\\(tr(' (l1Il! lIarcbnm 12. Serial UO: Many engine." h3\e a lerrible lime "'Ith serial Interface. e pecially En\.!lIfl t rmg Includc, much llf thl.! !ir" !.!~.htl~,". \\ Ith .h.lduhll\al ch.tptt:r, Jill.! tn~tl'nal dc\\!lopcd Ihe RS-232-C ""andard:' becau,>. Ihey do nOI under>land ho,," all the ignal in the IIllhe teo )l'ar-. ,inc:c thl' Nx,)k \li.h nrigmi.lll~ puhh,llI:J "andard inlerface are u,cd. Thi' chapler deo,cnbe, the asynchronous ...,riall/O and its RS-232-C "andard Inlerface. Olher electncal interface, used in <.enal. Ineluding Introduction: Th~ IOln.:xiudhHlI:Onl.t1Il' a lh!,cnpttlln (\1 the \Oll 't:l1ll1ann ~lIl1.1 RS-4:!2. RS-423. and RS-4 5 UO. are described. The 'y nchronot1> <.erial penpheral H.ln.lrU .If\,:htt~l:tlln.:' .mo g1\c'" JdiOlt1on .... lhcd thrl'lI~h\,Ulllll..' lc:\.1 \ tll1\e hnc gl\C' interface (SPI) and Ihe inlCr-inlegraled circuil (IIC or FC) Interfac"," are ,h""n. and .1 bncl hl'hl~ of I1lIl'ffll'(1ntrlllkr dl.!\dopl1l~nl Ihe com roller area nel\\Or' <CAN) bu, i. Introduced. Example,; ,h""'ing llO" to =u'¢ Generul Principh~, of \licrncnntrollcI"'I: The ~L'ncral \lpc:r..uil1;! pnn~lpk' ut mu.:ro Ihe SPI 10 ,end d3la 10 an LCD module and the Fe 10 read a temperalure n'-Of cllntr\lll~r-. .Ife l11u,tfiJtcu t-.~ mean .... of .1 n:gt,ta·tr.m,h:r JC'lgn of .1 pnxc,. .. nr. Juhtxtl ghen. the ph:~x1lntrolh:r lul.icnh aft:' ... htl\\ n hu\\ dt:limng .I"'c:t \\1 ,",tnsdlun'" I..,tll Ic.ld to a 13. Analog Input and Output: Becau,e compute" mu I read analog information and harJ\\MC uC'lgn. IOduJ,"~ the ~llUCnllJI ,:nntfulkr nt:nkd 10 ~I ,h'lrc ...1 progr.1I11i.:0I11· ael upon il. Ihi' chapler con, ide" Ihe "'orld of analog Ignai" S~<lem as!"':t ot the pUler The: chapter al,o uc" ..: nhc. .. the: ,olt\\ Me: dc\l'Itlpmcnt em Irnl1mc:1l1 ,Hulen" \\ III analog-Io-digital conver"on proce" are g"en \\ith de,ign procedure. Both :malog-\(> U'C in the: 'at"l..lr.1t\l~ digllal and digllal-lo-analog omener I) pes are d.",ribed. ~tructured I>rogram Ol"i~n: The pnnl..lph:, III top·th1\\ n dc'a::n .m! pn:,t:ntt:u In th" 14 Counters and Timers: Many embedded applicallon< require a timer 10 generale" e I.:h~,ptcr Studc:n" ,h"ulJ he t:\()(hCO to tht: nced Ipr "ltt\\~n' U(.."H.!O ~hln: ,tJ.nlllg ttl forms of;1 specific frequenc). to time external e\ent!-. to count e'enl. ... and to generate "nle: progmm, l\lr thclr mu.:nX:llntrolkr inlcnup" al specific Inlerval,. Thi' chapler 100,"' 31 the ro, ic o!",rntion of the timer Inlroduclion 10 the CPl: Rc)!bler. lind Condition (ode : lhl' ch.lrlcr ,k,cnhc, clrcull'" found in modern microcontrollcf' the rcgl'tcr, Illuno 10 .111 mKfl)(ontrlllkr Sludt:nh .tn: a,kcd \1' Jc:~n~ thetr 0\\11 15. ingle-Chip ~ licrocontroller Interracing Techniques: Th". the large'l eh3pl~ In the pnxt: ... ,nr' fC).!I'lcf'. ,lOu (llnulllnn l.:o4.k, tn I.:h.lph:r (..' (,,'rl""C book. dc\Cribe, a \anel) of rcal-\\orld Inlerface not co\ered m earlll~r haple ...... ~ \h~mor~ \ddrc.."ing, \It)dl~: TIll' I.:h~lptcr. \\hlt..:h \\111 h..-u,c:luI1l11.:11\1f'':' thi.11 Inelude 'imple inpul and OUIPUI de\ ICe,. ,,\ itche,. LED,. and \.eyp <1.'. Parallel LO 1c~('h.1O <J,,",cmhl) bngu.l~c. Jc~nlx, the •. \lIJfI':","~ moue, \:,lnIlHtlnl} u'cJ 111 cxpan,ion ,omelime. needed for microcontrolle" \\Ith hmiled LO i, llO"n.lnput mh.:n-,:olllrnlh:r OUIPUI UO electronICs \hO\\ qudenl\ ho\\ 10 prolecl the fragile mi 'roc >ntroller trom h .\."embl) LnnguaJ,!l' ProgrummilllZ: lhl Ch.lph:r hn\\' the tuJcn1 ho\\ thc} 100t!ht the cmel \\ orld. DC and <lep!",r mOlor. are de\Cribed. and C pn:>gram stepper rnowr or ..:anllc an \ cmhl\ liJncuagc pHlur.10l md hn\l!. hI l:llmpll h trw. . lUrcd prngr.H11· dri\cr module" are gi\cn. min' lon,tru..:h In \ ... c:mhl~, \lth\'Ul:!h thl' t.:,ll Pfl-';C If lIlo\.'pcndcnt. ~·n:c l..llc 16. Real-Time Operating ) ,terns: Our final chapter"" bnet ,"en,." t;cml IrJu Dr HCS I ~ .cmhl, \".( I~ u:J 10 c amrle opcraltng 'y'tem .... 11 can 'cne 3. an muoducti n for'luJeol! e- 1O£. . Pro~ramming for lomhcddcd "~'Icm': Thl (h.lp1 r hnv.. hoy. prn r,mmung ad, ~\l1ced microconln,"er COUf'c! that \\ ill u"e real-time ... ~ 'tern In (tn an cmhc:ddc:d tcm Jlttcr. .. tr 1m rro~rdnHl1Ing lur III de kttl(l ~o"'f!utt:r OJpplH': Itton it I'. no .In Illlrodu1.1llr~ III 1ructlon In C pn) ramming \\c-.1' Ul11C th.II tud~nl h.J\\! learneo ( In Jnut~r rrn~r.lfm1lln t.:P"~ Ihen: Irc.,' rn.Hl~ pro ·rJTl1mlOg. n:.Jmplc, In C lhp.lI ~hn"l th t ,1 1)ehul!c.in~ \litru('nnlnllll'r '-.nfl\\un: nntll1ard\\nn.·: \Inu I 111 ,ll \I, d,'"nlp.hl 'I (,,",puttr II""" and I'"r.llld I/O: I hi lhaplel Uc ,he r r Ihell I) Intert.1 e • u';:Ul(:lIntr lll·f' I/e) IfId III) Iftv..i.Ir \nlt-:Olml tllln xii Preface d. An abilil) to function on 1llultH.lhcipitnal") teant'. c. An abilily 10 identif). formulate. and ,olve cnglOccnng problem, r. An underslanding of profc;,ional and elhlcal rc'pon"bdil). g. An ability to communicate dTecthcly. h. The broad education nece~~ar)' to undcr..tnmJ the imp~lct of englllccring ,ulution ... in a global and socielal conlex\. i. A recognition of the need for. and an abilil) to engage in lifelong learnlflg.. Microcontrollers and Microcomputers j. A knowledge of contcmpornl) j,:.ue" k. An ability to use the technique:"!. skills and modem engineering. looh nece'".lI)' for engI neering practice. Acknowledgment Thanks go to AI Ora). onc of Ill) ti("\t bo~,c, and mcnto["\. \\ ho got IIlC ,tnned in computer englllcering man). man) years ago. before computer engineering \\a' e\en thought of. Tho,e were the pre microprocessor da} .... when computeT'.. \\ hilt: far dillercnt from tho,e we no\\ hu\c. \\ere in reality much the 'arne. Learning the funuamentab of the: carl) computer. h~ enabled me to learn ca~il) a varict) of other ... III the IIltcncning year ... It " the .. lim of thi .... tC\t 10 give sludenls the arne. 'ohd groundlOg I gained" Ith AI', help. The following re,ie"." al,o pro,ided hdpful feeobac~ on Ihi' ,«ond cdlllOn: JI Chen. Univc",ily of Houslon: Sle\e Ch,u. Idaho Stale Uni\c"il): Fernando Rlu,-GuucrreL. niversilY of Minnesota. Duluth: Michael Morro". nl\o"'I) of\\"","'I"-:-'I,lo,,on: Albert 0. Richardson. CalifornIa Slale Unl\c,,"). Chico: Harry W Tyror. U,lI\CNI) ul M,,'ouri Columbia: Aleksandar /\lIlenko\ic. The Un.'.NI) of AI.banm 10 lIunl,,,lIe. JUIllC' ~1. Conrad. UNC Charlolle: Ming Yu. Florida Slate nl\er"I)': Jerome BUller .. QUIIlern ~ Iclhothsl Universily. Thanks also go 10 the team .<trJordlOatre al O<ford nl\eNly Pre" "ho helped and encourJged me Ihroughoul the publicauon proce" Danielle Chn'len\Cn ....' englneenng edl lor. accepled my propo,n1 and cnthu<la"icall) cameo II fOf\\ard lor appro,al. John Challtce. succeeding DaOlelle as engineenng eoilor. ha' ~CPI me on trJcl. Ihrough Ihe pr<"e" Edllonal ll!.si toOl Adriana Hurtado pauenll) an,,\ercd all m) que,uon, along Ihe "ily. ,,"0 a"octatc edllor Rachael ZImmermann has handled anClllane' and. la, 101' "'er frnm dnana Hurtado. fielded my question, through the home ,trelch Fredncl. \\ Cad) Introduction 1.1 Computers, Microprocessors, Microcomputers, Microcontroilers A computer system is hown in Figure 1-1. \Ve ~ee a CPU. or censral proctHOr unll. memon (ROM and RAM J. containing Ihe program and dala. an 110 interfau with """",ialed input and output POrts. and three buses conncCling the elements of the system together. The organizauon oflhe program and dala into a single memory block i called a "on Neumann archllect:ur<:. aft", John von eumann. who described this general-purpose. lored-program computer tn 1945. In Figure I -I the data. address. and control bu es consi I of many wires. ror e,ample . 16. ~2 Parallel Serial AID 1/0 1/0 Input Ports Ports Ports ,,,,r -------------------------------------- ---------,I,,,, ,,II I, ,,I II,, , , External , I ,,I Data 16 Data I, Address AdOress , I, Control Control Il ______________________________________________________ J Buses I ' Figure 1-1 Von Neumann computer an::htteclure Chapter 1 !Introduction 1.1 Computers, Microprocessors, Microcomputers, Microcontrollers 3 Parallel Senal AID Table 1-1 Microcomputer Development Time Line I/O 1/0 Input Ports Ports Ports Year Computer Event mid-1800!! Charle .. Babbage diITerenec A diITerencc engine W3' completed in 1991 at the Science MU'\eum In London to engme 8abbage\ original pia""" It had around.t()()() pam and weighed almost 3 tOM. It r------------------------------------- - successfully calculated a re .. ult to 31 diglb. :I .------, t9-14 IBM Alliomatic Sequence Aha called the Harvard Marl. I computer. it introduced the Harvard architecture \4ith COnlrollcd Calculator separate data and progr.un memory. Built .... jth !lwilche!l. relay~. and other mechanical I component.s. it hud mer 700.000 component". and weighed 10.000 pounds. :II L-,--.--.' 1945 vond cN~ceruimbcadn n machine WhMiloer ewdo-rplr-oinggr aomn cthoren EpUDlVcrA wC itcho mdaptau taenr dp rporjoegcrt..t .mJo hinn tvhoen s aNmeuem maenmn odreys. cribed 3 Jgram Memory II Dataan Md eI/mOo ry 1946 ENIAC Electronic NUTncricallnlcgrJtor and Computcr. Whh over 17.<XXl \':!cuum tu~ and Data I Data 7200 cry .. tal diode.,. it .... cighed 27to\l!'l and con<iumed 150 kW of fKJ'" er. Address ~~'--+---1----,I_'-6+-.J 16 I Address 1947 Poiinntv ccnolnedta ct tran,istor John Bardccn and Walter Br.1l1ain at AT&T Bell Labs. Control I Control 1948 Junction tmn"i ... tor invented William Shockley at AT&T Bell Lab .. Buses III ______________________________________________ J II Buses 195t EDVAC Thceo Emlpecultreodn iinc DbliOscarreyt ein V\taer ...i dab olef dAcuctiommaal.t ic Computer \\-as a sUCC'e\...or 10 Et'oo'1AC. It Figure 1-2 Harvard computer architecture. t951 Magnetic core memory J. .. y Forre~ter at MIT ba...ed hi ... invention on war\.; by An Wang 31 Harvard Univer;it) in invented t949. 1958 Integrated circuit in ... ented Jack Kilby 011 Te~a ... In\lrument ... or more. that carry binary signals from one place to another in the computer 'YSlem. This is 1960 MOS tmn"istor invented John Atnlla and Dawon Kahng at AT&T Bell Labs and Roben No)ce 11t Fairchild a classical computer system block diagram. and all computers discussed in this text have this Semiconductor. basic architecture. 1963 CMOS tran .. htor invented C. T. Sah and FrJnk Wanla ....' I: Fairchild R&D Laborato£),. There is another major computer architeclUfc type called the Han'artl architecture in which 1964 FiN ... Iatie RAM 6+-bit memory. from Fairchild Semiconductor. two completely separate memories are used-one for the program and one for the data. This t964 PDP-S Digital Equipment Corporolion's !irst ma.... . :,-produced minicomputer. architecture is often found in digital signal processing (DSP) chips and some other microcon 1964 Control Data Corporation Fir.,1 reduced instruction "lei computer (RISC). CDC 6600 troller chips such as Microchip Technology PIC microcontrollcrs (Figure 1-2). 1965 Moorc's law proposed Gordon Moore :11 Fairchild Semiconductor predicted Ihat the number of componenu. Until 1971. when the Intel Corporation introduced the first micropro- per chip \\Quld double ever) one to two years microcomplller is a microproces- cessor, the 4004. the CPU was constructed of many components. Indeed. in 1970 Intel 1103 Fir.,t dynamic RAM chip. I Kbil. " with added memory and VO. 1958 theAir Force SAGE computer required 40.000. quare feet and 3 mcga- 1970 Three-"I:lle logic im'cnled Natjonal Semiconductor (no\\ idenll!ied b) trademark nrune Trist3te} waUS of power: it had 30.000 tubes WiUl a -lK x 32 bit word magnelie corc t971 Intd -1004 Fif"ll microproce,sor. 2300 IT'.Ul ... i\lo,.... 740 kHz dock.. memory. The first mass-produced minicomputer. the Digital Equipment 197t Intel 1702 First er.1~ble programmable read-only memory (EPRO!\I): 56 'Ii. g bIb. Company's PDP-S. appeared in 1964. This was the stM or a trend toward less expen,ive. smaller 1972 Intel 008 FiT'it 8·bil microproce .. "Or. 3500 tran .. I!tIO...... 00 l...Hz clod. .. computers suitable for use in nontraditional. non-<lata proces;ing applications. Intel's great con 1972 He\\ 1c1l-P;II:kard HP-35 First pocket .. cienti!i('" calculator. tribution was to integrate the functions of the many-element CPU into one (or al mO>l a few) inte 1973 l~tP·16 Fif"lt multichip 16-bil microproce, ... or. from ~ationaJ Semiconductor.1t u.-.e'd fi\c grated circuits. The term microprocessor first came into use at Intel in 1972' and. generally. rerer.. integmted cio;:uih to the implementation ofthe central processor unit runction, or a computer in a 'ingle. large scale t974 PACE FiN "'Ingle-chip. 16-bit microproce~ ... or: from National SemironduclCIr integrated (LSI) circuit. A microcompiller. then. is a computer built using a microprocessor and a 1974 lIuclS080 6000 tran ... i"'tof"l. 2 MHz dock few other components rorthe memory and 1/0. The In tel400-l allowed a four-Chip microcomputer 1975 ~llT\ Altair 8800 computcr Fif"lt hobbyi"'l computer ba ... ed on the Inld 8080. II had -IK and SK BA Ie. J .... RA\1. consisting of a CPU. a read-only memory (ROM) ror program. readlwrite memory (RAM) ror <\nd introduced the S-Ioo bu .. !.t!mdard. The I,.'(tmplete kit. includm~ C''li.0"a ~mo~ data (using the Harvard architecture). and a shift register chip for outpul expansion. anti I/O. co!!t ~1-lOO ( 5800 in 2008 curreoc) adJu ... ted for intlatlonl. The Intel 4004 was a 4-bit microprocessor and led the way 10 the development or Ihe 1976 RCA 1802 RCA COSMAC.lhc flr'\t C~IOS micropro.."e ...... or. \\~ u.;ai in ,pat...~ flIght-. tn the t~-()... SOOS. the firstS-bit microprocessor. introduced in 1972. This procc"or had 45 instrucllon" a 1977 Commodore Pet FiN all· tn-one home computc.'r \\jlh -I-S K RA~t. a 20" !5 chanh:lerl..h'p13) . .:md c3o0u-mrseic. rwo,ee choanvde aavdevraangcee din sratrru bcetiyoonn tdi mthee. saen df icmo umldi cardodcroem"p 1u6te krsil_oT baybtlee, oIf-I m geimveo,r ya. ,Tuomdamya. royr b( u:i!l t'0-i0n cina .~....O cOltSi: cluorrr de,nIIcJ) "aId(Jlum ~..c lo. oI tf our-- emd. ntahlei l'Mlnlo. ,tel.. bS02 pn.lI."t':-"'-OT. It "-"1.,,,1 -.(t time line of many of the imponant developments leading to our microcontrollers or today. 1977 Ap plc II L"omputcr PrcLc"l!odmcpdu tbc)r .tIhI,e,- "(hpt plc1 1IQ in8 \IQ\u7hb4. tKhi .R. bAc."\l,,a;tnnted ·\r~pbl~c·S~\ h\il~\hhlJ) ~'Ku ,,-~~O.. ..a lUnt tdh.' m-!~ S(lQ re",,>cctl\ d~, in ~OOS CU~IK) 1. R N NoyccandM E.lloff Jr. . A IlislOrYfifMicml"rKl'HOrDt'H'/fJ/mlnlttlf b"d 11-1+ MICRO, Fchnl.lry 19HI

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.