Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE 447: Lecture 6 Input/Output Interfacing LEDs, Button Switches & Port Multiplexing.

Similar presentations


Presentation on theme: "ECE 447: Lecture 6 Input/Output Interfacing LEDs, Button Switches & Port Multiplexing."— Presentation transcript:

1 ECE 447: Lecture 6 Input/Output Interfacing LEDs, Button Switches & Port Multiplexing

2 ECE 447: 68HC11 Current Limits GND=0 V V DD =5 V Maximum sink current I OLmax = 1.6 mA V OLmax = 0.4 V V OHmin =4.5 V Maximum source current I OHmax = 0.8 mA Sufficient to drive one input of a TTL device and about 10 inputs of an LSTTL device

3 ECE 447: Light Emitting Diode (LED) IFIF Forward current Forward voltage VFVF Typical values for common LEDs I F = 10-20 mA V F = 1.7-2.4 V + –

4 ECE 447: LED Interfacing V DD =5 V I ≈ I F Forward current Forward voltageVFVF V OL buffer Low Level Output Voltage I OL Low Level Output Current (sink current) R=? R ≈ (V DD – V F – V OL ) / I F I ≈ I F  I OLmax V OL V DD – V F – V OL

5 ECE 447: LED Interfacing V DD =5 V I ≈ I F Forward current Forward voltage VFVF V CE Collector-Emitter Voltage I CE Collector-Emitter Current R 1 =? R 1 ≈ (V DD – V F – V CE ) / I F R 2  (V OH – V BE ) / I OHmax R 2 =? V BE Base-Emitter Voltage V DD – V F – V CE I ≈ I F  I CEmax I OH  I OHmax

6 ECE 447: MAN-72: 7-Segment LED

7 ECE 447: LED

8 ECE 447: Single Switch/Push Button

9 ECE 447: Switch Key Bouncing key bounce, t BOUNCE typically, t BOUNCE < 10 ms key bounce, t BOUNCE

10 ECE 447: Key Debounce in Software key bounce, t BOUNCE typically, t BOUNCE < 10 ms debouncing delay key bounce, t BOUNCE update display

11 ECE 447: Key Debounce in Hardware

12 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.

13 ECE 447: Port Multiplexing Port C Port B I/O device 1 74LS245 DIR OE I/O device 8 74LS245 DIR OE............ MC68HC11

14 ECE 447: Port Multiplexing Port C Port B I/O device 1 (e.g., LCD display) I/O device 2 (e.g., keypad) 74LS24574LS244 DIR OE 1G 8 2G MC68HC11

15 ECE 447: Octal Buffer 74LS245 Note: All 8 outputs controlled by one enable, OE

16 ECE 447: Octal Buffer 74LS244 Note: Outputs controlled by two enables, 1G & 2G (1G controls 1A1-1A4, 2G controls 2A1-2A4)


Download ppt "ECE 447: Lecture 6 Input/Output Interfacing LEDs, Button Switches & Port Multiplexing."

Similar presentations


Ads by Google