OUTPUT INTERFACE 353156 – Microprocessor Asst. Prof. Dr. Choopan Rattanapoka and Asst. Prof. Dr. Suphot Chunwiphat.

Slides:



Advertisements
Similar presentations
MICROPROCESSOR BASED SYSTEM DESIGN
Advertisements

IO Interfaces and Bus Standards. Interface circuits Consists of the cktry required to connect an i/o device to a computer. On one side we have data bus.
INPUT-OUTPUT ORGANIZATION
The Intel 8255 Programmable Peripheral Interface chip is used to give the microprocessor (8088) access to programmable input/ output devices. It has three.
PROGRAMMABLE PERIPHERAL INTERFACE -8255
MEMORY HIERARCHY – Microprocessor Asst. Prof. Dr. Choopan Rattanapoka and Asst. Prof. Dr. Suphot Chunwiphat.
Microprocessor Dr. Rabie A. Ramadan Al-Azhar University Lecture 4.
INTRODUCTION TO THE ARM PROCESSOR – Microprocessor Asst. Prof. Dr. Choopan Rattanapoka and Asst. Prof. Dr. Suphot Chunwiphat.
COURSE CURRICULUM – Computer Programming Asst. Prof. Dr. Choopan Rattanapoka and Asst. Prof. Dr. Suphot Chunwiphat.
TK2633 Introduction to Parallel Data Interfacing DR MASRI AYOB.
Parul Polytechnic Institute Parul Polytechnic Institute Subject Code : Name Of Subject : Microprocessor and assembly language programming Name.
I/O Unit.
What do you expect/require of other groups? Paul Spillane, Andre Lancour, & Victor Soto.
Blackfin BF533 EZ-KIT Control The O in I/O Activating a FLASH memory “output line” Part 2.
 | bit OR & bit AND ~ bit NOT ^ bit EXLUSIVE OR (XOR) > bit RIGHT SHIFT.
