# 7 segment display

Status
Not open for further replies.

#### strokedmaro

##### New Member
Is there a way to get a seven segment to display numbers 1,2,3 and 4 with only 2 inputs?

Basically
1=on,on
2=off,on
3=off,off
4=on,off

#### shaneshane1

##### New Member
strokedmaro said:
Is there a way to get a seven segment to display numbers 1,2,3 and 4 with only 2 inputs?

Basically
1=on,on
2=off,on
3=off,off
4=on,off
I dont think so, why do you have to use only 2 inputs, why cant you use more.

#### Nigel Goodwin

##### Super Moderator
Yes, use suitable logic between the switches and display.

#### Torben

##### Well-Known Member
strokedmaro said:
Is there a way to get a seven segment to display numbers 1,2,3 and 4 with only 2 inputs?

Basically
1=on,on
2=off,on
3=off,off
4=on,off
Use a binary or BCD decoder IC. Something like an NE587 or similar, depending on your requirements.

Torben

#### RetiredHAL

##### New Member
strokedmaro said:
Is there a way to get a seven segment to display numbers 1,2,3 and 4 with only 2 inputs?

Basically
1=on,on
2=off,on
3=off,off
4=on,off
Yes, I think it is with suitable logic, but I don't think it is all that simple.
I presume you want to display 1,2,3,4 NOT 0,1,2,3
Nearly all logic devices (counters/ displays) are manufactured to count/display from 0- 3 ---> etc. So you will have to use an adder to increment a zero state (on,on) to (on,off) to satisfy a display module. A cmos 4008 will do that.
I also presume that you want to interpret the state of two lines, not a counter, hence you need a binary decoder. All I can see in the cmos is a 4555 that will give an A,B,C,D output.

I can not find a 7 segment display that will give 1,2 3,4 outputs with A,B,C,D inputs. EG 4511 will give A=1 B=2 BUT C=4 and D=8, So you will need to split the C and D outputs with Diodes to make discreet 4511 inputs C= (A+B inputs) and D = (NOT A+B+ C inputs)

This is an interesting exercise and I will have a go at it myself.

There are probably many other ways to do all this, but I can only see this way.

Cheers
RH

#### blueroomelectronics

##### Well-Known Member
I guess I'll be the first to chime in with the "easy to do with a PIC" answer.

#### Nigel Goodwin

##### Super Moderator
blueroomelectronics said:
I guess I'll be the first to chime in with the "easy to do with a PIC" answer.
That falls under "suitable logic"

#### strokedmaro

##### New Member

I think I have figured it out after reading a little about gates. Ive attached a section of my diagram with the logic I've come up with. I know this technically wont work because the solenoid signals are ground.....actually, how do you know what polarity works for a gate? Are they always voltage Dependant? More reading I guess. Anyway, I will work some power switching transistors in before the logic if thats what is needed. Is there a single IC with 10 NAND gates available? The switches Ive draw (SW0, SW1, SW2, SW3) correspond with the switches in the second attachment. Would this work?

I'm really trying to learn as much as I can so if I'm way out of the ballpark please let me know or direct me to more information. THANKS AGAIN!!

#### Attachments

• 87.1 KB Views: 127
• 59.8 KB Views: 232

#### Hero999

##### Banned
Why do you want to do this?

#### strokedmaro

##### New Member
I want to know that whats being commanded is whats actually happening. This will be for a breakout box I'm working on and I need to know when I've commanded position one for example (Solenoid A and B both on) that the correct combination has reached the solenoids.

Basically this would tell me that if I've commanded position 1 and my digit shows 2 that for some reason Solenoid A did not receive the proper signal. Hard to explain but thats the gist of it.

#### Hero999

##### Banned
What's wrong with microswitches and a coule of LEDs?

#### strokedmaro

##### New Member
That would be the easy way for sure, but its for testing solenoid operation of an oil filled gearbox. That would require submerging switches in oil and modifying the internal harness which is what I'm trying to avoid.

Also, would like to better understand how to do things like this for future projects? Did you look at my logic? would it work?

#### blueroomelectronics

##### Well-Known Member
A PAL or GAL has 10 nand gate inside a typical IC, problem is the programmer is very expensive.

#### pfofit

##### Active Member
Is there a way to get a seven segment to display numbers 1,2,3 and 4 with only 2 inputs?
Two inputs, displays 1,2,3,4. I think.

#### Attachments

• 49.2 KB Views: 215
Last edited:

#### Hero999

##### Banned
strokedmaro said:
That would be the easy way for sure, but its for testing solenoid operation of an oil filled gearbox. That would require submerging switches in oil and modifying the internal harness which is what I'm trying to avoid.

Also, would like to better understand how to do things like this for future projects? Did you look at my logic? would it work?
I still don't understand what the problem is.

Suppose you build the circuit to control the LED display with two inputs. The problem that you still need to obtain these inputs from somewhere still exists.

LEDs can be driven from BJTs or even small MOSFETs like the 2N7000 which have a huge input impedance and wouldn't affect the circuitry connected to them.

#### strokedmaro

##### New Member
I guess I should have posted the whole circuit. The combinations are created automatically by a computer through the top "Auto" contacts. When switch SW1 is flipped, the combo's are manually made through the breakout box by grounding "A" "B" or "OFF". This would happen remotely which is why I would like to know whats being commanded either automatically or manually by way of the digit. I hope this helps. Also while I have you .....the solenoids have about 5 ohms of resistance and draw about 1 amp @12vdc. Could I attach a 5ohm, 5-10 watt resistor to the "auto" contacts of the switch to simulate the solenoids when in manual to prevent the computer from faulting an open circuit? Would the resistors have any impact on the solenoids operation while in auto? THANKS!!!

#### Attachments

• 97.2 KB Views: 118
Last edited:

#### Ambient

##### New Member
The simplest (circuit-wise) way to do it is to program a PIC with at least 9 I/O. But if you are not familiar with PIC's then it would take longer to learn than to use old ttl technology. Do you have access to any kind of microcontroller or PLCC?

I can send you some code and a schematic I made that will decode binary to a hex display. It would be fairly easy to modify for your purpose.

On that schematic you tied the outputs of two of the logic gates together. That is not a good idea, it can and probably will kill one or both gates.

Do you have just NAND gates or a mix?

Last edited:

#### strokedmaro

##### New Member
I would love to learn how to do it....what do I need and where can I get information...Ive looked into it a little but there are so many versions of controllers and programmers that I'm not sure where to begin. What do most people use and where can I get info on it?

#### Ambient

##### New Member
Most people here will recommend going with the PIC's from Microchip. You can get programmers for around $30 (I have the Inchworm, BlueRoom designs these), and the PIC that you would need would cost around$2. Then all you would need is some resistors, a socket for the PIC,and the 7-segment display. You can use a breadboard or fab a pcb for yourself.

Status
Not open for further replies.