Railway Foundation Electronic, Electrical and Processor Engineering.

Slides:



Advertisements
Similar presentations
Applications of PICs Advantages/disadvantages Digital and analogue control Loops, sub-routines, scanning, counting and feedback Interrupts Problems with.
Advertisements

Microprocessor and Microcontroller Fundamentals
EEE226 MICROPROCESSORBY DR. ZAINI ABDUL HALIM School of Electrical & Electronic Engineering USM.
MICRO PROCESSER The micro processer is a multipurpose programmable, clock driven, register based, electronic integrated device that has computing and decision.
Robotics Club, Snt Council2 The 3 Schools of Robotics: Mechanical Design – Types of motors – Material selection –
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
1-1 Microprocessor Engineering Microprocessor Systems Microcontrollers Infineon 16-bit Processor Family  specifically 167CS microcontroller C Programming.
Read Chapter 3 (David E. Simon, An Embedded Software Primer)
Chapter 4 Processor Technology and Architecture. Chapter goals Describe CPU instruction and execution cycles Explain how primitive CPU instructions are.
1-1 Embedded Software Development Tools and Processes Hardware & Software Hardware – Host development system Software – Compilers, simulators etc. Target.
Micro-controller or embedded controller
16.317: Microprocessor System Design I Instructor: Dr. Michael Geiger Spring 2012 Lecture 29: Microcontroller intro.
Railway Foundation Electronic, Electrical and Processor Engineering.
Microcontroller Architecture PIC18F Family
Microcontroller: Introduction
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
Microcontroller Programming How to make something almost do something else Raffi Krikorian MAS November 2003.
PIC microcontrollers. PIC microcontrollers come in a wide range of packages from small chips with only 8 pins and 512 words of memory all the way up to.
INTRODUCTION TO MICROCONTROLLER. What is a Microcontroller A microcontroller is a complete microprocessor system, consisting of microprocessor, limited.
1 © Unitec New Zealand Embedded Hardware ETEC 6416 Date: - 10 Aug,2011.
Department of Electronic & Electrical Engineering Embedded system Aims: Introduction to: Hardware. Software Ideas for projects ? Robotics/Control/Sensors.
C.S. Choy95 COMPUTER ORGANIZATION Logic Design Skill to design digital components JAVA Language Skill to program a computer Computer Organization Skill.
1 Sensors and Measurements Penderia & Pengukuran ENT 164 Signal Processing Elements Hema C.R. School of Mechatronics Engineering Northern Malaysia University.
Objectives How Microcontroller works
Revised: Aug 1, ECE 263 Embedded System Design Lesson 1 68HC12 Overview.
Computer architecture Microprocessor based computers.
© AJH 2013, V2.0 Computer Programming Embedded Systems Programming Stand-alone code, system initialisation, operating systems. Low-level operations; port.
COMPUTER SYSTEM ARCHITECTURE By Sohaib.  The digital computer is a digital system that performs various computational tasks.  The word digital implies.
Embedded Systems. Today Introduction to Mechatronics Microcontroller –Input / Output Ports (I/O) –Memory –ADC –PWM.
Computers Are Your Future Eleventh Edition Chapter 2: Inside the System Unit Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall1.
Microcontroller Presented by Hasnain Heickal (07), Sabbir Ahmed(08) and Zakia Afroze Abedin(19)
Eng.Samra Essalaimeh Philadelphia University 2013/ nd Semester PIC Microcontrollers.
MICROPROCESSOR AND MICRO CONTROLLER
MICROCONTROLLER SYSTEMS Part 1. Figure 1.1Elements of a digital controller CPU Central Processing Unit Input Peripherals Output Peripherals ROM Read Only.
 Introduction to Micro processor Introduction to Micro processor  Microprocessor instruction and opcodes Microprocessor instruction and opcodes  Mnemonics.
Programmable Logic Controller (PLC)
MICROOCESSORS AND MICROCONTROLLER:
Programmable Logic Controllers LO1: Understand the design and operational characteristics of a PLC system.
Logic Design / Processor and Control Units Tony Diep.
July 18, UCSD - R.A. de Callafon Short Intro to Micro Processors and I/O functions of our Kinetic Sculpture Control Box Raymond de Callafon.
What is a Microprocessor ? A microprocessor consists of an ALU to perform arithmetic and logic manipulations, registers, and a control unit Its has some.
THE MICROPROCESSOR A microprocessor is a single chip of silicon that performs all of the essential functions of a computer central processor unit (CPU)
Lecture 7: Overview Microprocessors / microcontrollers.
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
Chapter Microcontroller
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
MICROCONTROLLER INTERFACING WITH STEPPER MOTOR MADE BY: Pruthvirajsinh Jadeja ( ) COLLEGE:DIET BRANCH:EC.
5-2-1 PIC microcontroller. Learning objectives To aid revision, areas that are examinable are identified by a vertical line in the left margin. Where.
CEng3361/18 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2007 Recitation 01.
DEPARTMENT OF ELECTRONICS ENGINEERING V-SEMESTER MICROPROCESSOR & MICROCONTROLLER 1 CHAPTER NO microcontroller & programming.
STUDY OF PIC MICROCONTROLLERS.. Design Flow C CODE Hex File Assembly Code Compiler Assembler Chip Programming.
Introduction to Microcontroller Technology
IF I ONLY HAD A BRAIN THE MICROCONTROLLER
The 8051 Microcontroller architecture
Popular Microcontrollers and their Selection by Lachit Dutta
PROGRAMMABLE LOGIC CONTROLLERS SINGLE CHIP COMPUTER
Microprocessor and Microcontroller Fundamentals
Microprocessor and Microcontroller Fundamentals
Microcontrollers, Basics Fundamentals of Designing with Microcontrollers 16 January 2012 Jonathan A. Titus.
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
UNIT – Microcontroller.
IPCOWALA INSTITUTE OF ENGINEERING & TECHNOLOGY-DHARMAJ
Chapter 10 © 2011, The McGraw-Hill Companies, Inc.
ECET 340 Competitive Success/snaptutorial.com
8051 Programming in C rhussin.
Introduction to Microprocessors and Microcontrollers
Lecture 3 - Instruction Set - Al
EECE.3170 Microprocessor Systems Design I
MCU – Microcontroller Unit – 2
Presentation transcript:

