CSE 370 - Fall 1999 - Introduction - 1 Architecture Overview (Start here on Fri)  Architecture (Harvard v. Princeton)  Program Memory (ROM)  External.

Slides:



Advertisements
Similar presentations
Microprocessors A Beginning.
Advertisements

Parul Polytechnic Institute
Autumn 2012C.-S. Shieh, EC, KUAS, Taiwan1 The 8051 Family Microcontroller Chin-Shiuh Shieh Department of Electronic Engineering.
Week10 Boolean Instructions on the Boolean Instructions  Boolean (or Bit) addressable capability is unique to the 8051  Enables efficient handling.
ECE 447 Fall 2009 Lecture 2: TI MSP430 Software Development C and MSP430 Assembly.
Chapter 2 HARDWARE SUMMARY
8051 Core Specification.
Introduction of Holtek HT-46 series MCU
CSC Timers Since this is a microcontroller it mainly finds itself in embedded devices Quite often embedded devices need to synchronize events The.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ input/output and clock inputs Sequence of control signal combinations.
Railway Foundation Electronic, Electrical and Processor Engineering.
Unit -II CPU Organization By- Mr. S. S. Hire. CPU organization.
16.317: Microprocessor System Design I Instructor: Dr. Michael Geiger Spring 2012 Lecture 29: Microcontroller intro.
Railway Foundation Electronic, Electrical and Processor Engineering.
The 8051 Microcontroller Architecture
ASPPRATECH.
Microcontroller 8051.
Chapter 17 Microprocessor Fundamentals William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc. Upper.
Micro controllers A self-contained system in which a processor, support, memory, and input/output (I/O) are all contained in a single package.
A Simple Tour of the MSP430. Light LEDs in C LEDs can be connected in two standard ways. Active high circuit, the LED illuminates if the pin is driven.
CoE3DJ4 Digital Systems Design Hardware summary. Microprocessors vs. Microcontrollers Microprocessors are single-chip CPU used in microcomputers Microcontrollers.
Microcode Source: Digital Computer Electronics (Malvino and Brown)
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This training course provides an overview of the CPU architecture.
8051 Micro controller. Architecture of 8051 Features of 8051.
PHY 201 (Blum)1 Microcode Source: Digital Computer Electronics (Malvino and Brown)
CSE - Shiraz University1 Computer Architecture by: Behrooz Nasihatkon Computer Science & Engineering Department Shiraz University.
8085. Microcomputer Major components of the computer - the processor, the control unit, one or more memory ICs, one or more I/O ICs, and the clock Major.
CSE466 Autumn ‘00 Misc.  Card Key Access…See Kathleen Goforth  Mail Archive…working on it…are you getting my messeges?  Why do we connect the speaker.
Microcontrollers Class : 4th Semister E&C and EEE Subject Code: 06ES42
CSE466 Autumn ‘00 Review  Card Key Access…See Kathleen Goforth  Mail Archive…working on it…are you getting my messeges?  Why do we connect the speaker.
Lecture Set 4 Programming the 8051.
HOW a Computer Works ? Anatomy of Microprocessor.
Microcontrollers. An embedded microcontroller is a chip which a computer processor with all it’s support functions (clocking and reset), memory, and i/O.
Intel 8051 Another family of microcontroller is the Intel 8051 family. The basic 8051 microcontroller has four parallel input/output ports, port 0, 1,
INTRODUCTION TO PIC MICROCONTROLLER. Overview and Features The term PIC stands for Peripheral Interface Controller. Microchip Technology, USA. Basically.
MICROOCESSORS AND MICROCONTROLLER:
Presented by Sadhish Prabhu
Microprocessors CSE 341 Lecture Md. Omar Faruqe UB 1228
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
Execution Architecture MTT CPU08 Core M CPU08 INTRODUCTION.
EE/CS-352: Embedded Microcontroller Systems Part V The 8051 Assembly Language Interrupts.
بسم الله الرحمن الرحيم MEMORY AND I/O.
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
80C51 Block Diagram 1. 80C51 Memory Memory The data width is 8 bits Registers are 8 bits Addresses are 8 bits – i.e. addresses for only 256.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ read/write and clock inputs Sequence of control signal combinations.
DEPARTMENT OF ELECTRONICS ENGINEERING V-SEMESTER MICROPROCESSOR & MICROCONTROLLER 1 CHAPTER NO microcontroller & programming.
Dr. Iyad Jafar Introducing the PIC 16 Series and the 16F84A.
Embedded Microcontroller Systems
Seminar On 8085 microprocessor
The 8051 Microcontroller architecture
Microprocessor and Microcontroller Fundamentals
80C51 Block Diagram ECE Overview.
Assembly language.
Embedded Microcontroller Systems
Classification of Instruction Set of 8051
Architecture Overview (Start here on Fri)
Microprocessor Systems Design I
UNIT – Microcontroller.
Microprocessor Systems Design I
IPCOWALA INSTITUTE OF ENGINEERING & TECHNOLOGY-DHARMAJ
Microprocessor Systems Design I
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Introduction to Microprocessors and Microcontrollers
First Design Key board R L S.
UNIT-VIII 8051 Microcontroller Architecture Register set of 8051
8051 Micro Controller.
Introduction to Microprocessor Programming
EECE.3170 Microprocessor Systems Design I
Compiled by Dr. N.Shanmugasundaram, HOD, ECE Dept, SECE.
MCU – Microcontroller Unit – 2
Presentation transcript:

