Binary to Numbers on 7 segs?

Bill Jones

New Member
Hi,

I'm currently finding difficulties whilst writing a program.

I need to convert Binary digits into actual numbers on 2 seven seg displays.

Any tips?

Thanks,
Bill
 

westaust55

Moderator
Within the PICAXE, numbers are all threaded as binary irrespective of how we users notate them for ease of our understanding.
So binary %00110010 = hex $32 = decimal 50.

Exactly how do you need help?
Which PICAXE chip are you (going to) use?
How are the 7-seg displays connected?
Mtiplexed direct from PICAXE, driven via some other chip (which)?

The simplest scheme will be to take your number, break into the digits a high nybble (4-bits) and a low nybble then use a lookup table (see lookup command) to obtain the code to drive a digit of the 7-seg display
 

AllyCat

Senior Member
Hi Bill,

Welcome to the forum. Do you mean you wish to display a byte using Hexadecimal Characters on two seven-segment displays?

In princple, you can split the byte into nybbles with (e.g.) Let b2 = b1 / 16 and Let b3 = b1 // 16. Then you need to add 6 further "segment maps" into the LOOKUP list for the characters A, B, C, D, E and F. B and D need to displayed "lower case", i.e. b is a '6' with the top bar missing.

If you want/need to use a "decoder", you will need to choose one which supports A - F.

Cheers, Alan.
 

westaust55

Moderator
Do you have a schematic that might make things quicker for us to understand.

Are you using 1 and some multiplexing or 2 off 4511's across one port (ie the 8 x Port B outputs)
How are the other (non BCD) inputs of the 4511. Connected?
 
Last edited:

westaust55

Moderator
If there are two 4511 chips across 8 consecutive outputs (physical pins /1 to 28) the. With a binary or hex value you can just write the value direct to the 8-bit output port.

Outline = b5 for example

You also need to clarify the format of the "binary number".
Is it a BCD value in the range 0 to 99 or a raw binary number capable of values in the range 0 to 255 in which case there could be 3 digits
 
Last edited:

westaust55

Moderator
@Bill,

have a look at this thread here - started yesterday wherein aniother forum member has posted details for a M2 PICAXE part using a single 4511 and one transistor per 7-seg digit to drive a multi digit display.
http://www.picaxeforum.co.uk/showthread.php?23190-Multiplexing-7-seg-displays&p=230074#post230074


I note that your location is recorded as "lost" but without adequate information up front from you, folks here struggle to know exactly what the circuit and requirement is to provide a clear and concise anser without asking a lot of questions.

Trust the link provided helps in your quest.
 
Last edited:
Top