university of tehran 1 microprocessor system design io applications omid fatemi ([email protected])

41
University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi ([email protected])

Upload: herbert-rose

Post on 02-Jan-2016

230 views

Category:

Documents


1 download

TRANSCRIPT

University of Tehran 1

Microprocessor System DesignIO Applications

Omid Fatemi

([email protected])

University of Tehran 2

Outline

• LCD

• Stepper motor

• ADC and DAC

• Sensors

• PC parallel port

University of Tehran 3

New LCDs Interfacing

• Lower prices

• Display numbers, characters, graphics

• Integrated refreshing controller

• Ease of programming

University of Tehran 4

Pin Description

University of Tehran 5

Command Codes

University of Tehran 6

Example

University of Tehran 7

Programming LCD - Example

University of Tehran 8

Sending Data

University of Tehran 9

LCD Addressing

University of Tehran 10

LCD Timing

University of Tehran 11

LCD Instructions

University of Tehran 12

Stepper Motors

• more accurately controlled than a normal

motor allowing fractional turns or n

revolutions to be easily done

• 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

University of Tehran 13

Stepper Motor Diagram

University of Tehran 14

Stepper Motor Step Angles

University of Tehran 15

Terminology

• Steps per second, RPM

– SPS = (RPM * SPR) /60

• Number of teeth

• 4-step, wave drive 4-step, 8-step

• Motor speed (SPS)

• Holding torque

University of Tehran 16

Stepper Motor Types

– Variable Reluctance

– Permanent Magnet

University of Tehran 17

Variable Reluctance Motors

University of Tehran 18

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 30o motor

• The rotor has 4 poles and the stator has 6 poles

• Example

University of Tehran 19

Variable Reluctance Motors

• To rotate we excite the 3 windings in sequence– W1 - 1001001001001001001001001 – W2 - 0100100100100100100100100 – W3 - 0010010010010010010010010

• This gives two full revolutions

University of Tehran 20

Unipolar Motors

University of Tehran 21

Unipolar Motors

• To rotate we excite the 2 windings in sequence– W1a - 1000100010001000100010001 – W1b - 0010001000100010001000100 – W2a - 0100010001000100010001000– W2b - 0001000100010001000100010

• This gives two full revolutions

University of Tehran 22

Basic Actuation Wave Forms

University of Tehran 23

Unipolar Motors

• To rotate we excite the 2 windings in sequence– W1a - 1100110011001100110011001 – W1b - 0011001100110011001100110 – W2a - 0110011001100110011001100 – W2b - 1001100110011001100110011

• This gives two full revolutions at 1.4 times greater torque but twice the power

University of Tehran 24

Enhanced Waveforms

• better torque

• more precise control

University of Tehran 25

Unipolar Motors

• The two sequences are not the same, so by combining the two you can produce half stepping– W1a - 11000001110000011100000111 – W1b - 00011100000111000001110000 – W2a - 01110000011100000111000001 – W2b - 00000111000001110000011100

University of Tehran 26

Motor Control Circuits

• For low current options the ULN200x family of Darlington Arrays will drive the windings direct.

University of Tehran 27

Interfacing to Stepper Motors

University of Tehran 28

Vector Generation

• Hardware solutions– Logic design

– State machine

• Software solutions– Microprocessor and output ports

– timing

University of Tehran 29

Example

University of Tehran 30

Digital to Analog Converter

University of Tehran 31

Example – Step Ramp

University of Tehran 32

Analog to Digital

University of Tehran 33

Vin Range

University of Tehran 34

Timing

University of Tehran 35

Interfacing ADC

University of Tehran 36

Example

University of Tehran 37

Temperature Sensor

University of Tehran 38

Printer Connection

University of Tehran 39

IO Base Address for LPT

University of Tehran 40

Printer’s Ports

University of Tehran 41

Selected Problems (Ch. 4)