7 segment display help


New Member
i want to connect a seven segment display in my project.i am using key switch,buzzer and seven segment display with picaxe 18 .so please help build the project by telling me the program of how to connect seven segment display.


Senior Member
The program will be a matter of setting the right ouput pins high. The problem arises that not all displays have the same pinouts and thus you may have to experiment with your display.

One way is to make a lookup table:
LOOKUP digit,(one,two,three,four,five,six,seven,eight,nine,zero), display

let pins = display

The data stored in the lookup table will have to be set so that it will turn the correct segments on. This whould most likely be in binary form where a 1 will represent a segment which is on and a 0 will be a segment wich is off. Thus, the number 1 with two digits on will have two "1"s and six "0"s. And 8 will have seven "1"s and one "0".

Take a look at an old post:



Senior Member
Do you need to drive only one digit? If so, you can do that directly from the PICAXE - just each output pin to one pin of the LED, and make the pin high when you want to light up that pins segment.

If you need to use more than one digit, then you're going to need to use the PICAXE to send data to a driver chip which will then operate the LED's