Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE 3430 – Intro to Microcomputer Systems

Similar presentations


Presentation on theme: "ECE 3430 – Intro to Microcomputer Systems"— Presentation transcript:

1 ECE 3430 – Intro to Microcomputer Systems
ECE 3430 – Introduction to Microcomputer Systems University of Colorado at Colorado Springs Lecture #2 Agenda Today 1) Computer Hardware/Software 2) Operating Systems 3) MSP432 CPU and Microcontroller Block Diagrams 4) Simple Peripheral Interfacing Techniques Lecture #2 ECE 3430 – Intro to Microcomputer Systems Fall 2015

2 Computer Hardware/Software
All microprocessors and microcontrollers employ both hardware (HW) and software (SW) to get things done. Computer Hardware circuitry executes program instructions handles input & output devices has memory to load/store programs/data CPU “Central Processing Unit” contains: Registers - Storage locations within the CPU. Faster than other memory, used to hold data and/or memory addresses during execution of an instruction. Arithmetic Logic Unit - (ALU) Circuitry that performs numerical calculations and logic functions. Control Unit - State Machine that decodes program instructions and controls the execution of the instructions. Also allocates HW resources within the CPU. Why software? Lecture #2 ECE 3430 – Intro to Microcomputer Systems Fall 2015

3 Simplified MSP432 CPU Block Diagram (Control and Datapath)
Lecture #2 ECE 3430 – Intro to Microcomputer Systems Fall 2015

4 Computer Hardware/Software
Typical Computer System X-bit processor processor capable of manipulating X-bits in 1 operation MSP432 has a 32-bit processor Abbreviations Microprocessor = uP Microcontroller = uC Non Volatile Memory (program memory, ROM, Disk, CD) CPU - ALU - Control Unit - Registers Volatile Memory (data memory, RAM) I/O (Input/Output, Keyboard, Display) Program memory typically non-volatile in uC systems. BIOS is non-volatile in uP systems. Lecture #2 ECE 3430 – Intro to Microcomputer Systems Fall 2015

5 Computer Hardware/Software
Limits of a uP - requires external memory - cannot directly interface to I/O devices, needs other integrated circuits (ICs) - needs glue logic to interface to external memory and peripheral ICs Benefits of uC - combines all needed circuitry on one IC - CPU, memory, I/O interface, glue logic Types of Memory RAM - Random Access Memory, volatile (loses contents when power is lost), by convention is read/write ROM - Read-Only Memory (still randomly accessible), non-volatile, keeps data when power is removed Lecture #2 ECE 3430 – Intro to Microcomputer Systems Fall 2015

6 Computer Hardware/Software
RAM: SRAM - Static RAM, faster more expensive, 4-6 transistors per memory cell DRAM - Dynamic RAM, slower, cheaper, needs special refresh circuitry to maintain memory contents, 1 transistor per memory cell ROM: MROM (or just ROM) - Masked Programmed ROM, uses metal layers in fab to write (cannot ever be changed) PROM - Programmable ROM, user can program electrically, fuse based, one-shot EPROM - Erasable Programmable ROM, user can program electrically but cannot erase electrically, shine UV light through window on top of chip to erase, long erase time (15-20 minutes) EEPROM - Electrically Erasable Programmable ROM, user can electrically erase and reprogram the memory, high voltage (can erase individual bytes) FLASH EEPROM - newer EEPROM technology, erased and programmed “in system”, normal voltage (cheaper than EEPROMs – erase in sectors) Lecture #2 ECE 3430 – Intro to Microcomputer Systems Fall 2015

7 Traditional EEPROM vs. Flash EEPROM
Traditional EEPROMs have a larger cell size than Flash EEPROMs—so for a given amount of silicon, you get more memory with Flash than Traditional. Write time for Flash is faster than Traditional—but erase time is faster for Traditional. Traditional EEPROMs use Fowler-Nordheim tunneling to erase and write new data (this requires higher voltages). Flash EEPROMs use Fowler-Nordheim tunneling to erase only and hot electron injection to write new data. Oscillators and a charge-pump can be used to generate the higher voltage on-chip. Traditional EEPROMs can erase a single byte—while Flash EEPROMs erase sectors (maybe the whole chip). Flash EEPROMs will typically wear out quicker than Traditional EEPROMs (10,000 erase/write cycles vs. 100,000 erase/write cycles). Read access time for Traditional EEPROMs is faster than Flash EEPROMs. Read and write access time for RAM is faster than all EEPROM technologies (at least the write time is)! Lecture #2 ECE 3430 – Intro to Microcomputer Systems Fall 2015