Blackfin BF533 EZ-KIT Control The O in I/O Activating a FLASH memory “output line” Part 2.
Refer to Chapter 6, 9 in the reference book
Parul Polytechnic Institute Subject Code : Name Of Subject : Microprocessor and assembly language programming Name of Unit : Introduction to Microprossor.
TK 2633 Microprocessor & Interfacing
Blackfin BF533 EZ-KIT Control The O in I/O Activating a FLASH memory “output line” Part 2.
9/20/6Lecture 3 - Instruction Set - Al Hardware interface (part 2)
Blackfin BF533 EZ-KIT Control The O in I/O
Microcontroller based system design
9/15/09 - L25 Registers & Load Enable Copyright Joanne DeGroat, ECE, OSU1 Registers & Load Enable.
3-1 System peripherals & Bus Structure Memory map of the LPC2300 device is one contiguous 32-bit address range. However, the device itself is made up of.
Microprocessor Block Diagram
Serial Peripheral Interface (SPI) Bus. SPI Bus There is no official specification for the SPI bus. It is necessary to consult the data sheets of the devices.
CS-280 Dr. Mark L. Hornick 1 Parts of a GP Computer (Microcomputer) Contains separate Microprocessor chip Memory/Memory controller MB control chips Peripheral.
Input / Output CS 537 – Introduction to Operating Systems.
Lecture 9. - Synchronous Devices require a timing signal. Clock generated Interval Timer Microprocessor Interval Timer Clk PCLK = MHz PCLK (for.
Dr. Rabie A. Ramadan Al-Azhar University Lecture 6
Introduction to Computer Architecture and System
3-1 Digital I/O A group of I/O pins is called a PORT  A port is where data enters/leaves the system. Digital I/O pins are usually grouped into 8,16 or.
Input/Output. I/O Initiation & Control  Transfer of data between circuitry external to the microprocessor and the microprocessor itself.  Transfer of.
BASIC INPUT AND OUTPUT INTERFACING.  8085A communicate with outside world using the I/O devices.  Since memory and I/O devices share the system bus,
Basic I/O Interface A Course in Microprocessor
1. Introduction 2. Methods for I/O Operations 3. Buses 4. Liquid Crystal Displays 5. Other Types of Displays 6. Graphics Adapters 7. Optical Discs 10/01/20151Input/Output.
Lecture 13 Basic I/O Interface
By, Prof. Tambe S. S. S.N.D. College of Engineering and Research Center Department of Electrical Engineering.
Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN.
1 ARM University Program Copyright © ARM Ltd 2013 General Purpose I/O.
Input/Output Interface Circuits and LSI Peripheral Devices
ECS642U Embedded Systems Digital I/O William Marsh.
USB Peripheral Controller John Jones 12/11/08 Embedded Systems Architecture.
 8251A is a USART (Universal Synchronous Asynchronous Receiver Transmitter) for serial data communication.  Programmable peripheral designed for synchronous.
8086/8088 Hardware System. Typical Microprocessor Memory System CPU Memory Control Address Data.
INTRODUCTION.  Upon completing this topic, you should be able to: Illustrate a basic elements of digital computer system and their functions, Depicts.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
12/16/  List the elements of 8255A Programmable Peripheral Interface (PPI)  Explain its various operating modes  Develop a simple program to.
Input Interface – Microprocessor
Register Map Table 8-7 on page 413 lists the GPIO registers. Each GPIO port can be accessed through one of two bus apertures.
I/O Interface. INTRO TO I/O INTERFACE I/O instructions (IN, INS, OUT, and OUTS) are explained. Also isolated (direct or I/O mapped I/O) and memory-mapped.
Review : C Programming Language
بسم الله الرحمن الرحيم MEMORY AND I/O.
F28HS2 Hardware-Software Interface Lecture 6 - Programming in C 6.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
Chapter Microcontroller
8085 Microprocessor: Architecture & Support Components.
Microprocessors CSE- 341 Dr. Jia Uddin Assistant Professor, CSE, BRAC University Dr. Jia Uddin, CSE, BRAC University.
Michael Rahaim, PhD Candidate Multimedia Communications Lab
Interfacing I/O Devices
Dr. Rabie A. Ramadan Al-Azhar University Lecture 5
Chapter 8 Peripherals-1-- ARMdemo06.c
The Arduino Microcontroller: Atmel AVR Atmega 328
Interfacing Memory Interfacing.
CENG2400 Revision Q1a A system has an ARM processor with a 32-bit General Purpose Input Output (GPIO) module. Two on/off switches are connected to bit-3.
Architecture & Support Components
Speaker: Yu-Ju Cho 卓余儒 Advisor: Prof. An-Yeu Wu 吳安宇教授
Speaker: Yu-Ju Cho 卓余儒 Advisor: Prof. An-Yeu Wu 吳安宇教授
Presentation transcript:

OUTPUT INTERFACE – Microprocessor Asst. Prof. Dr. Choopan Rattanapoka and Asst. Prof. Dr. Suphot Chunwiphat

ARM Memory Structure  AHB = Advanced High-Performance Bus  Start at memory address 0xF  APB = Advanced Peripheral Bus  Start at memory address 0xE Memory access also reading/ writing a sequence of bytes, so use loads for input, stores for output Called “Memory Mapped Input/Output” A portion of the address space dedicated to communication paths to Input or Output devices (no memory there)

GPIO  GPIO (General Purpose Input/Output)  We can use GPIO as an Input or an Output port  Input : input digital/analog signal to Microprocessor  Output : digital output signal to devices.  IN ARM7  2 legacy ports (Port 0, Port 1)  Each port has 32 pins (P0.4 means Port 0 pin 4)

LPC 2388 Board

LPC 2388 Board (Available Port)  Port 0  P0.0, P0.1 (2 pins continuous)  P0.4 – P0.9 (6 pins continuous)  P0.12 – P0.18 (7 pins continuous)  P0.24 – P0.31 (8 pins continuous)  Port 1  P1.19 – P1.31 (13 pins continuous)

Control Register on GPIO Port  There are 4 abstract registers to control GPIO port  IODIR (GPIO Port Direction Control Register) To control either GPIO port is an input port (0) or output port(1) We use IODIR0 for Port0, and IODIR1 for Port1  IOPIN (GPIO Pin Value Register) To read current port status We use IOPIN0 for Port0, and IOPIN1 for Port1  IOSET (GPIO Port Output Set Register) To write data “1” to the specific port to make output logic to “1” IOSET0 for Port0, and IOSET1 for Port1  IOCLR (GPIO Port Output Clear Register) To write data “1” to the specific port to make output logic to “0” IOCLR0 for Port0, and IOCLR1 for Port1

Example 1 : Setting a port as output unsigned int P0_9 = 0x ; IODIR0 = P0_9; IOSET0 = P0_9; IOCLR0 = P0_9; Define a variable P0_9 to store value 0x Set Port 0.9 as an output port Set logic “1” as output of Port 0.9 Set logic “0” as output of Port 0.9

Example: 2 LEDs Blink (1)  2 LEDs  connected to P0.29  connected to P0.30  We want 2 LEDs blink at the same time.

Example: 2 LEDs Blink (2) #include “LPC23XX.h” int main(void) { unsigned int P0_29 = (1 << 29); unsigned int P0_30 = (1 << 30); int i; IODIR0 = P0_29 | P0_30; while(1) { IOSET0 = P0_29 | P0_30; for(i = 0; i < 10000; i++); IOCLR0 = P0_29 | P0_30; for(i = 0; i < 10000; i++) }

Example 3: 7-Segment (1)  Suppose, we use common cathode 7- segment  Logic 1 at either a, b, c, d, e, f, g or dp will light up that LED.  We will use  P1.31 for a  P1.30 for b  P1.29 for c  P1.28 for d  P1.27 for e  P1.26 for f  P1.25 for g  P1.24 for dp

Example 3: 7-Segment(2) DisplayP1.31 (a) P1.30 (b) P1.29 (c) P1.28 (d) P1.27 (e) P1.26 (f) P1.25 (g) P1.24 (.) Hex Value xFC x Let’s complete the table

Example 3 : 7-Segment (3)  Code for displaying “0” on 7-segment. #include “LPC23XX.h” int main(void) { unsigned int P1_24TO31 = 0xFF000000; IODIR1 = P1_24TO31; IOCLR1 = P1_24TO31; IOSET1 = 0xFC000000; while(1); }

SWITCH-CASE  SWITCH-CASE in C is used for selecting a multiple (constant) choices.

Example : SWITCH-CASE

Example : SWITCH-CASE with Break

Example : 7-Segment with SWITCH #include “LPC23XX.h” int main(void) { unsigned int P1_24TO31 = 0xFF000000; int num = 0; IODIR1 = P1_24TO31; IOCLR1 = P1_24TO31; switch(num) { case 0 : IOSET1= 0xFC000000; break; case 1 : IOSET1 = 0x ; break; … } while(1); }

Assignment 9  Write a program in C for microcontroller to display a number on 7-segment as a following sequence  “0”  “1”  “2”  “0”  “1”  “2”  “0”  …  Don’t forget to wait for a moment before moving to the next number  Don’t forget to clear last output before setting the new one  Use “switch-case” and some loop statements for this program