ECE 4510/5530 Microcontroller Applications Chapter 1

ECE 4510/5530 Microcontroller Applications Chapter 1

ECE 4510/5530 Microcontroller Applications Chapter 1 Dr. Bradley J. Bazuin Associate Professor Department of Electrical and Computer Engineering College of Engineering and Applied Sciences Chapter 1 Overview • Basic Computer Concepts • Introduction to Microprocessor • Applications of Microprocessors • Introduction to Microcontroller • Applications of Microcontroller • Microprocessor vs Microcontroller • Processor, Memory, I/O ports and Peripheral modules and Software ECE 2 4510/5530 Modern Computers • They are everywhere and in just about everything. – Ubiquitous computing – Cloud computing • We are all users … – Some of us are knowledgeable users – Fewer understand basic “computer architecture” – Fewer yet are programmers – And a very few are designers, architecting and building the next generation. 3 Microcontroller vs. Microprocessor • From wikipedia: http://en.wikipedia.org/wiki/Microcontroller • Volume – About 55% of all CPUs sold in the world are 8-bit microcontrollers and microprocessors. According to Semico, over four billion 8-bit microcontrollers were sold in 2006.[http://www.semico.com] – A typical home in a developed country is likely to have only four general-purpose microprocessors but around three dozen microcontrollers. A typical mid-range automobile has as many as 30 or more microcontrollers. They can also be found in many electrical device such as washing machines, microwave ovens, and telephones. ECE 2510 This is old news … there are probably more! 4 Embedded Computers in Industry • The goal of general-purpose computers is to accommodate variety of the programs selected by user and execute them quickly. – To meet this goal, scientist/engineers have been developing powerful computing units, sophisticated memories, complex input outputs and efficient buses. • In 1970s automobile executive companies saw benefits of the computers in their cars. To make their cars reliable , safe and fuel efficient. – These applications do not need general purpose computers and demanded embedded computers. 5 Computers in Industry • The goal of general-purpose computers is to accommodate variety of the programs selected by user and execute them quickly. – To meet this goal, scientist/engineers have been developing powerful computing units, sophisticated memories, complex input outputs and efficient buses. • In 1970s automobile executive companies saw benefits of the computers in their cars. To make their cars reliable , safe and fuel efficient. – These and many more applications do not need general purpose computers and demanded embedded computers. ECE 6 4510/5530 Embedded Processors • The embedded processors contains all necessary parts including memory and I/O ports within a single chip. These computers run at much slower memory clock and have a smaller memory size. • Embedded computers can also be found in washing machine, microwave oven, camcorder, video cassette recorder, camera, cellular phone, and many other appliances. A family of embedded computers is based on the 68HC12 microcontroller. ECE 2510 7 Other Examples of Embedded System • Cell phone: making the phone call, accepting incoming call, accessing Internet, displaying • Home security system: sensing external temperature, smoke, humidity, and intruders; taking appropriate actions according to the detected events • Automobile: monitoring speed, gas level, temperature, distance, direction, and so on; controlling display, full injection, air bag deployment, cruising, and so on; giving warnings • Network router: responsible for message routing, congestion and traffic control, and so on ECE 8 4510/5530 Computers and embedded controllers • All general-purpose computers or microcontrollers contain four hardware modules: 1. Central processing unit (CPU) 2. Memory 3. Input/output (I/O) devices 4. Buses • CPU controls order of instruction execution, controls the access to the memory and I/O devices, performs arithmetic and logical operations, and handles interrupt services. • The CPU contains an arithmetic and logical unit (ALU), a control unit, internal registers (for temporary storage) ECE 9 4510/5530 The Computing Problem System or Application Requirements Operating Algorithm System and Data Mapping Structures Hardware Architcture Programming Binding High-Level (Compile, Application Languages Link, Load) Software Performance K. Hwang, Advanced Computer Architecture: Evaluation Parallelism, Scalability, Programmability, McGraw Hill, 1993. ISBM: 0-07-031622-8 ECE 10 4510/5530 Six layers for a computer system development Applications Programming Environment Machine Independent Languages Supported Communication Model Machine Dependent Addressing Space Hardware Architecture K. Hwang, Advanced Computer Architecture: Parallelism, Scalability, Programmability, McGraw Hill, 1993. ISBM: 0-07-031622-8 ECE 11 4510/5530 The CPU • The CPU contains: Processor – arithmetic and logical unit Common Bus (address, data, & control) (ALU) Control Unit – control unit – internal registers (for Datapath temporary storage) Arithmetic Logic Unit Memory – Timer related components Output Program Data Input Units Units – Internal and external Registers Storage Storage connections (buses). Figure 1.1 Computer Organization ECE 12 4510/5530 The Processor • Registers – Contain digital values – Local data – Data memory addresses • Control Unit – Handles executing the program – Program counter (address of current instruction) – Instruction register (describes what is to be done) – Handle program flow (called branching when not linear) • Arithmetic Logic Unit – Arithmetic and logic operations on register or memory values ECE 2510 13 CPU Processing Rate • Speed of a CPU is based on: – The clock rate (speed in Hertz) – Format of an instruction (CPI: cycles per instruction) – Parallel nature of instruction execution (CPI <1) – Access time to its memory and I/O devices (Not likely, too slow) • A 3.2 GHz machine gives information about its clock speed which is a good indication of the machine speed but … it is equally important to consider other factors to measure overall performance of a computer: e.g. memory speed, I/O speed, how the software program was written, etc. ECE 2510 14 Memory • There are two types of information stored in memory: – Instructions, specifying types of operations a computer executes. • Such as: activities like accessing I/O, adding two numbers or logical operations – Data, the actual numerical values necessary to carry out instructions. • In adding two numbers the addition operation is an instruction and actual numbers being added are data. • Von Neumann memory architecture (1945): stores both instruction and data in a single memory. M68HC12 has this basic structure. • Harvard memory architecture: stores instruction and data in separate data memories. ECE 15 4510/5530 Memory Hierarchy • Registers are present in the CPU CPU • Cache is a type of memory designed to reduce memory latency Registers by reorganizing the memory. – Small memory component with fast access time is placed closer to CPU Cache PCs and large • 2nd level cache is larger than first computers layer cache and has faster access 2nd level cache time compare to main memory. • Main memory contains all data and programs. Main memory ECE 2510 16 Memory Types • Different types of memory are – RAM (Random Access Memory) • Allows processor to read from and write into any location on the memory chip • RAM is volatile and cannot retain data without power – ROM (Read Only Memory) • ROM is non volatile memory • ROM data can only be read. Does not allow to perform write operations on its memory locations – PROM (Programmable Read Only Memory) • Can be programmed using a PROM programmer or burner • Once programmed its contents cannot be changed. ECE 17 4510/5530 Memory Types (Cont.) • EPROM (Erasable Programmable Read Only Memory) – Read only memory that can be erased by exposing it to strong ultra violet rays – Requires to erase the contents of a location before writing a new value to it • EEPROM (Electrically Erasable Programmable ROM) – Non volatile memory that can be erased by electrical signals – Requires to erase the contents of a location before writing a new value to it – Allows each individual location to be erased and programmed •Flash Memory – Developed to overcome the drawbacks of EPROM and EEPROM – Can be erased and programmed without a dedicated programmer – Can be erased and programmed electrically – Does not provide the facility of erasing a single location but facilitates erasure of a block of memory or entire chip ECE 18 4510/5530 Buses and Peripheral Devices • Buses are physical connections or pathways among the CPU, memory and Peripheral (Inout/Output) devices. There are three types of buses: 1. The address buses, is used to identify the address location where data and instructions reside in memory . 2. The data buses is used to carry actual information between CPU, memory location and I/O devices. 3. The control buses, is for sending and receiving control command such as: CPU, memory, and I/O devices. • The purpose of input devices is transferring outside information into the computer, i.e. keyboard, mouse, microphone scanner. • The function of output devices is allowing the computer to inform its internal states and data to the outside world. Such as: monitor, speaker, and printer. ECE 19 4510/5530 Computer system • A computer system is shown above. It consists of a CPU or central processing, memory containing the program and data, and I/O interface with associated input and output devices, and three buses connecting

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    75 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us