Parallel Ports Lecture L4.1. Parallel Interfacing Parallel I/O Ports Using Parallel Ports.

Slides:



Advertisements
Similar presentations
The Build-up of the Red Sequence at z
Advertisements

Introduction to Micro-controllers Anurag Dwivedi.
7-Segment Displays Lecture L6.1 Section 6.3. Turning on an LED.
C Examples 1.
C HAPTER 2 PIC 16F887 M ICROCONTROLLER Eng. Hazem W. Marar.
Input/Output (I/O) Ports and Interfacing
ECE 371 Unit 13 - Part 1 Serial Peripheral Interface (SPI)
Dr. Gary Stewardson, Raymond Boyles Hello again, Sparkey here. Slippery and I will help you explore how to create a program that simulates outputs on a.
68HC11 Analog I/O Chapter 12.
68HC11 Polling and Interrupts
Programming the ATmega16
4 November 2004AME 470 – Team Unum PDR #9 – 4 November 2004 Product Control and Microprocessor Programming Chris Tilton Team UNUM.
Switches, Pushbuttons, and LEDs Digilent Spartan 3 Board Lecture L2.1.
EET 2261 Unit 7 I/O Pins and Ports
ECE 265 – LECTURE 13 Interface to switches and LEDs 7/3/ ECE265.
The Serial Peripheral Interface (SPI)
Robotics Research Laboratory Louisiana State University.
Robotics Research Laboratory Louisiana State University.
COE4OI5 Engineering Design Chapter 2: UP2/UP3 board.
1 4-Integrating Peripherals in Embedded Systems (cont.)
I/O Ports CS-280 Dr. Mark L. Hornick 1. CS-280 Dr. Mark L. Hornick 2 Ports are channels from the CPU to external hardware and software Atmega32 has: 4.
Teachers Name : Suman Sarker Telecommunication Technology Subject Name : Microcontroller & Embedded System Subject Code : 6871 Semester : 7th Department.
The miniDragon+ Board and CodeWarrior Lecture L2.1.
Introduction to Robo Pro
Engineering 1040: Mechanisms & Electric Circuits Winter 2015 Interfacing Light-Emitting Diodes (LEDs) & Push Buttons to Microcontrollers.
Parallel Interfacing Chapter 7. Parallel Interfacing Parallel I/O Ports Using Parallel Ports Seven-Segment Displays Keypad Interfacing Liquid Crystal.
ECS642U Embedded Systems Cyclic Execution and Polling William Marsh.
1 ECE 372 – Microcontroller Design Parallel IO Ports - Inputs.
AVR Programming: Digital I/O September 10, What is Digital I/O? Digital – A 1 or 0 Input – Data (a voltage) that the microcontroller is reading.
Printer Port * 0= * 1= * 6= 60 1 * 4 = 4 = 164 Decimal Binary We use Ten Symbols
3-1 EE 319K Introduction to Microcontrollers Lecture 3: Addressing modes, Memory Operations, Subroutines, I/O, Logical/Shift Operations.
Keypad Lecture L4.6. Port Integration Module PIM_9C32 Block Guide V01.06 Reference: S12C32PIMV1.pdf.
I/O Ports MTT I/O PORTS. I/O Ports MTT Module Objectives Configure any pin as either input or output Read or write data from/to port.
SIMON Presented By: Amanda Buczkowski James Jenkins Fadi Hanna.
The Serial Communication Interface (SCI) MC9S12-C32
Input Interface – Microprocessor
1-3 GPIO_Output(LuminaryLibrary) 1.Alter the output current to 4mA 2.Let LED0 turn on but LED 1 turn off. Modify your program in E:\yourname\arm.
Microelectronic Systems--University of Tennessee 1 1 Mancala Ben McCue Nithiya Gajanetharan Nora D. Bull ECE 551.
Electronics Lab. 4 Exp. 2 : Parallel input
UNIT 7 - INTRODUCTION TO I/O INTERFACING. TWO MAJOR TYPES OF I/O INTERFACING ISOLATED I/O - DEDICATED I/O INSTRUCTIONS ARE USED TO ACCESS I/O DEVICES.
AND Gate Inputs Output Input A (Switch) Input B (Switch) Output Y (Lamp) 0 (Open) 0 (OFF) A B Lamp.
Introduction to the DE0 Board Prof. Taeweon Suh Computer Science & Engineering Korea University COSE221, COMP211 Computer Logic Design.
Embedded Systems Lecture 4 January 20, 2016.
I/O PORTS. General purpose I/O pins can be considered the simplest of peripherals. They allow the PICmicro™ to monitor and control other devices. To add.
ADVANCED PARALLEL I/O Razvan Bogdan Embedded Systems.
Fri. Sept 29 Announcements
General Purpose I/O.
COMP211 Computer Logic Design Introduction to the DE2 Board
COMP2121: Microprocessors and Interfacing
ECET 330 Innovative Education--snaptutorial.com
Example 6 Hex Keypad Lecture L3.2.
Traffic light programming challenges
8.0 Programmable Logic Controllers 1
I/O Ports in AVR Sepehr Naimi
Lecture 18 PicoBlaze I/O Interface
Raspberry Pi with Pibrella
Tim Sumner, Imperial College, Rm: 1009, x47552
Extension: LCM 3 Three lights, red, yellow and green, are controlled by switches.  At the start, the three lights are switched on simultaneously.  The.
Port Integration Module
EE4OI4 Engineering Design
I/O Ports in AVR Sepehr Naimi
Decoding and Using a 4x4 Keyboard
Interrupt-Driven State Machine
Making) LED table lamp.
Lab 1. Introduction to the DE2 Board
Lecture 4. Introduction to the DE2 Board
TI LaunchPad I/O Programming with Energia
Oregon Robotics Tournament and Outreach Program
Decoding and Using a 4x4 Keyboard
Interface ckt for demo Outputs Inputs V PIN 0 10K PIN 4 GND GND
Presentation transcript:

