610 likes | 884 Views
Parallel Interfacing. Chapter 7. Parallel Interfacing. Parallel I/O Ports Using Parallel Ports Seven-Segment Displays Keypad Interfacing Liquid Crystal Displays Interrupt-Driven Traffic Lights. Port and Data Direction Registers. MC68HC711E9. PORTA. Parallel Interfacing.
E N D
Parallel Interfacing Chapter 7
Parallel Interfacing • Parallel I/O Ports • Using Parallel Ports • Seven-Segment Displays • Keypad Interfacing • Liquid Crystal Displays • Interrupt-Driven Traffic Lights
Parallel Interfacing • Parallel I/O Ports • Using Parallel Ports • Seven-Segment Displays • Keypad Interfacing • Liquid Crystal Displays • Interrupt-Driven Traffic Lights
Interfacing a switch input HEX F0 DDRH C! : ?open ( -- f ) 2 PORTH ?HI ;
Parallel Interfacing • Parallel I/O Ports • Using Parallel Ports • Seven-Segment Displays • Keypad Interfacing • Liquid Crystal Displays • Interrupt-Driven Traffic Lights
Common-Cathode Displays The MC14495-1 7 6 5 4 3 2 1 0 2 digits: PORTH: 0 0 LE1LE0 D C B A
Parallel Interfacing • Parallel I/O Ports • Using Parallel Ports • Seven-Segment Displays • Keypad Interfacing • Liquid Crystal Displays • Interrupt-Driven Traffic Lights
Scanning a 4 x 4 keypad : keypad ( -- n ) BEGIN ?keypad UNTIL ;
Axiom 4 x 4 Hex Keypad 1 2 3 4 Row Col 1 2 3 A 1K 4 PH0 4 5 6 B 3 PH1 7 8 9 C 2 PH2 * 0 # D 1 PH3 PH4 PH5 PH6 PH7
Displaying keys pressed on a 7-segment display : keypad ( -- n ) BEGIN ?keypad UNTIL ; : wait.for.keyup ( -- ) BEGIN ?keypad WHILE DROP REPEAT ; : main.keypad ( -- ) init.key BEGIN keypad .led wait.for.keyup AGAIN ;
Reading a keypad using the 74C922 16-Key Encoder
Interfacing a 16 x 1 hex keypad to a 68HC711E9 using a 74154
Parallel Interfacing • Parallel I/O Ports • Using Parallel Ports • Seven-Segment Displays • Keypad Interfacing • Liquid Crystal Displays • Interrupt-Driven Traffic Lights