Here is a small tool able to write symbols or pictures on a screen. As a graphic LCD was too expensive, the solution adopted was to pilot a matrix of Leds. This way, with only some cheap transistors, common red Leds and a 16F628, the project is made possible.
The program is very short. Basically, it
Reads the value of the pot. This will determine the speed of the picture change. The refresh of each picture is determined by small delays inside the ‘picture’ loop.
FREQ= POT V,64
IF FREQ<2 THEN FREQ=2
Reads data in a data file. Each data will trigger the appropriate LEDs of each column (+ of LEDS). PORTB decides which LED will be on.
HIGH L1:LOW PORTB
Scan all 6 columns by setting each appropriate line (and associated transistor) in order to trigger each row (- of LEDs) this is the way the LED matrix is multiplexed.
The pictures are stored in the AFF file. The structure of this file is easy to understand: Each data is the PORTB ‘BYTE’ which determines which LED of a specific LINE have to be ON. A loop will scan all 6 lines (by triggering appropriate pins of PORTA. PORTA will, in turn, command NPN transistors (here 2N2222 but nearly all common low signals NPN could be used). This is the way the multiplexing is implemented
Visit Here for more.