Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

Fancy LEDs

Fancy LEDs

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
PORTB=LREAD AFFI+(IMG*6)
DELAYMS ps

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.

 

More Articles to Read

Bookcase automatically opens to reveal secret lair
Bookcase automatically opens to reveal secret lair
PCI Express High Performance Reference Design
PCI Express High Performance Reference Design
Muxtronics open source 12V powerbank
Muxtronics open source 12V powerbank
TI’s Little Professor
TI’s Little Professor
App note: Testing inductors at application frequencies
App note: Testing inductors at application frequencies
1968 Princeton Reverb Repairs
1968 Princeton Reverb Repairs
Skill Sunday: Power Over Ethernet for Arduino
Skill Sunday: Power Over Ethernet for Arduino
More on Color TFT Displays ~ The Big Ones — 240 X 320
More on Color TFT Displays ~ The Big Ones — 240 X 320
Magnetic Rotary Encoder
Magnetic Rotary Encoder
Vertical Pole Climbing Robot
Vertical Pole Climbing Robot

Top




Shares