Professional Documents
Culture Documents
Input: 0V =OFF, or 5V = ON = 5V
http://thelearningpit.com/lp/doc/7seg/7seg.html
Theory of LED dot matrix display
http://embedded-lab.com/blog/?p=2478
In a dot matrix display, multiple LEDs are wired together in rows and columns.
This is done to minimize the number of pins required to drive them.
For example, a 7×5 matrix of LEDs (shown below) would need 35 I/O pins, one for each LED pixel.
By wiring all the anodes together in rows (R1 through R7), and cathodes in columns (C1 through C5), the
required number of I/O pins is reduced to 12.
Each LED is addressed by its row and column number. In the figure below, if R4 is pulled high and C3 is
pulled low, the LED in fourth row and third column will be turned on.
Characters can be displayed by fast scanning of either rows or columns.
Interfacing Display to the Raspberry Pi:
Raspberry Pi GPIO current output
3mAmp
Display may requires up to
200-300mAmp.
ULN2003A
Current Driver from
3mAmp to 500mAmp. Raspberry
GPIO
GPIO
PIN Display
Scanning across the columns and
feeding with appropriate row values
For example: to Display ‘ A ‘ , see the
figures below.
5x7 Dot Matrix (LTP 747R)
Four Segments 5 x 7 Alphanumeric Displays
http://pdf1.alldatasheet.com/datasheet-pdf/view/64648/HP/HDLX-2416.html
Least Significant Digit
Most Significant Digit
LAB Exercises
Control
Lines
Data
Lines
Color
Lines
LCD-10862
Display the following text message "Welcome" on the first
line of Explorer 16 LCD and "COE 410" on the second line
import LCD
import Rpi.GPIO as GPIO
import time
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
# LCD Initialize Function
LCD.init()
while True:
LCD.prints("Welcome ",LCD.Line1)
time.sleep(1) # 1 second delay
LCD.clear_disp()
LCD.prints("COE 410 ",LCD.Line2)
time.sleep(1) # 1 second delay
LCD.clear_disp()
Interfacing Keypads
Keypad Interface
Keypad layout and Connection
Step 1. Understating the connection:
The figure below shows the layout of a 4x4 keypad and
the connection to Raspberry Pi GPIO in BCM Mode:
Step 2:
LAB Exercises