CH 4. Standard Single Purpose Processors: Peripherals: Part E: Display & Keyboard Interface
CH 4. Standard Single Purpose Processors: Peripherals: Part E: Display & Keyboard Interface
Three-position switch
Common, Normally open, Normally closed.
Algorithm
Make
M k PA2-0
PA2 0 output andd PA6-3
PA6 3 as input
i
Force PA2-0 low and read to x.
Make PA6
PA6-33 output and PA2
PA2-0
0 input
Force PA6-3 low and read to y.
Combine x and y into one byte. The
result is the same code as the table in
slide 9.
N1
N2
N3 k_pressed
N4
M1
M2
M3
M4 4
key_code key_code
keypad controller
N=4, M=4
Embedded Systems, KAIST 12
4.42 Touchscreen
Includes input and output device.
Input device is a two-dimensional voltmeter:
ADC
voltage
l
Types
Common anode ->
Common cathode
Ghost elimination
Place turn-on and turn-off side by side after the move
(Include red lines as above).
CODES RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 Description
I/D = 1 cursor moves left DL = 1 8-bit
0 0 0 0 0 0 0 0 0 1 Clears all display, return cursor home
I/D = 0 cursor moves right DL = 0 4-bit
S = 1 with display shift N = 1 2 rows 0 0 0 0 0 0 0 0 1 * Rt
Returns cursor home
h
S/C =1 display shift N = 0 1 row
Sets cursor move direction and/or
0 0 0 0 0 0 0 1 I/D S
S/C = 0 cursor movement F = 1 5x10 dots specifies not to shift display
R/L = 1 shift to right F = 0 5x7 dots ON/OFF of all display(D), cursor
0 0 0 0 0 0 1 D C B
ON/OFF (C), and blink position (B)
R/L = 0 shift to left
0 0 0 0 0 1 S/C R/L * * Move cursor and shifts display