18x and 2 - 3 dispaly 7 seg

giac77

New Member
Hello,
is the first time that I write on the forum and would like to ask you how to make a countdown with 2-3 display.
They told me that you can connect the display in parallel and use the anode common to see the figures after a delay of 10ms
I did not understand how to make the delay for show one display for time.
I have:
1 button for increases the time
1 button for decrease the time
1 button for start
I use the picaxe 18X
Do you have any ideas?
 

SilentScreamer

Senior Member
Welcome to the forum.

I don't claim this to be the most efficient method of doing this but to link the LED displays you will have to multiplex them. I have attached a schematic of how you could do this (I'll mention how to code it in a minute). I have only linked the LEDs on the schematic so you still need switches and everything else.

U4 is a 555 timer set-up as a NOT gate (see this page http://www.kpsec.freeuk.com/555timer.htm#buffer). It means that when the Output is low it will give out a high signal. So you can make pin7 high to use the first LED display and if you make pin7 low it will enable the second LED display.

To code it you will have to keep flashing the LEDs you want on very quickly so that they appear to be continually on.

You use pin 7 to select the LED display you are using.

The rest of the pins are used to select which LED within that display you wish to use. So all the pins are made high except the one you want to light which is low. This works are the output pins act as 0V when the are set to "low".

To make this work you will probably need to use the setfreq command, look in manual 2 BASIC commands. You can set it to m8 to make everything run twice as fast.
 

Attachments

hippy

Technical Support
Staff member
@ giac77: Welcome to the PICAXE Forum.

You really have three separate parts to your problem -

1) Interfacing to and driving a suitable display
2) Creating and controlling a software timer
3) Getting the timer data to the display

Multiplexing a display is one way to use a low(ish) number of control lines to handle a large number of displayed digits but it is quite complicated, especially if not using current limiting resistors and having to work within the I/O sink and source current ratings of the PICAXE.

I've been working on a 28/28X/28X1 direct-drive 8-digit 7-seg multiplexor but it still needs some work before publishing details. I also have the software designed for the same using just an 18X ( using charlieplexing rather than multiplexing ) but haven't tested the hardware.

There are other ways to drive multiple digit 7-segment displays and these have been discussed on the forum.

If this is your first PICAXE project it is an ambitious one. I would recommend getting more familiar with the PICAXE, its capabilities, and simple hardware interfacing first ( LED flasher, button handler ). Read the PICAXE Manuals, try things out, read the earlier forum posts and as you gain more practice and experience you can move up to more complicated projects.
 

giac77

New Member
I have read the PICAXE Manuals and I have try them: led flasher, push button for actions, readacd command. So, I use picaxe by some months but not find more schematics.
In the web it's possible to find schematics for pic 16F84.

This is a example:
Code:
symbol sec = b0
symbol cen = b1
symbol tempo = b2
symbol dcc = b3
let sec = 0
let cen = 0

main:
if pin1 = 1 then goto vai
if pin6 = 1 then goto alzacifra
goto main

alzacifra:
if sec > 9 then goto dieci
let sec = sec + 1
goto main

dieci:
let sec = 0
let cen = cen + 1
goto main


vai:
if cen = 0 then goto oltre
let dcc = cen*10
for tempo = dcc to 0 step -1
high 1
pause 500
low 1
pause 500
next tempo

oltre:
if sec = 0 then goto fine
for tempo = sec to 0 step -1
high 1
pause 500
low 1
pause 500
next tempo

fine:
high 2
pause 3000
low 2
goto main
It's correct for countdown ?
I don't understand how show the number on 7 seg ditig.

I should write the number:

let pins=%00000000
let pins=%00000001
...
let pins=%11111111

but, where i must insert the code ?
I'm sorry for my english. Thanks.
Giacomo
 

giac77

New Member
@ jglenn:

I bought and I used the display axe033. :)
Ask the timer with this display is really easy but I would create a timer with 7 segment display also it's more economic
 
Top