CSE Fall Introduction - 1 Architecture Overview (Start here on Fri)  Architecture (Harvard v. Princeton)  Program Memory (ROM)  External  Internal  Data Memory (RAM)  Direct  Indirect  SFR’s  Instruction Execution Cycle  Risc/Accumulator  Microcode  Structure of an Assembly Language Program  Bidirectional I/O Ports  Timers/Counters  Modes  Serial I/O Port  Interrupt Controller

CSE Fall Introduction - 2 Simple Princeton Architecture ALU ROM Linear Address Space W/ Mem Mapped IO/SFR’s PCSPGPRsIR mux Control IR I/O Port Timer, SFR’s Status Reset Vector Interrupt Vect RAM address data

CSE Fall Introduction - 3 Analysis  Bottleneck into and out of memory for data and code  Use of critical 8-bit address space (256) for memory mapped I/O and special function registers (timers and their controllers, interrupt controllers, serial port buffers, stack pointers, PC, etc). For example, the Motorola 6805 processor has only 187 RAM locations.  But, easy to program and debug. Compiler is simple too.

CSE Fall Introduction : Modified Harvard Architecture ALU PC Internals Control Status Reset Vector Interrupt Vect RAM SFR’s (direct) Usually Stack (indirect) Bit Addressable Reg. Banks address mux data (indirect or Direct) 8051 standard + Enhancements

CSE Fall Introduction Memory Architecture  Advantages  Simultaneous access to Program and Data store  Register banks great for avoiding context switching on interrupt and for code compression  8-bit address space extended to = 384 registers by distinguishing between direct and indirect addressing for upper 128 bytes. Good for code compression  Bit addressable great for managing status flags  Disadvantage  A little bit confusing, with potential for errors.

CSE Fall Introduction - 6 Instruction Execution  6 states/machine cycle, 2 clocks/state = 12 clocks/machine cycle. Some instructions take two machine cycles, most take one.  Can make two ROM accesses in on memory cycle? (three byte inst)  More like CISC than RISC  Interesting features  No Zero flag (test accumulator instead)  Bit operations  Read Modify Write operations (ports)  Register to Register Moves  Integer arithmetic  Signed arithmetic  Byte and Register Exchange operations

CSE Fall Introduction - 7 Assembly Programming  Declare Segments and Segment types  Assembler converts to machine code, with relocatable segments.  Linker perform absolute code location  Segments  DATA  IDATA  PDATA  XDATA  CODE  CONST  Example Assembly Program