Parallel Ports Lecture L4.1

Parallel Interfacing Parallel I/O Ports Using Parallel Ports

Port Integration Module PIM_9C32 Block Guide V01.06 Reference: S12C32PIMV1.pdf

Port and Data Direction Registers

PTP ($258) DDRP($25A) PTT ($240) DDRT($242) PTM ($250) DDRM($252) PTS ($248) DDRS($24A) PORTA ($0) DDRA ($2) PORTB ($1) DDRB ($3) PTJ ($268) DDRJ($26A) PORTE ($8) DDRE ($9) PORTAD ($8F) Input only

Parallel Interfacing Parallel I/O Ports Using Parallel Ports

Turning on an LED

Using an AC Relay

LED Example

;LED example ptp equ $258 ; Port P ddrp equ $25A ; Direction ORG$800 pb_maskdb$04 reddb$80 yellowdb$40 greendb$20 red1db$7F yellow1db$BF green1db$DF init ldaa#$E0;PP7..PP5 outputs staaddrp;PP2 input ldaa#0 staaptp;turn off LEDs rts

ORG$4000 main bsrinit;initialize port mn0ldx#red;start with red LED mn1bsrsec_delay;wait 1 second ldaaptp oraa0,x staaptp;light next LED inx cpx#$804 bnemn1;light red, yellow, green mn2bsrsec_delay;wait 1 second ldaaptp anda0,x staaptp;turn off next LED inx cpx#$807 bnemn2;turn off red, yellow, green bramn0;repeat sequence

#includems_delay.asm init ldaa#$E0;PP7..PP5 outputs staaddrp;PP2 input ldaa#0 staaptp;turn off LEDs rts sec_delay ldy#1000 jsrms_delay rts

Interfacing a switch input PTJ: equ $268 ; Port J DDRJ: equ $26A ; Direction ldaaPTJ anda#$80 beqsw_down

Debouncing Switch wait_pb_down ldaaptj andapb_mask bnewait_pb_down;wait to push down ldy#3 jsrms_delay;debounce delay ldaaptj andapb_mask bnewait_pb_down;wait until still down rts

Debouncing Switch wait_pb_up ldaaptj andapb_mask beqwait_pb_up;wait to release ldy#3 jsrms_delay;debounce delay ldaaptj andapb_mask beqwait_pb_up;wait until still up rts

LED – Pushbutton Example

;LED and pushbutton example ptp equ $258 ; Port P ddrp equ $25A ; Direction ptj equ $268 ; Port J ddrj equ $26A ; Direction ORG$800 pb_maskdb$80 reddb$80 yellowdb$40 greendb$20 red1db$7F yellow1db$BF green1db$DF ORG$4000 main bsrinit;initialize port

ORG$4000 main bsrinit;initialize port ldx#red;start with red LED mn1bsrwait_pb_down;wait to push button ldaaptp oraa0,x staaptp;light next LED bsrwait_pb_up;wait to release button inx cpx#$804 bnemn1;light red, yellow, green mn2bsrwait_pb_down;wait to push button ldaaptp anda0,x staaptp;turn off next LED bsrwait_pb_up;wait to release button inx cpx#$807 bnemn2;turn off red, yellow, green bramain;repeat sequence