The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs –...

36
The Datasheet and Interfacing EE3376

Transcript of The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs –...

Page 1: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

The Datasheet and Interfacing

EE3376

Page 2: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

MSP430 Datasheet

Page 3: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Modes of the MSP430

0 0 0 0 250uA 0 0 0 1 35 uA

1   1 0 1 1 uA 1 1 1 1 .1 uA

Active Mode (this class) LPM0 (CPU asleep) LPM3 (only ACLK on) LPM4 (sleep mode)

Page 4: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Clocks of the MSP430

Page 5: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

DC Power Specs of the MSP430

Page 6: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

DC Specs for MSP430

Page 7: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Input DC Specs of the MSP430

Page 8: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Output DC Specs of the MSP430

Page 9: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

AC Specs of the HCS12 (I2C example)

Page 10: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Sensors / Transducers

l  Convert physical quantity into electrical voltage (analog) –  temperature –  position –  pressure –  flow –  humidity –  velocity –  acceleration –  rotation –  light –  smoke –  motion detection

Page 11: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Thermistors / Thermocouples l  Convert temperature into electrical voltage (analog)

–  Thermistor – some material’s resistance change with temperature

–  Thermocouple - two different metals are spot welded together causing a voltage between them proportional to temperature

Page 12: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Pressure Sensors

Example: Honeywell 40PC Series These miniature pressure sensors are fully compensated and amplified. The 0.5 V to 4.5 V analog output voltage signal is linearly proportional to input pressure. These devices operate on a single end supply voltage of 5.0 Vdc.

Page 13: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Dipswitches and Push Buttons

ph0 ph1 ph2 ph3 ph4 ph5 ph6 ph7

HCS12

4.7k ohms

100k ohms

Page 14: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Rotary Encoders

Amount of rotation translated into 3 bit number

Page 15: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Keypads

pa0 pa1 pa2 pa3 pa4 pa5 pa6 pa7

optional external keypad

HCS12

J29

Page 16: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Actuators l  Convert electric voltages into physical quantities

–  heaters –  micro-propulsion (ink jet) –  displacement –  pumps –  valves –  LEDs –  gauges –  motors

l  DC Motors (PWM) l  Servo Motors (PWM) l  Stepper Motors (GPIO)

Page 17: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Solenoids and Relays l  Use electromagnet to control large mechanical plunger l  Used to allow a small current to control a large current

Page 18: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Relays l  One signal (small) controls another signal (large) l  Either Electromagnetic or Solid State (no moving parts)

–  Solid State more reliable and faster –  Mechanical – possible more current handling capability

l  Number of Poles describes number of switches controlled –  Single Pole – one switch –  Double Pole – two switches –  Triple Pole – three switches

l  Number of Throws describes number of contacts per switch –  Single Throw – two contacts either opened or shorted –  Double Throw – three contacts with one common

Page 19: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Relays – Single Pole / Single Throw Normally Open

Page 20: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Relays – Single Pole / Single Throw Normally Closed

Page 21: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Relays – Single Pole / Double Throw

Page 22: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Relays – Double Pole / Single Throw Normally Closed

Page 23: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Relays / Buffers / Tristates / Line Drivers

l  Integrated circuits that can be used to re-drive signals l  driving different voltages (0-5V TTL to 0-12V RS232) l  adding tristate capability (e.g. multi-master access)

Page 24: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Transceivers

l  Chips for comm –  Ethernet –  RS232 –  Wireless RF –  Modem

Page 25: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Displays l  Actuator (output) for human interface

–  can be as simple as several BCD digits with 7 segment display l  to display temperature l  to display velocity

–  can be rows of ASCII encoded characters (LCD) l  LCD with integrated controller

–  sends data either serially or in parallel l  to display more sophisticated message to user

–  “divide by 0” –  “pump backflow” –  “completed successfully”

–  can be flat panel screen with 16 bit color (320x240 TFT LCD) l  to display video l  to provide a graphical user interface

Page 26: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

7 segment display

pb0 pb1 pb2 pb3 pb4 pb5 pb6 pb7 pp0 pp1 pp2 pp3

HCS12

4 7-segment display

sega segb sebc segd sege segf segg segh

b a

c d

e f g

Page 27: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Hantronix on the Dragon Board

pk0 pk1 pk2 pk3 pk4 pk5 pk6 pk7

HCS12

Hantronix 16 x 2 LCD

4

RS EN

Data

RW

l  RS – selects between commands and data l  EN – Falling edge causes data to be sampled l  RW – selects between reading and writing (we always read) l  Data – 8 bits (of which we use 4 in the launch pad board)

Page 28: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Hantronix on the Dragon Board

Page 29: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Hantronix Timing

Tied Low

PK0

PK1

PK2-5

Page 30: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Hantronix Timing

Page 31: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Motors l  Check out On-Line Tutorials

–  Motorola –  Electronics Information Online (www.eoi.com)

l  All but the smallest can not be driven by MSP430 –  MSP430 IO can only drive ~50 mA, most motors draw 100 mA –  Motors are inductive

l  current can not be immediately stopped l  possible to generate back EMF – similar to spark plug (unintentional)

–  Must be driven by H-Bridge Circuit l  DC Motors l  Servo Motors l  Stepper Motors l  AC Motors (not usually used with microcontrollers)

Page 32: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

DC Motors l  Can not be driven by HCS12

–  Must be driven by H-Bridge Circuit l  Speed is dependent on load

–  Must have feedback control l  Controlled by PWM

–  duty cycle is proportional to speed

Page 33: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Servo Motors

l  DC Motor integrated with feedback circuit l  Typically 180 degrees of rotation – turn stop l  Precise l  Applications:

–  Robotics l  arm movement l  clamp

–  Camera / Telescope tilt –  Rudder for remote control boat

l  Controlled by PWM at 60 Hz

Page 34: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Stepper Motors

l  Can not be driven by HCS12 l  Precise Rotation Control l  Speed is not dependent on load

–  does not require feedback control –  assuming no slipping

l  Controlled by digital sequence

Page 35: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

Steppers - Half Step Phase Sequencing

Page 36: The Datasheet and Interfacing - UTEP · The Datasheet and Interfacing EE3376 . ... – LEDs – gauges – ... ee3376-datasheet_interfacing.ppt Author: Eric MacDonald Created Date:

H-Bridge Circuit for driving Motors