Multiplexing LED 7 Segment Displays
- Physical Connection -
- note error in graphic 2N2700 should
read 2N7000
- note; only use two seven segment
displays
- Check resistor size, 220 may be too
low, 1k will probably not be bright enough, remember each
display is only going 1/2 duty cycle.
- Explanation
- It is possible to drive multiple LED displays by connecting
the displays in parallel. In this case the displays are common
cathode. The number that you want to display on the particular
LED display is outputted to port B at the same time as the
transistor for that display is turned on. The number for the
next LED display is outputted to port B at the same time as the
transistor for that display is turned on and the other display
transistors are turned off.
- Timing
- As you can see each display is flashed off and on in
sequence to display the desired character on the correct LED.
The key to having all LED displays appear as if they are all on
is to "flash the displays at a rate higher that the visual
perception of the human eye. This rate falls between 15 to 50
Hz. depending on brightness and field of view. (some people
report perception of flicker at 60 Hz. which is why many
computer monitors now operate at a refresh frequency of 75
HZ.)
- Assignment
- Create a system which will count from 0 to 99 and repeat.
This will be displayed on both LED displays multiplex connected
to a pic 16f84A.
- Note - Do not use pin RA4 as an output in this assignment.
This output is of a type known a s 'open drain'. Go to section 4.1
in the spec sheet and discover the difference between the open
drain pin RA4 and the rest of the output pins. What is the
difference? What use could you envision for an open drain
output?
Technological Design Home
Items below this line are not required to complete this assignment.
- New Concepts
- Timer
- Interrupt Handling
- Reference : http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/06.htm#6.1
- An interupt is a series of instructions whic will be
executed whenever an interrupt occurs. When an interrupt
occurs the main program execution is suspended until the
processor services the interrupt routine. When the interrupt
routine is completed program execution returns to the main
program at the next instruction from where it was
interrupted.
- There are many types (causes) of interrupts
- Types (on pic16F84A)
- Timer
- Counter
- external on pin B(0)
- Change to PortB
- Other Types (available on models of microcontrollers
- pwm (pulse width modulation)
- analog to digital conversions
- USART - universal serial asynchronous reciever
transmitter
- Capture
- Compare
- Comparitor
- Implementing the Timer Interrupt
- Timer Config command - input the interrupt time
- Timer Start command
- (Global) Interrupt Enable must be implemented
- Structure of Program - some changes may
be neede here, check Mikrobasic information.