Top Banner
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])

Jan 02, 2016

Download

Documents

Herbert Rose
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 1

Microprocessor System DesignIO Applications

Omid Fatemi

([email protected])

Page 2: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 2

Outline

• LCD

• Stepper motor

• ADC and DAC

• Sensors

• PC parallel port

Page 3: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 3

New LCDs Interfacing

• Lower prices

• Display numbers, characters, graphics

• Integrated refreshing controller

• Ease of programming

Page 4: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 4

Pin Description

Page 5: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 5

Command Codes

Page 6: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 6

Example

Page 7: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 7

Programming LCD - Example

Page 8: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 8

Sending Data

Page 9: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 9

LCD Addressing

Page 10: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 10

LCD Timing

Page 11: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 11

LCD Instructions

Page 12: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

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

Page 13: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 13

Stepper Motor Diagram

Page 14: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 14

Stepper Motor Step Angles

Page 15: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

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

Page 16: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 16

Stepper Motor Types

– Variable Reluctance

– Permanent Magnet

Page 17: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 17

Variable Reluctance Motors

Page 18: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

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

Page 19: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

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

Page 20: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 20

Unipolar Motors

Page 21: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

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

Page 22: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 22

Basic Actuation Wave Forms

Page 23: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

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

Page 24: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 24

Enhanced Waveforms

• better torque

• more precise control

Page 25: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

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

Page 26: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 26

Motor Control Circuits

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

Page 27: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 27

Interfacing to Stepper Motors

Page 28: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 28

Vector Generation

• Hardware solutions– Logic design

– State machine

• Software solutions– Microprocessor and output ports

– timing

Page 29: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 29

Example

Page 30: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 30

Digital to Analog Converter

Page 31: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 31

Example – Step Ramp

Page 32: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 32

Analog to Digital

Page 33: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 33

Vin Range

Page 34: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 34

Timing

Page 35: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 35

Interfacing ADC

Page 36: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 36

Example

Page 37: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 37

Temperature Sensor

Page 38: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 38

Printer Connection

Page 39: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 39

IO Base Address for LPT

Page 40: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 40

Printer’s Ports

Page 41: University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi (omid@fatemi.net)

University of Tehran 41

Selected Problems (Ch. 4)