CSE Fall Introduction - 8 Anatomy of an Assembly Program unsigned int i; void main (void) { unsigned int tmp; while (1) { P1^= 0x01; i = 0; do { tmp = i; i += P2; } while (tmp < i); } Look for overflow in C – difficult to do Note i is global and tmp is local. What happens to local variables? How are registers used? What happens in a subroutine call?

CSE Fall Introduction - 9 Now in Assembly RSEG PROG ; first set Stack Pointer START:MOV SP,#STACK-1 CLR flag ; just for show SETB flag ; just for show LOOP1:CLR C ; Clear carry MOV A,il ADD A,P2; ; increment MOV il,A JNC LOOP1 ; loop until carry INC ih ; increment hi byte MOV A,ih ; check if zero JNZ LOOP1 ; XRL P1,#01H SJMP LOOP1 END NAMEFLASH PUBLIC il PUBLIC ih PROGSEGMENTCODE ;CONSTSEGMENTCODE VAR1SEGMENTDATA BITVARSEGMENTBIT STACKSEGMENTIDATA RSEG BITVAR flag: DBIT 1 RSEG VAR1 ih:DS 1 il: DS 1 RSEG STACK DS 10H ; 16 Bytes Stack CSEG AT 0 USING 0 ; Register-Bank 0 ; Execution starts at address 0 on power-up. JMP START

CSE Fall Introduction - 10 Compiled C ?C0001:XRL P1,#01H CLR A MOV i,A MOV i+01H,A ?C0005: MOV R7,i+01H MOV R6,i MOV R5,P2 MOV A,R5 ADD A,i+01H MOV i+01H,A CLR A ADDC A,i MOV i,A CLR C MOV A,R7 SUBB A,i+01H MOV A,R6 SUBB A,i JC ?C0005 SJMP ?C0001 But, here is the optimized Compiled C

CSE Fall Introduction - 11 I/O Ports  Input ports: Hi Input impedance (like CMOS transistor gate)  Output ports: Hi drive (current source/sink) capability (like CMOS transistor channel)  Bidirectional Ports?  Weak Pullup Approach used in the 8051  Configuration bits (used in other MCU’s)

CSE Fall Introduction - 12 Basic Electronics  Speaker Interface. Design a direct drive circuit for the speakers. How much power are we dissipating in the speaker if we stay within current rating of chip?  How can we get more power to the speaker?  Note to self: Saturation v. Linear operation

CSE Fall Introduction - 13 Lab 2  Design and implement Audio Amplifier interface to  Simple program (in assembly) that can generate a controllable range of audio frequencies (like lab1, but different range of frequencies and use interrupts instead of busy waiting).  Use interrupts to generate the pulse trains  Any algorithm suggestions? Lets keep it simple!!  Lab write-up  Characteristics of your speaker: min max tone frequency, audibility (loadness) v. frequency, etc. Anything else you notice  Are your drive transistors operating in linear or saturation mode? How can you tell?  Resource Utilization Analysis  % of time in ISR (can you minimize this?)  Worst case stack size

CSE Fall Introduction - 14 Embedded Hardware  Microcontrollers  Smallest: PIC 8-Pin (8-bit) PIC 8-pin MicrocontrollerPIC 8-pin Microcontroller  Middle: 6805 (8 bit) Example Flash Based 8051Example Flash Based 8051  Many 16-bit DSP Microcontrollers  HW support for MAC, Filter Algorithms  High End: StrongArm (32 bit) IntelIntel  Compare to pentium  External memory  Data Address Multiplexing  Memory Mapped I/O  Device Interfaces  Resistive Sensors (Strain, Temp, Gas, etc.)  Motion sensors (accelerometer)  Valve  Motor (Stepper, DC, Servo)\  Speaker  LCD Display  LED  Latches  Gas Sensors