Railway Foundation Electronic, Electrical and Processor Engineering

1 Microprocessor Systems Four main components –Microprocessor –Memory –Inputs –Outputs Memory –ROM types – program and fixed data –RAM (Read & Write) – Data variables

2 Microprocessor Circuit is driven by a clock signal The microprocessor has internal registers. The action performed is determined by a set of binary instructions stored in ROM A reset starts the microprocessor at a predetermined point in the program (usually location 0)

3 Inputs & Outputs Normally Digital I/O ( two levels ‘0’ & ‘1’) Normally parallel i.e grouped – 8bit Ports What about analogue signals? –Analogue to Digital Converter (ADC) –Digital to Analogue Converter (DAC) Other devices include hardware timers and counters Digital data can also be in a serial format (e.g. RS232, RS 485 are serial standards)

4 Microcontrollers Integration of all required components onto one chip. Many manufacturers – Microchip, Freescale, Intel, Infineon, Philips, ARM etc. producing different microprocessors Many microcontrollers with same microprocessor but differ in other components. Used in embedded products.

Examples 5 Rail - Points Heating Control Systems

6 Programming Can be done at different levels –Object (machine) binary code –Assembly language –High level language ( e.g. ‘C’ language) –Graphical (e.g. LabVIEW) Internal architecture Memory Map Programmers Model – different for programming at different levels

7 EXAMPLES Machine code – means move the value from W reg. to file register i.e 8 Assembly – Count EQU8 MOVWF Count A program called an assembler converts it to the binary object code. An example machine instruction

;Constants LED equ 3 ;LED bit 3 on PORTB ;Reset vector ; This code will start executing when a reset occurs ORG 0x ;Start of main program Start: bcf TRISB,LED ;Set PortB bit 3 as an o/p bcf PORTB,LED ;set LED off Loop: ;while(1) bsf PORTB,LED ; turn led on bcf PORTB,LED ; turn led off D7FD bra Loop ;endwhile Comments Begin with ; Assembly instructions Program Line Numbers Object code in HEX format ROM location Labels An Assembler program

9 C Programming Portable High level – Abstract Standard constructs –Variables – various data types –Selection ( if statements) –Loops (while, for, do) –Standard operations (+-*/) –Logical and bit-wise operations (AND OR XOR etc.)

10 Simple ‘C’ outline Selection - two types if (comparison is true ) { Do this once; } if (comparison is true) { do this; } else { do that; } Loops while (comparison is true ) { KEEP Doing this; } Comparisons:- == is equal to != is not equal to > is greater than < is less than >= is greater or equal to <= is less than or equal to Defining variables unsigned char i; //8 bit value int x;// 16 bit signed unsigned int y;// 16 bit value Misc. // starts a comment i++; // increment by one i--; // decrement by one &&// logical AND || // logical OR

Graphical Programming LabVIEW is a graphical programming language that uses icons instead of lines of text to create applications. In contrast to text-based programming languages, where instructions determine program execution, LabVIEW uses dataflow programming, where data determine execution. 11

12 Practical approach Treat as a programmable digital device Choose device based on number and types of input and outputs Write program:- –Define inputs and outputs –Read input data, process data and generate outputs Requires knowledge of a programming language and microcontroller specific features.

13 Analogue to Digital Converter n bits – determines the resolution Reference voltage sets the input range often have an analogue multiplexer to allow several input channels to use a single ADC ADC n bits Analogue input voltage Reference voltages (one is usually analogue ground)

14 Example 8 bit ADC Reference voltage of 0v and +5v input voltage range = 5v - 0v = 5V Number of digital values (steps) = 2 n =2 8 =256 Note! values range from 0 to 255 Resolution = Reference voltage range = 5 Number of digital values 256 = = mV This is the smallest change in voltage that can be detected

Volts Remember max digital value = 255. Max convertible input = 255 × resolution in volts = 255 × = Input voltage

16 Digital Conversion Digital value Analogue input voltage