1 / 22

Microcontroller based system design

Microcontroller based system design. Asst. Prof. Dr. Alper ŞİŞMAN. Course Objectives. to develop an in- depth understanding of the operation of microprocessors and microcontrollers C language platform for embedded systems microcontroller interfacing techniques

dixon
Download Presentation

Microcontroller based system design

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. Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN

  2. Course Objectives • todevelop an in-depthunderstanding of • theoperation of microprocessorsandmicrocontrollers • C language platform forembeddedsystems • microcontrollerinterfacingtechniques • Thepath an embeddedsystem, design&implementation of embeddedsystems in both hardware and software • to be abletouse ST32F4 serieshighperformance 32-bit ARM (Advanced RISC Machine) basedmicrocontrollers.

  3. Outline • Microcontroller basics and programming concepts,basic architecture. • <Exercise: The compiler and its capabilities, simulation, debugging examples> • Programming Model, AddressingModesandInstruction Set • <Exercise: LED on/off> • Interfacing concepts, IO module • <Exercise: push button,7-segment, keypad connection and alphanumeric display examples>

  4. Timer and ADC modules • <Exercise: Data acquisition and control examples> • TheStack, SubroutinesandInterrupts • <Exercise: Use of external and timer interrupts> • Serial communications, Universal async. Receive/transmit (UART) • <Exercise: An UART application> • Serial communication , I2C and SPI • <Exercise: An I2C application>

  5. Commoncomputerorganization (simplifiedview) • ALU (Arithmetic Logic Unit) is a circuitry, which is capable of doing various operations (for example ADD, SHIFT, AND, OR, etc) on certain on-chip registers. • CPU (Central Processing Unit) is the combination of the control logic, associated registers and the arithmetic logic unit.

  6. Blockdiagram of a typical CPU

  7. CPU structure • The main functionsare • data transfer • arithmeticandlogicoperations • decisionmaking (instructionalflowcontrol) • Theregisterarrayconsists of at leastoneaccumulator, program counterandstackpointer • Thecontrolunitcontrolsalltheoperations in a CPU andbasically it putsthe CPU in one of thefetchandexecutionphases

  8. Memory Input/Output (I/O) ALU Control CPU

  9. Computer Buses • Addressbus: carriestheaddress of a uniquememoryorinput/output (I/O) device • Data bus: carries data stored in memory (or an I/O device) tothe CPU orfromthe CPU tothememory (or I/O device) • Control bus: is a collection of controlsignalsthatcoordinateandsynchronizethewholesystem

  10. Buses and common comp. arch.

  11. Memory • Thememory in a computersystemstoresthe data andinstructions of theprograms. Adress decoder Storage Area Data bus Adress bus Othersignals (Vcc,Gnd, CS, etc.)

  12. Main memory types • ROM (read-onlymemory) • programmedpermanently at thefactory, cannot be altered • RAM (random-accessmemory) • readandwritememory • EPROM (erasableprogrammable ROM) • nonvolatile, writtenelectrically but erasedoptically • EEPROM (electrically ROM) • nonvolatile, bothwrittenanderasedelectrically

  13. Memory

  14. Operation of CPU • Fetchcycle (phase): • The CPU putstheaddress of theinstructionto be executed on theaddressbus. Theaddressinfocomesfromthe program counter (PC) maintainedbythecontrolunit. • Thecontrolbusholdstheinfo. forreadingthememorylocationandthe data busholdstheinstructionfromthememorywhich is storedintotheinstructionregister (IR) • PC is updatedtopointtothenextinstruction.

  15. Executecycle (phase): • Instruction in the IR is decoded • Therequired data transfer andtherequiredlogicalandarithmeticoperationareperformed • Theresult is writtenbackeithertoone of theregistersormemoryor I/O device • Commonoperationsperformed in ALU are: • addition, subtraction, • logical AND, OR, XOR, NOT • increment, decrement, shift, clear, etc.

  16. Detailed operation

  17. Microcomputer/Microcontroller • CPU on a single ICmicroprocessor (µP). • the terms CPU, µP and MPU (microprocessor unit) are synonymous. • CPU is the combination of the ALU and control unit of any computer. • When the CPU is a single IC; it is called a µP and is alsoreferred to as the MPU. • When the MPU‘s connected to memory and I/O, the arrangement becomes a MICROCOMPUTER. • What is microcontroller?: A microcontroller unit (MCU) contains an MPU, memory, and I/O circuitry on a single chip.

  18. Microprocessorvsmicrocontroller • Microprocessors: high performance, general purpose “brains” for PCs and workstations • Instruction decode and control, arithmetic/logicoperations, registers, timing, external control • Typical cost: $75 -- $500 • Annual demand: 10s of millions • Microcontrollers: devices with high levels ofintegration for embedded control • Microprocessor functions plus on-chip memory andperipheral functions (e.g. ports, timers) • "Swiss army knife" of microprocessor technology • Typical cost: $1-- $25 • Annual demand: billions!

  19. Bottom-Up wiev of microcontroller systems

  20. Embedded System • The majority of microcontrollers in use today are embedded in other machinery, such as automobiles, telephones, appliances, and peripherals for computer systems. These are called embedded system. • Typical input and output devices include switches, relay, solenoids, LEDs, small or custom LCD displays, radio frequency devices, and sensors for data such as temperature, humidity, light level etc. • Embedded systems usually have no keyboard, screen, disks, printers, or other recognizable I/O devices of a personal computer, and may lack human interaction devices of any kind.

  21. ARM based MCUs

More Related