8 Computer Hardware/Software
Hardware Execution of Software 1) A program is written and inserted into memory. 2) The CPU initializes and sets up an internal register (called a program counter) to point to the first instruction the CPU is to execute. 3) The CPU with “fetch” an instruction from the memory address that the program counter points to. 4) The Control Unit decodes the instruction. 5) The Control Unit tells the ALU to perform an operation using the internal registers. 6) The program counter increments to the next instruction. Mention BIOS and reset vectors. Lecture #2 ECE 3430 – Intro to Microcomputer Systems Fall 2015

9 Computer Hardware/Software
Software Terminology: Program - A set of instructions that the computer HW can execute. Stored in memory as binary #’s. Machine Code - The binary #’s representing the program (ex, A+B = ). Instruction - Each CPU has a set of instructions that it knows how to execute (add, sub, mov). The instruction set is specific to the hardware. Assembly Language - It is very difficult to program in machine code. Assembly programming simplifies this by giving each instruction a mnemonic representation (ex, h’<some value>’ = Machine Code, mov = Assembly Instruction). Source Code - The file of assembly mnemonics that the programmer creates. Lecture #2 ECE 3430 – Intro to Microcomputer Systems Fall 2015

10 Computer Hardware/Software
Software Terminology (continued)… Assembler - A program that translates the “source code” at the assembly level into machine instructions. Object Code - The output of the assembler. Cross-Assembler - An assembler ran on one computer but generates machine code to be executed on another computer (i.e., using a PC to assemble an MSP432 program). Native Assembler - Assembler on the same machine the program will be executed on. High Level Language - Makes programming more general, easier to read, can handle larger programs (C/C++). Compiler - Program that translates high-level source code into machine instructions. Lecture #2 ECE 3430 – Intro to Microcomputer Systems Fall 2015

11 ECE 3430 – Intro to Microcomputer Systems
Operating Systems Operating systems (OS’s) can be thought of as programs which build a virtual environment in which other programs can be run. Operating systems insulate programmers from hardware complexity and provide memory and I/O device management. Operating systems use device drivers to communicate with specific hardware peripherals. Device drivers are either compiled into the operating system or plug into an existing operating system. Between the operating system and its associated drivers, programmers can write application programs with ease. Most modern operating systems work to maximize CPU throughput by creating a notion of concurrently running processes and threads. Lecture #2 ECE 3430 – Intro to Microcomputer Systems Fall 2015

12 ECE 3430 – Intro to Microcomputer Systems
Operating Systems On most microcomputer systems, the basic input output system (BIOS) contains the first instruction executed by the processor. After various power-on operations, control is transferred to the operating system. Other programs run on behalf of the OS. Microcomputer systems are not required to run an operating system. Microprocessor-based systems almost always use operating systems—while microcontroller-based systems usually don’t. Operating systems give life to the terms multiprocessing, multitasking, process, thread, et cetera. Lecture #2 ECE 3430 – Intro to Microcomputer Systems Fall 2015

13 ECE 3430 – Intro to Microcomputer Systems
Operating Systems Example operating systems: Microsoft DOS, Windows, CE… Early versions of Windows (pre-95) we not operating systems—but rather graphical shells that ran on DOS technology. Windows 2000 and later are versions of Windows NT technology. (NT version >= 5.0). UNIX (lots of variants: BSD, HP-UX, Sun Solaris) Linux (lots of variants: Debian, Red Hat, Mandrake, SuSE, Android) Apple Mac OS (“Classic”, Mac OS X) IBM OS/2 Warp VxWorks Operating systems are designed to support certain processor and hardware architectures. We are not using an operating system to control the MSP432 in lab. You will write the first instruction executed by the MSP432. Lecture #2 ECE 3430 – Intro to Microcomputer Systems Fall 2015

14 ECE 3430 – Intro to Microcomputer Systems
MSP432 Block Diagram Lecture #2 ECE 3430 – Intro to Microcomputer Systems Fall 2015

15 Simple Peripheral Interfacing
Peripherals are input or output devices that interface to a microcomputer system. Input devices: sensors Mice Keyboards/touch screens Toggle switches Pushbuttons Thermocouples Output devices: actuators Monitors/Liquid Crystal Displays (LCD) Light-Emitting Diodes (LEDs) Buzzers Lecture #2 ECE 3430 – Intro to Microcomputer Systems Fall 2015

16 Simple Peripheral Interfacing
Active-High Sensor Interfacing: Lecture #2 ECE 3430 – Intro to Microcomputer Systems Fall 2015

17 Simple Peripheral Interfacing
Active-Low Sensor Interfacing: Lecture #2 ECE 3430 – Intro to Microcomputer Systems Fall 2015

18 Simple Peripheral Interfacing
Active-High Actuator Interfacing: Lecture #2 ECE 3430 – Intro to Microcomputer Systems Fall 2015

19 Simple Peripheral Interfacing
Active-Low Actuator Interfacing: Lecture #2 ECE 3430 – Intro to Microcomputer Systems Fall 2015


Download ppt "ECE 3430 – Intro to Microcomputer Systems"

Similar presentations


Ads by Google