ECE 447 Fall 2009
-
Upload
driscoll-roman -
Category
Documents
-
view
26 -
download
0
description
Transcript of ECE 447 Fall 2009
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
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
Internal Pull Up Resistor
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
+
–
ECE 447: LED
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
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
ECE 447: MAN-72: 7-Segment LED
ECE 447: Single Switch/Push Button
ECE 447: Switch Key Bouncing
key bounce, tBOUNCE
typically, tBOUNCE < 10 ms
key bounce, tBOUNCE
ECE 447: Key Debounce in Software
key bounce, tBOUNCE
typically, tBOUNCE < 10 ms
debouncing delay debouncing delay
key bounce, tBOUNCE
update display
ECE 447: Key Debounce in Hardware
Schmidt Trigger Debounce
Schmidt Trigger Performance
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
ECE 447: Octal Buffer 74HC245
Note: All 8 outputs controlled by one enable, OE
ECE 447: Octal Buffer 74HC244
Note: Outputs controlled by two enables, 1OE & 2OE (1OE controls 1A0-1A3, 2OE controls 2A0-2A3)
ECE447: Latches 74HC373
ECE447: Registers 74HC374
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.
ECE 447: Port Multiplexing
Port 2Port 1
I/O device 1
74HC245DIROE
I/O device 8
74HC245DIROE. . . . . . .
. . . . . . .
. . . . .
MSP430
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
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
Summary
• Internal/External Resistors
• LEDs
• Switch Debouncing
• Buffers
• Port Multiplexing