ECE 447 Fall 2009

25
ECE 447 Fall 2009 Lecture 6: TI MSP430 IO Interfacing

description

ECE 447 Fall 2009. Lecture 6: TI MSP430 IO Interfacing. Agenda. Internal/External Resistors LEDs Switch Debouncing Buffers Port Multiplexing. ECE 447: MSP430 Current Limits. V DD = 3 V. Maximum sink current. V OHmin = 2.4 V. I OLmax = 40 mA. Maximum source current. - PowerPoint PPT Presentation

Transcript of ECE 447 Fall 2009

Page 1: ECE 447 Fall 2009

ECE 447 Fall 2009

Lecture 6: TI MSP430

IO Interfacing

Page 2: ECE 447 Fall 2009

Agenda

• Internal/External Resistors

• LEDs

• Switch Debouncing

• Buffers

• Port Multiplexing

Page 3: ECE 447 Fall 2009

ECE 447: MSP430 Current Limits

GND=0 V

VDD= 3 V

Maximum sink current

IOLmax = 40 mA

VOLmax= 0.6 V

VOHmin= 2.4 V

Maximum source current

IOHmax= 40 mA

Page 4: ECE 447 Fall 2009

Internal Pull Up Resistor

Page 5: ECE 447 Fall 2009

ECE 447: Light Emitting Diode (LED)

IF

Forward current Forward voltage

VF

Typical values for common LEDs

IF = 10-20 mAVF = 1.7-2.4 V

+

Page 6: ECE 447 Fall 2009

ECE 447: LED

Page 7: ECE 447 Fall 2009

ECE 447: LED Interfacing

VDD=3 V

I ≈ IF

Forward current

Forward voltageVF

VOL

buffer

Low Level Output Voltage

IOLLow Level Output Current (sink current)

R=?

R ≈ (VDD – VF – VOL) / IF

I ≈ IF IOLmax

VOL

VDD – VF – VOL

Page 8: ECE 447 Fall 2009

ECE 447: LED Interfacing

VDD=3 V

I ≈ IF

Forward current

Forward voltageVF

VCE Collector-Emitter Voltage

ICE Collector-Emitter Current

R1=?

R1 ≈ (VDD – VF – VCE) / IF

R2 (VOH – VBE) / IOHmax

R2=?

VBE

Base-Emitter Voltage

VDD – VF – VCE

I ≈ IF ICEmax IOH IOHmax

Page 9: ECE 447 Fall 2009

ECE 447: MAN-72: 7-Segment LED

Page 10: ECE 447 Fall 2009

ECE 447: Single Switch/Push Button

Page 11: ECE 447 Fall 2009

ECE 447: Switch Key Bouncing

key bounce, tBOUNCE

typically, tBOUNCE < 10 ms

key bounce, tBOUNCE

Page 12: ECE 447 Fall 2009

ECE 447: Key Debounce in Software

key bounce, tBOUNCE

typically, tBOUNCE < 10 ms

debouncing delay debouncing delay

key bounce, tBOUNCE

update display

Page 13: ECE 447 Fall 2009

ECE 447: Key Debounce in Hardware

Page 14: ECE 447 Fall 2009

Schmidt Trigger Debounce

Page 15: ECE 447 Fall 2009

Schmidt Trigger Performance

Page 16: ECE 447 Fall 2009

MSP430 and Compatible Logic Devices

• HCT Family– Uses CMOS technology but TTL (Transistor-

transistor logic) input logic levels – Slower performance than HC, replaces TTL

• HC Family – High performance CMOS Logic chips– Combines strengths of TTL with CMOS– Can operate at lower voltages (i.e. 3V)

74HC245DIROE

Data In

Data Out

Page 17: ECE 447 Fall 2009

ECE 447: Octal Buffer 74HC245

Note: All 8 outputs controlled by one enable, OE

Page 18: ECE 447 Fall 2009

ECE 447: Octal Buffer 74HC244

Note: Outputs controlled by two enables, 1OE & 2OE (1OE controls 1A0-1A3, 2OE controls 2A0-2A3)

Page 19: ECE 447 Fall 2009

ECE447: Latches 74HC373

Page 20: ECE 447 Fall 2009

ECE447: Registers 74HC374

Page 21: ECE 447 Fall 2009

ECE 447: Port Multiplexing

• Allow multiple devices to share the input and output ports of the microcontroller.

• Additional hardware typically needed to support connection and selection of peripheral devices.

• Software typically selects the peripheral devices using additional output pins.

• Some I/O devices have built-in enable signals.

Page 22: ECE 447 Fall 2009

ECE 447: Port Multiplexing

Port 2Port 1

I/O device 1

74HC245DIROE

I/O device 8

74HC245DIROE. . . . . . .

. . . . . . .

. . . . .

MSP430

Page 23: ECE 447 Fall 2009

ECE 447: Port Multiplexing

Port 2Port 1

I/O device 1(e.g., LCD display)

I/O device 2(e.g., keypad)

74HC245 74HC244DIROE 1G

8

2G

MSP430

Page 24: ECE 447 Fall 2009

Port 2Port 1

I/O device 1(e.g., LCD display)

I/O device 2(e.g., 7 segment

display)

74HC245 74HC373DIROE OE

8

CP

MSP430

ECE 447: Port Multiplexing

Page 25: ECE 447 Fall 2009

Summary

• Internal/External Resistors

• LEDs

• Switch Debouncing

• Buffers

• Port Multiplexing