7 segment display

sgsstudent

New Member
Can anyone help with a simple program to count a 7 segment display from 0 to 9 when a switch is pressed?

We have found part of the circuit in manual 3 (interfacing circuits) on pages 20 - 22 but are having trouble figuring out how it connects to the Picaxe.

In the 'Introduction to the Picaxe' manual we are also very confused about tutorial 7.

This should be such a simple thing to do but we need help with the basic program and circuit.

Thanks

sgsstudent
 

craig008

New Member
which chips were u trying to use?? if it is the 4026b then try similar to this, just change it to fit what you have

main:
let b0 = 0 'set variable for count
if pin1 = 1 then counts 'cheack pin
goto main 'loop

counts:
let b0 = b0 + 1 'add one to variable
high 0 'send output high
low 0 'send output low
pause 500 'pause to see dispay
if b0 = 9 then main 'check count amount
goto counts

for the debug the icaxe has to stay connected to the PC throught the download cable, if you use the command debug without variable it will auto matically send all of the varible data back to the PC and display it in a pop up box that will dispay on ur screen after download
________
Smoke Kills
 
Last edited:

Mycroft2152

Senior Member
7 segment dsiplay drivers

If you are going to add another chip, consider one of the BCD to seven segment latch/drivers like the CD4511:

http://www.tranzistoare.ro/datasheets/150/109579_DS.pdf

These chips take a 4 bit input and converts it into the correct code to drive the 7 segment display. The BCD ( binary coded decimal) displays the numbers 10-15 as a letter code ABCDEF.

There is usually an ENABLE input that prevents the flickering ot the numbers when being updated.

Using a decoder chip can save a few bytes in programming.

Back in the early 1970's, long before PICAXE, I used the 4511 along with a 4510 (down counter) and a 555 timer to make a model rocket launch system. It is much easier to do today.

Mycroft2152
 
Top