Download ECE 447 Fall 2009

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
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
VDD= 3 V
Maximum sink current
VOHmin= 2.4 V
IOLmax = 40 mA
Maximum source current
IOHmax= 40 mA
VOLmax= 0.6 V
GND=0 V
Internal Pull Up Resistor
ECE 447: Light Emitting Diode (LED)
+
Forward current
Forward voltage
IF
VF
–
Typical values for common LEDs
IF = 10-20 mA
VF = 1.7-2.4 V
ECE 447: LED
ECE 447: LED Interfacing
VDD=3 V
R=?
VDD – VF – VOL
Forward current
I ≈ IF
VF Forward voltage
VOL Low Level Output Voltage
VOL
buffer
IOL Low Level Output Current
(sink current)
I ≈ IF  IOLmax
R ≈ (VDD – VF – VOL) / IF
ECE 447: LED Interfacing
VDD=3 V
R1=?
VDD – VF – VCE
Forward current
I ≈ IF
R2=?
VBE
Base-Emitter
Voltage
VF Forward voltage
VCE Collector-Emitter Voltage
ICE Collector-Emitter Current
I ≈ IF  ICEmax
IOH  IOHmax
R1 ≈ (VDD – VF – VCE) / IF
R2  (VOH – VBE) / IOHmax
ECE 447: MAN-72: 7-Segment LED
ECE 447: Single Switch/Push Button
ECE 447: Switch Key Bouncing
key bounce, tBOUNCE
key bounce, tBOUNCE
typically, tBOUNCE < 10 ms
ECE 447: Key Debounce in Software
key bounce, tBOUNCE
key bounce, tBOUNCE
typically, tBOUNCE < 10 ms
debouncing delay
update display
debouncing delay
ECE 447: Key Debounce in Hardware
Schmidt Trigger Debounce
Schmidt Trigger Performance
MSP430 and Compatible Logic Devices
• HCT Family
– Uses CMOS technology but TTL (Transistortransistor 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)
Data In
OE
DIR
74HC245
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
MSP430
Port 1
.....
OE
DIR
74HC245
I/O device 1
Port 2
. . . . . . .
. . . . . . .
OE
DIR
74HC245
I/O device 8
ECE 447: Port Multiplexing
MSP430
Port 1
Port 2
8
OE
DIR 74HC245
I/O device 1
(e.g., LCD display)
1G 2G
74HC244
I/O device 2
(e.g., keypad)
ECE 447: Port Multiplexing
MSP430
Port 1
Port 2
8
OE
DIR 74HC245
I/O device 1
(e.g., LCD display)
OE CP
74HC373
I/O device 2
(e.g., 7 segment
display)
Summary
•
•
•
•
•
Internal/External Resistors
LEDs
Switch Debouncing
Buffers
Port Multiplexing
Related documents