Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.

Slides:



Advertisements
Similar presentations
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Advertisements

POWER ELECTRONICS Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical Engineering Department بسم الله.
C Language.
POWER ELECTRONICS Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical Engineering Department بسم الله.
POWER ELECTRONICS Instructor: Eng. Jalal Al Roumy The Islamic University of Gaza Faculty of Engineering Electrical Engineering Department بسم الله الرحمن.
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Instructor: Eng.Moayed N. EL Mobaied
POWER ELECTRONICS Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical Engineering Department بسم الله.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /17/2013 Lecture 12: Procedures Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL.
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
EEE226 MICROPROCESSORBY DR. ZAINI ABDUL HALIM School of Electrical & Electronic Engineering USM.
POWER ELECTRONICS Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical Engineering Department بسم الله.
SYSTEM PROGRAMMING & SYSTEM ADMINISTRATION
1 Starting a Program The 4 stages that take a C++ program (or any high-level programming language) and execute it in internal memory are: Compiler - C++
POWER ELECTRONICS Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical Engineering Department بسم الله.
POWER ELECTRONICS Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical Engineering Department بسم الله.
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Programming Logic and Design Fourth Edition, Introductory
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Chapter 8: Programming the Microprocessor. Copyright ©2009 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. The Intel.
1. 2 FUNCTION INLINE FUNCTION DIFFERENCE BETWEEN FUNCTION AND INLINE FUNCTION CONCLUSION 3.
COMP1170 Midterm Preparation (March 17 th 2009) Acknowledgment The notes are adapted from those provided by Deitel & Associates, Inc. and Pearson Education.
POWER ELECTRONICS Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical Engineering Department بسم الله.
ASPPRATECH.
POWER ELECTRONICS Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical Engineering Department بسم الله.
Microprocessor and Microcontroller Based Systems
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
POWER ELECTRONICS Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical Engineering Department بسم الله.
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
POWER ELECTRONICS Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical Engineering Department بسم الله.
1 Chapter 4 Macro Processors Professor Gwan-Hwan Hwang Dept. Computer Science and Information Engineering National Taiwan Normal University 9/17/2009.
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
POWER ELECTRONICS Instructor: Eng. Jalal Al Roumy The Islamic University of Gaza Faculty of Engineering Electrical Engineering Department بسم الله الرحمن.
Introduction to C Programming CE Lecture 7 Compiler options and makefiles.
POWER ELECTRONICS Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical Engineering Department بسم الله.
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Objective At the conclusion of this chapter you will be able to:
ELECTRONICS I Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical Engineering Department بسم الله الرحمن.
The LC-3 – Chapter 7 COMP 2620 Dr. James Money COMP
CPS120: Introduction to Computer Science Lecture 14 Functions.
CC112 Structured Programming Lecture 2 1 Arab Academy for Science and Technology and Maritime Transport College of Engineering and Technology Computer.
FOUNDATION IN INFORMATION TECHNOLOGY (CS-T-101) TOPIC : INFORMATION SYSTEM – SOFTWARE.
POWER ELECTRONICS Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical Engineering Department بسم الله.
Chapter 12: Programming in the Large By: Suraya Alias 1-1.
Department of Electronic & Electrical Engineering Lecture 2 ● Introduction to IO ● Using a subroutine ● Driving a 7seg display.
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
Department of Electronic & Electrical Engineering Lecture 2. PIC16F84A Architecture / Instructions Memory. Program/Data (Harvard) File Registers (Data).
بسم الله الرحمن الرحيم MEMORY AND I/O.
Macro Processors Basic Functions Machine-Independent Features Design Options Implementation Examples.
 A macro represents a commonly used group of statements in the source programming language.  The macro processor replaces each macro instruction with.
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
POWER ELECTRONICS Instructor: Eng. Jalal Al Roumy The Islamic University of Gaza Faculty of Engineering Electrical Engineering Department بسم الله الرحمن.
Department of Electronic & Electrical Engineering Lecture 3. ● Template program. ● Introduction to IO ● PORTA PORTB TRISA TRISB ● Using a subroutine ●
LECTURE 3 Translation. PROCESS MEMORY There are four general areas of memory in a process. The text area contains the instructions for the application.
CC410: System Programming Dr. Manal Helal – Fall 2014 – Lecture 11–Macro-Processors.
Lecture 3 Translation.
Instructor: Eng.Moayed N. EL Mobaied
Programming what is C++
User-Written Functions
Chapter 8: Programming the Microprocessor
Addressing Modes in Microprocessors
MODULAR PROGRAMMING Many programs are too large to be developed by one person. programs are routinely developed by teams of programmers The linker program.
Microprocessor and Assembly Language
Programming Fundamentals Lecture #3 Overview of Computer Programming
8051 Micro Controller.
THREE-PHASE INVERTERS
Input-Output Stability
Presentation transcript:

Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical Engineering Department بسم الله الرحمن الرحيم ECOM 4315 — Fall 2008 Lecture 16

The LUT is used when being disable to find a special relation between the input and the output in any way. LUT can be used in: ? ? ?  Seven segment  LCD  CODE Look Up Table: Look Up Table

 Seven segment( 0 9) using indirect addressing  Seven segment ( available characters) Look Up Table: Example

SEVEN segment EXAMPLE

SEVEN segment EXAMPLE

SEVEN segment EXAMPLE

Macros are a very useful element in assembly language. They could briefly be described as "user defined group of instructions which will enter assembler program where macro was called". It is possible to write a program even without using macros. But with their use written program is much more readable, especially if more programmers are working on the same program together. Macros have the same purpose as functions of higher program languages. Macros

How to write macros? Macros From the way they were written, we could be seen that macros can accept arguments, too which is also very useful in programming. Whenever argument appears in the body of a macro, it will be replaced with the value. In order to use a macro in the program, it is necessary to include macro file in the main program with instruction include "macro_name.inc".

1)In execution stage, the subroutine puts the address of the called function in PC and hide the original value of PC (before calling) in the stack. 2) The macro in compilation process (not in execution), copies the macro in the place where it is called. It doesn't put address on stack. 3) The subroutine can be written or called in any place, but the macro must be declared before calling. 4) The subroutine takes more time in execution, but the macro doesn't take time. This can be considered as an advantage to the macro. 5) The subroutine doesn't take size in the program, but the macro takes as it is copied in the program during calling. It is considered as disadvantage to the macro. Macros What's the difference between macro and subroutine?

(Using Macros internally ) Types for using of Macros:

(Using Macros internally ) Types for using of Macros:

(Using Macros externally ) Types for using of Macros:

(Using Macros externally ) Types for using of Macros:

(Using Macros externally ) Types for using of Macros:

Notes: The first Macro is declared internally in the same file, but the second Macro is declared externally. In calling Macros, we didn't write the command call or other commands. We call it by writing its name directly. The program with internally or externally macro is the same size. Externally macros must be included in the same folder of the main program in which it is called,or writing its extension in the include statement. Macros Notes

Write two programs ( internally macro,externally macro) 1) BANK0 BANK1 2) Macro for reading from EEPROM Macro for Writing to EEPROM 3) Macro to perform multiplication process ( one digit) then (two digits) Macro to perform division process (one digit ) then ( two digits) Deadline: second week (2/11/2008 Tuesday) H.W#7

Design # 2 ( DC motor with optical encoder) Design problems Design controller for DC motor  Switch for on/off  Switch for right/left rotation  Switch for speed control.  speed level (8 led’s)  Close loop with k controller.