1 / 55

Chapter 26

Chapter 26. Microcontrollers. Objectives. Define microcontroller. Explain the difference between a computer and a microcontroller. Explain the function of main microcontroller parts. Objectives. Identify various types of ROM. Name the general types of programming languages.

Download Presentation

Chapter 26

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 26 Microcontrollers

  2. Objectives • Define microcontroller. • Explain the difference between a computer and a microcontroller. • Explain the function of main microcontroller parts. Permission granted to reproduce for educational use only.

  3. Objectives • Identify various types of ROM. • Name the general types of programming languages. • Name some common components found on a microcontroller module. Permission granted to reproduce for educational use only.

  4. Overview of the Microcontroller • Programmable • Thought of as a “tiny computer” on one chip • Used in many applications, in almost all electronic devices • Replaced many relays and solid-state devices in industry Permission granted to reproduce for educational use only.

  5. Microcontrollers vs. Computers • Both have microprocessors, memory location for data storage, and input and output facilities • Microprocessors have different limitations, amount of memory is different, and permanent storage differs Permission granted to reproduce for educational use only.

  6. Microcontrollers vs. Computers (Cont.) • Microprocessors in computers are more powerful • Microprocessors are limited to specific applications in microcontrollers • Both use RAM to store applications • Both must have ROM • Microcontrollers are smaller and can be part of other devices Permission granted to reproduce for educational use only.

  7. Advantages of Using Microcontrollers in Industry • Reusable • Dependable • Cost effective • Energy efficient Permission granted to reproduce for educational use only.

  8. Reusability of Microcontrollers • Good for prototyping control circuitry • Control circuit can be modified by programming, instead of completely rewiring Permission granted to reproduce for educational use only.

  9. Dependability of Microcontrollers • More dependable than relays • Control circuitry formerly relied on relays and timers • Have no moving parts • Do not wear out due to friction or contaminants Permission granted to reproduce for educational use only.

  10. Cost Effectiveness of Microcontrollers • Can be produced at lower costs than electromechanical parts • Can be reprogrammed, instead of being replaced Permission granted to reproduce for educational use only.

  11. Energy Efficiency of Microcontrollers • Less energy consumed for one microcontroller than for several individual components Permission granted to reproduce for educational use only.

  12. Disadvantages of Using Microcontrollers in Industry • Programming complexity • Electrostatic sensitivity Permission granted to reproduce for educational use only.

  13. Programming Complexity • Higher level of training required to program microcontrollers • Many programming languages • Compatibility problem for merging multiple systems into one control system Permission granted to reproduce for educational use only.

  14. Electrostatic Sensitivity • Static charges easily damage CMOS ICs • Static precautions must be obeyed Permission granted to reproduce for educational use only.

  15. Review What is a microcontroller? An integrated circuit (IC) that can be programmed to perform a set of functions to control a collection of electronic devices Permission granted to reproduce for educational use only.

  16. Review What are the major differences between a computer and a microcontroller? Limitations of microprocessor, amount of memory for data and program manipulation, and type of storage available to permanently store a program Permission granted to reproduce for educational use only.

  17. Review How is using a microcontroller more cost effective than using multiple electromechanical parts? Microcontrollers are produced at lower costs, and if they do not work, they can be reprogrammed Permission granted to reproduce for educational use only.

  18. Review What are two disadvantages to using microcontrollers? The complex programming required and the electrostatic sensitivity Permission granted to reproduce for educational use only.

  19. Microcontroller Components • Ports • Registers • Stack pointers • Program counters • Arithmetic/logic units (ALUs) • Oscillators • Watchdog timers • Memory • Programmable memory Permission granted to reproduce for educational use only.

  20. Ports • Can correspond to the input and output pin assignments of the chip • Can contain information sent to the pins on microcontroller chip from sensors or switches Permission granted to reproduce for educational use only.

  21. Registers • Can hold contents of data being manipulated Permission granted to reproduce for educational use only.

  22. Stack Pointers • Stacks • Responsible for keeping track of sequence of memory locations Permission granted to reproduce for educational use only.

  23. Program Counters • Interrupts can interrupt the processor while it is processing instructions so a different task can be performed • Information is transferred from the stack to program counter Permission granted to reproduce for educational use only.

  24. ALUs • Perform mathematical and logical operations • Similar to digital devices • AND, OR, NOT, NOR, and NAND gates Permission granted to reproduce for educational use only.

  25. Oscillators • Complex digital devices • Require steady digital pulse for timing • Separate functions controlled by one timing system • Source of steady pulse rate is oscillator circuit Permission granted to reproduce for educational use only.

  26. Watchdog Timers • Used when one process cannot be completed before going to the next process • Use a routine based on timing • Within a certain amount of time, any processes that have not ended are reset Permission granted to reproduce for educational use only.

  27. Memory • RAM • Temporarily stores programs and data • Loses contents when no electrical power is supplied • Volatile memory • ROM • Permanently stores programs or data • Retains information when power is disconnected • Nonvolatile memory Permission granted to reproduce for educational use only.

  28. Programmable Memory • Masked ROM • Programmable read-only memory (PROM) • Erasable programmable read-only memory (EPROM) • Electrically erasable programmable read-only memory (EEPROM) Permission granted to reproduce for educational use only.

  29. Review What are ports and registers used for? They are special memory locations dedicated to a specific function Permission granted to reproduce for educational use only.

  30. Review What is a stack? Area in memory used to store data and program information Permission granted to reproduce for educational use only.

  31. Review What does a stack pointer do? Keeps track of the last stack location used while the processor is busy manipulating data values, checking ports, or checking interrupts Permission granted to reproduce for educational use only.

  32. Review What is an ALU used for? It performs common mathematical and logical operations on data Permission granted to reproduce for educational use only.

  33. Review When is PROM programmed? After it is manufactured Permission granted to reproduce for educational use only.

  34. Review What kind of memory is a special type of PROM that can be erased with an ultraviolet light and reprogrammed many times? Erasable programmable read-only memory (EPROM) Permission granted to reproduce for educational use only.

  35. Programming Microcontrollers • Languages • C • C++ • BASIC • Visual BASIC • Quick BASIC • Editors Permission granted to reproduce for educational use only.

  36. Machine Language • Also called machine code, object code, or executable code • Binary codes and digital voltage pulse levels • Closest form of code to the machine • Inefficient for writing programs • Advantage is that these programs run quickly Permission granted to reproduce for educational use only.

  37. Assembly Language • Faster programming language than machine code • Mnemonics are used • Assembler program is used • Converted to machine code Permission granted to reproduce for educational use only.

  38. High-Level Language • Easier and faster to write • Can be assembled into machine code by using a compiler program • Uses more memory and executes more slowly than assembly language • Not as restrictive as assembly language Permission granted to reproduce for educational use only.

  39. Word size Opcodes Operands Source codes Object codes Interpreters Libraries Macros Programming Terminology Permission granted to reproduce for educational use only.

  40. Review What type of language is the closest to the computer itself without needing further conversion? Machine code, or machine language Permission granted to reproduce for educational use only.

  41. Review What type of language do most programmers use today? High-level language Permission granted to reproduce for educational use only.

  42. Review What is an opcode? The part of a word in programming that contains the instruction to be carried out Permission granted to reproduce for educational use only.

  43. Review When source code is assembled or compiled, what is it known as? Object code, executable code, or machine code Permission granted to reproduce for educational use only.

  44. Review What is a macro? A set of assembler instructions represented by a single word Permission granted to reproduce for educational use only.

  45. The Microcontroller Module • Mounted with other components • Microcontroller • Power source • Interface for connecting to a programming device • I/O ports • Additional memory • Microcontroller board • Microcontroller interface Permission granted to reproduce for educational use only.

  46. Microcontroller Relay Circuits • Used when device controlled by microcontroller exceeds electrical power limits • Special circuit built to drive load of higher current connects to an optic coupler Permission granted to reproduce for educational use only.

  47. Microcontroller Interface • Serial or parallel port • 9-pin serial port, or DB-9 • PC is allowed to automatically detect communications on the port by two pins being connected together Permission granted to reproduce for educational use only.

  48. Review When a microcontroller is mounted on a circuit board with other components, what is it called? A module, or microcontroller board Permission granted to reproduce for educational use only.

  49. Review When is a microcontroller relay circuit used? When the device or devices to be controlled by a microcontroller far exceed the electrical power limits of the controller Permission granted to reproduce for educational use only.

More Related