5x7 Display
INTRODUCTION
Sit back and take
a big breath. You are about to take part in one of the best microcomputer
(microprocessor) projects you have seen. It uses a PIC16F84 micro
and you will be shown how to program the chip to create quite amazing effects.
It's a simple project and you will be starting at the beginning of
programming, so don't worry if you have never worked with a microprocessor
before.
The project consists of 35 LEDs arranged as a 5x7 matrix. This may not seem
very impressive but you can display all sorts
of effects and treat it like a "window on a large video
screen."
The
project comes with a series of test programs to test the operation of the
screen and also the surrounding components. Then we come to the experiments. They
start with a simple routine to illuminate a single LED and progress to
flashing a LED, running a set of LEDs up and down the screen, and then a variety of animations. The
things you can do are almost unbelievable. And it's all covered in the
course.
The approach we have taken is completely different to anything you have seen
before.
The author has seen some of the other microcontroller projects and he has been
totally confused with their content and approach. They
were really impossible to understand. You needed to be an expert to start
the first lesson! That's why he felt compelled to create a project
that teaches in a completely different way.
Once you complete this course you will be able to look at the other projects
and work out what they are trying to present.
I'm saying this because if you have seen the other projects and given
up in frustration, the worry is over.
You can be assured, the animations you see on the screen in the "Screen Effects" page, are fully
documented and you will be able to create similar (and even better) effects.
This course has been written and designed by Colin Mitchell, the
author of Talking electronics.
Talking Electronics is Australia's most successful electronics publication
and been on the market for more than 20 years. It has been produced solely
by Colin Mitchell and has stood the test of time without a single advertisement
getting in the way of a good-quality construction article. Don't you hate
searching through a magazine for the articles? All our books and magazines
are ARTICLES ONLY and you don't finish up with 30 pages of projects out of a
150 page magazine!
Even though the projects presented by Talking Electronics have all been of a simple nature, every one has been described
in detail with special sections on "How it works" and "If it
doesn't work."
You can take an article and expand on it and create a more-complex project.
But this is only possible if you understand the fundamentals. That's what we
provide. The fundamentals. To back this up, TE produces kits for each and
every project and every PC board is available separately. All the kits are
sent out the same day and you don't have to wait weeks for something to arrive.
We waited 3 weeks for one of the competitors PIC kits and it came with NO PC
board and NO circuit diagram!
With TE kits, all you have to do is ring up and order the kit over the
phone and it will be sent THE SAME DAY. For a few dollars extra it will be
sent EXPRESS and you are ready to start THE NEXT DAY. We have sent out
over 200,000 kits so we must be doing something right! Some readers have
bought over $350 worth of kits and when we meet them at seminars and trade
shows, they say they owe their advancement in electronics to Talking
Electronics.
This is the biggest compliment we can get and that's why we continue to
provide information-basics. This is the one area that has been so neglected.
And that's where we excel.
MORE
INTRO . . .
The common thread of all magazine articles is to describe a project and assume
it will work first go.
Not so with us. The author has fixed more than 35,000 television sets and designed hundreds
of projects and he knows this is not the case. It's only wishful thinking . . .
to think a project will work the first time.
The author is a realist. He knows a project may take a few
inspections and corrections before it works, so why not cover these facets
in the instructions?
Also, why not explain every new term as it is introduced? Not everyone knows
every electronic term and if too much complexity comes into a project, the
constructor gives up in frustration. See the list of over 100 Circuit
Symbols
HERE.
All Talking Electronics projects are presented in a simple, understandable
way and that's why they have been so successful.
This project is no exception. It covers everything in the smallest detail.
That's why we say, sit back and take a deep breath, you have found what you
have been looking for . . . a microcontroller course that teaches you how to
program.
The animation above
shows just one of the things that can be done with the
5x7 Display. It's a
miniature Video Wall and as such you can do ALMOST anything on it. Any
picture, pattern, animation or effect can be displayed. Once you see how a program is written, you can produce frames
for an animation, just like
producing a cartoon.
The display above is called the LIFT DISPLAY. It can be used in an elevator to
show the progress from one level to the next and it shows the lift is
travelling up or down.
The next closest thing to our display is an
8x8 LED matrix module. These are readily available in a single colour
(red, green, yellow) or tri-colour, and you can use one of them if you
wish. But they require a little more programming - not much more but
it is certainly the next thing to go to after completing the course.
An 8x8 requires 16 lines in the form of 8 lines from a microcontroller
and 8 lines from a shift register.
With an 8x8 matrix, the on-time for each row is slightly less than our
matrix and to produce a brightness equivalent to our matrix, the LEDs have
to be scanned with a higher drive-current. This requires drive transistors
for the rows as well as the columns.
This is about the only difference and one of our future projects will show
how the modules are connected together.
Back to our project . . .
With our design, the scan is only 5 columns and this gives the LEDs sufficient
brightness from the allowable 25mA from the micro. In one of the experiments you will "dumping onto the screen" as
well as scanning. You will be able to see the difference in brightness of the
two modes, and when you realise the energy delivered to a scanned LED is less
than one fifth of a LED that is being constantly turned on, you will see how
efficient LEDs are with pulses of energy.
What can you do with the project?
You can do an endless number of things. You can produce counters, effects,
tones, games, tunes animations, scrolling letters, flashing letters and lots of other things. It's almost
unlimited. Below is a simple 0 to 9 counter. You can make it count up
or down, turn it into a two-digit counter or even a three-digit
counter with each digit flashing, to show the tally. We have even
produced a 5-digit counter to show how far you can go with simple
programming.
Even though this project is designed as a beginners guide to programming,
the variety of effects that can be produced can extend to quite complex
programs and once you complete the course, you will feel like an
expert!
On the "Screen Effects" page we have shown some of the capabilities of the
project. It can be used as a stand-alone
module to produce any effect you need (the effects can be controlled by input
lines). Devices such as switches can be placed on the input lines to increment
or decrement the display, produce the "lift effect," flash
numbers or letters or even produce a scrolling effect.
ABOUT
THE PROJECT
The 5x7 Display project consists of a small PC board containing 35 LEDs
arranged in a matrix of 5 rows of LEDs with each row containing 7 LEDs. The
PC board also contains a PIC16F84 microcontroller chip and this 18-pin chip has 13
pins (lines) that can be configured as input or output.
Five of the lines are called port "A" and these are connected to three switches and
also the second chip on the board (a shift-counter chip). The other 8 lines (called port B )
are connected to the seven rows of LEDs and the eighth line is connected to
a piezo diaphragm for PIEZO (sound) experiments.
Five transistors sink the cathodes of the five columns of LEDs and
another transistor drives the piezo diaphragm.
Resistors on the board limit the current to the LEDs to prevent damage to
the microcontroller as each output of the chip can deliver a maximum of 25
milliamps. A capacitor and resistor near the chip creates the R-C timing for
the oscillator (the chip contains the rest of the components for the
oscillator).
A power supply electrolytic, voltage-dropping diode and two slide switches
complete the components for the 5x7 part of the project.
Also contained on the board are the components for the In-Circuit
Programmer. These components connect the serial port of a computer to
the microcontroller chip. The components pass the programming signals to
the chip and at the same time the voltages are modified so that they are
at the correct levels for the chip. The components also generate
voltages for the chip - a 5v rail and a 13v rail. Finally, the set of
components around pin 12 amplify the current so that pin 12 will see a
HIGH.
The 5x7 project is connected to your computer via a 4-core cable and
this connects to a 9-pin plug to fit into the serial port of a
computer.
The end result is the microcontroller chip (PIC16F84) can be programmed without
removing it from the board. This is called "IN CIRCUIT"
programming and is very fast and convenient when you are developing a program.
POV -Persistence
Of Vision
There is a surprising feature with a Light Emitting Diode. If it is pulsed with
twice the normal current for 20% of the time, the result is almost as bright as
if it is on all the time with the rated current.
This means they perform extremely effectively in a scanned situation and even
though the net energy into each LED is only about 10% as compared with ON all
the time, the
brightness level is only reduced by about 50%. Surprisingly, a 50%
reduction in brightness is quite acceptable.
This is one of the features of a scanned display.
Before we go any further, let's talk about the the concept of a scanning display.
From the outset, you have to be aware that he image seen on this type of display
is a "trick." Only one column of LEDs is displayed at a time and your
eye merges the columns together to get a "picture."
This is called Persistence of Vision (POV) and occurs when the eye sees
objects that change at a rate higher than about 10 per second. A flickering
effect is detected at a rate up to about 20 per second but above 30 per second
the effect is quite smooth.
Our display operates at a rate higher than 100 scans per second and the eye sees
the display as "steady." If the scan rate is reduced (by
reducing the frequency of the micro-controller clock) the individual columns can
be seen. This is quite a fascinating feature to observe as it shows you have
been "tricked" all along!
The diagram above shows the 5x7 Display connected
to the COM port of a computer.
The PIC chip on the 5x7 Display project can be programmed directly
from the COM port if the voltages are correct.
Unfortunately the 4 COM ports we tried did not deliver the required 12v
- 13v (the voltage on one was 10v and 17v volts on another!) and so the
voltage on two lines has to be combined and added together. This makes the
project a little more complex to understand.
SUMMARY This
project is designed to get you into programming the PIC16F84 microcontroller,
in the simplest and best way. Data Sheets for the chip can be
found
HERE.
|
Go to:
Construction
|