kashanu.ac.ir Microprocessors 10-1 IO Devices Stepper Motors DAC, ADC, PPI Lec note 10.

Slides:



Advertisements
Similar presentations
INPUT-OUTPUT ORGANIZATION
Advertisements

Parul Polytechnic Institute
11-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL I/O System Design.
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
Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
Memory & IO Interfacing to CPU
Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
kashanu.ac.ir Microprocessors 6-1 I/O Devices Switches, LED, LCD Lec note 6.
TK2633 Introduction to Parallel Data Interfacing DR MASRI AYOB.
Lecture 07: 8255 PPI Chip. The 80x86 IBM PC and Compatible Computers Chapter PPI Chip PPI: Programmable Parallel Interface (so it is an I/O.
Engineering 4862 Microprocessors Lecture 23 Cheng Li EN-4012
82C55 82C55 Programmable Peripheral Interface Interfacing Part III.
8086.  The 8086 is Intel’s first 16-bit microprocessor  The 8086 can run at different clock speeds  Standard 8086 – 5 MHz  –10 MHz 
- Microprocessor - Programming 8255 Mode 1 (slide ) Prepared by: Mahmoud Abdullah Mahdi (33)
The 8085 Microprocessor Architecture
Microprocessor and Microcontroller
Stepper Motors. Motors coils of conductive wire magnetic fields rotational motion –except for linear induction motor everywhere from the very large (LRT)
1 TK2633TK Microprocessor Architecture DR MASRI AYOB.
P Address bus Data bus Read-Only Memory (ROM) Read-Write Memory (RAM)
Engineering 4862 Microprocessors Lecture 26 Cheng Li EN-4012
I/O devices Peripheral devices (also called I/O devices) are pieces of equipment that exchange data with a CPU Examples: switches, LED, CRT, printers,
Chapter 10 Input/Output Interface Circuits and LSI Peripheral Devices
MODES OF Details of Pins Pin 1 –Connected Ground Pins 2-16 –acts as both input/output. Outputs address at the first part of the cycle and outputs.
DEEPAK.P MICROPROCESSORS AND APPLICATIONS Mr. DEEPAK P. Associate Professor ECE Department SNGCE 1.
Khaled A. Al-Utaibi  Intel Peripheral Controller Chips  Basic Description of the 8255  Pin Configuration of the 8255  Block Diagram.
CPU Interfacing Memory.
MCS-51 Hardware Interfacing
The 8253 Programmable Interval Timer
Port Mapped I/O.
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
By, Prof. Tambe S. S. S.N.D. College of Engineering and Research Center Department of Electrical Engineering.
I NTRODUCTION P IN CONFIGARATION O PERATING MODE.
8086/8088 Hardware Specifications Power supply:  +5V with tolerance of ±10%;  360mA. Input characteristics:  Logic 0 – 0.8V maximum, ±10μA maximum;
University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi
Applications of PPI A/D - Temperature Sensor. Analog to Digital.
 8251A is a USART (Universal Synchronous Asynchronous Receiver Transmitter) for serial data communication.  Programmable peripheral designed for synchronous.
Applications of PPI Stepper Motors- D/A - A/D - Temperature Sensor.
Input / Output (Peripheral) Interfacing
Programmable Peripheral Interface Parallel port Interface 8255
12/16/  List the elements of 8255A Programmable Peripheral Interface (PPI)  Explain its various operating modes  Develop a simple program to.
PPI-8255.
EE3721 Computer System Principles
Programmable Interrupt Controller (PIC)
UNIT-IV 8255 PPI Various Modes Of Operation Interfacing To 8086.
PROGRAMMABLE PERIPHERAL INTERFACE -8255
Introduction to Microprocessors - chapter3 1 Chapter 3 The 8085 Microprocessor Architecture.
Stepper motor. Stepper Motor Interfacing Stepper motor is a widely used device that translates electrical pulses into mechanical movement. Stepper motor.
EE365 - Microprocessors period 26 10/23/00 D. R. Schertz # Parallel Ports.
8255:Programmable Peripheral Interface
I/O Devices Switches, LED, LCD
Memory Mapped IO (and the CerfBoard). The problem How many IO pins are available on the 8051? What if you are using interrupts, serial, etc…? We want.
Intel 8255A PPI EEE 365 [FALL 2014] LECTURE ATANU K SAHA BRAC UNIVERSITY.
8255 Programmable Peripheral Interface
PROGRAMMABLE PERIPHERAL INTERFACE -8255
8255: Programmable Peripheral Interface (PPI)
Diagram of microprocessor interface with IO devices
The 8255 Programmable Peripheral Interface
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Chapter 7 Features and Interfacing of Programmable Devices for 8085 based systems.
PROGRAMMABLE PERIPHERAL INTERFACE -8255
8255.
Parallel communication interface 8255
Programmable Peripheral Interface
8085 Microprocessor Architecture
82C55 Programmable Peripheral Interface
Programmable Peripheral Interface
The Programmable Peripheral Interface (8255A)
Presentation transcript:

kashanu.ac.ir Microprocessors 10-1 IO Devices Stepper Motors DAC, ADC, PPI Lec note 10

kashanu.ac.ir Microprocessors 10-2 Stepper Motors  more accurately controlled than a normal motor  allowing fractional turns step by step  low speed, and lower torque than a comparable D.C. motor  useful for precise positioning for robotics  Servomotors require a position feedback signal for control

kashanu.ac.ir Microprocessors 10-3 Stepper Motor Diagram

kashanu.ac.ir Microprocessors 10-4 Stepper Motor Step Angles

kashanu.ac.ir Microprocessors 10-5 Terminology  Steps per second(SPS), Rotate Per minute (RPM)  SPS = (RPM * SPR) /60  Number of teeth  4-step, wave drive 4-step, 8-step  Motor speed (SPS)  Holding torque

kashanu.ac.ir Microprocessors 10-6 Stepper Motor Types  Variable Reluctance  Permanent Magnet

kashanu.ac.ir Microprocessors 10-7 Variable Reluctance Motors

kashanu.ac.ir Microprocessors 10-8 Variable Reluctance Motors  This is usually a four wire motor – the common wire goes to the +ve supply and the windings are stepped through  Our example is a 30 o motor  The rotor has 4 poles and the stator has 6 poles  Example

kashanu.ac.ir Microprocessors 10-9 Variable Reluctance Motors  To rotate we excite the 3 windings in sequence  W  W  W  This gives two full revolutions

kashanu.ac.ir Microprocessors Unipolar Motors

kashanu.ac.ir Microprocessors Unipolar Motors  To rotate we excite the 2 windings in sequence  W1a  W1b  W2a  W2b  This gives two full revolutions

kashanu.ac.ir Microprocessors Basic Actuation Wave Forms

kashanu.ac.ir Microprocessors Unipolar Motors  To rotate we excite the 2 windings in sequence  W1a  W1b  W2a  W2b  This gives two full revolutions at 1.4 times greater torque but twice the power

kashanu.ac.ir Microprocessors Enhanced Waveforms  better torque  more precise control

kashanu.ac.ir Microprocessors Unipolar Motors  The two sequences are not the same, so by combining the two you can produce half stepping  W1a  W1b  W2a  W2b

kashanu.ac.ir Microprocessors Motor Control Circuits  For low current options the ULN200x family of Darlington Arrays will drive the windings direct.

kashanu.ac.ir Microprocessors Interfacing to Stepper Motors

kashanu.ac.ir Microprocessors Example

kashanu.ac.ir Microprocessors Digital to Analog Converter

kashanu.ac.ir Microprocessors Example – Step Ramp

kashanu.ac.ir Microprocessors Analog to Digital

kashanu.ac.ir Microprocessors V in Range

kashanu.ac.ir Microprocessors Timing

kashanu.ac.ir Microprocessors Interfacing ADC

kashanu.ac.ir Microprocessors Example

kashanu.ac.ir Microprocessors Temperature Sensor

kashanu.ac.ir Microprocessors Printer Connection

kashanu.ac.ir Microprocessors IO Base Address for LPT

kashanu.ac.ir Microprocessors Printer’s Ports

kashanu.ac.ir Microprocessors  8051 has limited number of I/O ports  one solution is to add parallel interface chip(s)  8255 is a Programmable Peripheral Interface PPI  Add it to 8051 to expand number of parallel ports  8051 I/O port does not have handshaking capability  8255 can add handshaking capability to 8051

kashanu.ac.ir Microprocessors  Programmable Peripheral Interface (PPI)  Has 3 8_bit ports A, B and C  Port C can be used as two 4 bit ports CL and Ch  Two address lines A0, A1 and a Chip select CS  8255 can be configured by writing a control-word in CR register

kashanu.ac.ir Microprocessors Control Word

kashanu.ac.ir Microprocessors 10-33

kashanu.ac.ir Microprocessors Operating Modes  Mode 0 : Simple I/O  Any of A, B, CL and CH can be programmed as input or output  Mode 1: I/O with Handshake  A and B can be used for I/O  C provides the handshake signals  Mode 2: Bi-directional with handshake  A is bi-directional with C providing handshake signals  B is simple I/O (mode-0) or handshake I/O (mode-1)  BSR (Bit Set Reset) Mode  Only C is available for bit mode access  Allows single bit manipulation for control applications

kashanu.ac.ir Microprocessors Mode Definition Summary

kashanu.ac.ir Microprocessors Mode 0  Provides simple input and output operations for each of the three ports.  No “handshaking” is required, data is simply written to or read from a specified port.  Two 8-bit ports and two 4-bit ports.  Any port can be input or output.  Outputs are latched.  Inputs are not latched

kashanu.ac.ir Microprocessors Mode 1  Mode 1 Basic functional Definitions:  Two Groups (Group A and Group B).  Each group has one 8-bit data port and one 4-bit control/data port.  The 8-bit data port can be either input or output. Both inputs and outputs are latched.  The 4-bit port is used for control and status of the 8-bit data port.

kashanu.ac.ir Microprocessors mode 1 (output)

kashanu.ac.ir Microprocessors Mode 1 – Control Signals  Output Control Signal Definition  OBF (Output Buffer Full F/F). (C7 for A, C1 for B)  The OBF output will go “low” to indicate that the CPU has written data out to the specified port.  A signal to the device that there is data to be read.  ACK (Acknowledge Input). (C6 for A, C2 for B)  A “low” on this input informs the 8255 that the data from Port A or Port B has been accepted.  A response from the peripheral device indicating that it has read the data.  INTR (Interrupt Request). (C3 for A, C0 for B)  A “high” on this output can be used to interrupt the CPU when an output device has accepted data transmitted by the CPU.

kashanu.ac.ir Microprocessors Timing diagram for mode1(output)

kashanu.ac.ir Microprocessors mode 1 (input)

kashanu.ac.ir Microprocessors Mode 1 – Control Signals  Input Control Signal Definition  STB (Strobe Input). (C4 for A, C2 for B)  A “low” on this input loads data into the input latch.  IBF (Input Buffer Full F/F) (C5 for A, C1 for B)  A “high” on this output indicates that the data has been loaded into the input latch; in essence, an acknowledgement from the 8255 to the device.  INTR (Interrupt Request) (C3 for A, C0 for B)  A “high” on this output can be used to interrupt the CPU when an input device is requesting service.

kashanu.ac.ir Microprocessors Timing diagram for mode1(input)

kashanu.ac.ir Microprocessors Mode 2 - Strobed Bidirectional Bus I/O  MODE 2 Basic Functional Definitions:  Used in Group A only.  One 8-bit, bi-directional bus port (Port A) and a 5-bit control port (Port C).  Both inputs and outputs are latched.  The 5-bit control port (Port C) is used for control and status for the 8-bit, bi-directional bus port (Port A).

kashanu.ac.ir Microprocessors Mode 2  Output Operations  OBF (Output Buffer Full). The OBF output will go low to indicate that the CPU has written data out to port A.  ACK (Acknowledge). A low on this input enables the tri-state output buffer of Port A to send out the data. Otherwise, the output buffer will be in the high impedance state.  Input Operations  STB (Strobe Input). A low on this input loads data into the input latch.  IBF (Input Buffer Full F/F). A high on this output indicates that data has been loaded into the input latch. PinFunction PC7/OBF PC6/ACK PC5IBF PC4/STB PC3INTR PC2I/O PC1I/O PC0I/O

kashanu.ac.ir Microprocessors 10-46

kashanu.ac.ir Microprocessors BSR Mode  If used in BSR mode, then the bits of port C can be set or reset individually

kashanu.ac.ir Microprocessors BSR Mode example Move dptr, 0093h Up:Move a, 09h ;set pc4 Acall delay Mov a,08h;clr pc4 Acall delay Sjmp up

kashanu.ac.ir Microprocessors Interfacing 8255 with 8051  CS is used to interface 8255 with 8051  If CS is generated from lets say Address lines A15:A12 as follows, A15:A13 = 110  Address of 8255 is 110 xxxxx xxxx xx00b  Base address of 8255 is  b=C000H  Address of the registers  A = C000H  B = C001H  C = C002H  CR = C003H

kashanu.ac.ir Microprocessors Interfacing 8255 with ×8 decoder P0.7-P0.0 (AD7-AD0) D7-D0 /CS A0 A1 O0 O1 O7 A2 A1 A0 P2.7(A15) P2.6(A14) P2.5(A13) ALE /RD /WR /RD /WR

kashanu.ac.ir Microprocessors Usage: Simple Example  8255 memory mapped to 8051 at address C000H base  A = C000H, B = C001H, C = C002H, CR = C003H  Control word for all ports as outputs in mode0  CR : b = 80H test: mov A, #80H ; control word mov DPTR, #C003H ; address of CR A ; write control word mov A, #55h ; will try to write 55 and AA ; alternatively repeat:mov DPTR,#C000H ; address of PA A ; write 55H to PA inc DPTR ; now DPTR points to PB A ; write 55H to PB inc DPTR ; now DPTR points to PC A ; write 55H to PC cpl A ; toggle A (55  AA, AA  55) acall MY_DELAY ; small delay subroutine sjmp repeat ; for (1)