7 segment display

Thread Starter

cassity69

Joined Dec 18, 2013
37
im trying to connect a 7 seg display to a pic18f450 but im confused, the 7 segment display is already mounted onto a board with the pins ;
vcc . A B C D GND
therefore i beleive it needs to be inputted in binary ?
but first im trying tro connect the hardware im already using port A and D for a stepper and pot so they are took up

i got given the link below from a helpful chap on this forum but the 7 segs are slightly different to what i have..

i need to 7 segs to be able to display a speed and weight therefore they need to be continueasly on

i dont really know where to start as i did this so long ago ive lost work prevoisly done

any help would be great



http://www.mcuexamples.com/PIC-Seven-Segment-Displays.php
 

Thread Starter

cassity69

Joined Dec 18, 2013
37
the display is a KINGBRIGHT SC52-11LSRWA its connected onto a board already so i think thats the part numner for the actual display

well i want to display 3 digits and 2 digits
ive got 5 seperate displays
the 3 are going to display a rpm and the 2 are needed for a weight in kg so i will need to use the . im assuming ...
 

tshuck

Joined Oct 18, 2012
3,534
It would seem that your board has a seven-segment decoder on it and that you are applying a binary number to A-D so that it will display a single digit. Is this the case?

If it is, you only need four pins to interface to the display.

The link you supplied suggests that you want 4 seven segment displays, is this the case?

A datasheet would help us give you a more exact answer.

Edit: it seems I'm slow at typing today...
 

Thread Starter

cassity69

Joined Dec 18, 2013
37
Here's a good example using a Binary Code Decimal chip.
http://www.electronics-tutorials.ws/articles/segment5.gif

That way you only use 4 pins on the PIC.

An example of the output would be:

Pic 0000 - produces 0 on 7 segment display
Pic0001 - produces 1 on 7 segment display
Pic 0010 - produces 2 on 7 segment display
...
Pic 1001 - produces 9 on 7 segment display

ok thanks i understand the binary now so am i right in saying i can connect the ABCD to port c via a darlington driver and i need the resistors ?
 

Thread Starter

cassity69

Joined Dec 18, 2013
37
It would seem that your board has a seven-segment decoder on it and that you are applying a binary number to A-D so that it will display a single digit. Is this the case?

If it is, you only need four pins to interface to the display.

The link you supplied suggests that you want 4 seven segment displays, is this the case?

A datasheet would help us give you a more exact answer.

Edit: it seems I'm slow at typing today...

yes that is the case sorry the decoder phrase didnt come to mind when i was writing it

and no i need 5 seven segment displays with 3 connected and 2 connected
 

Thread Starter

cassity69

Joined Dec 18, 2013
37
no i am not bruce lol
my name is adam
bruce is bruce we are on the same project team yes he has his side and i have my side ,
sorry if anything is wrong ?
 

Hurdy

Joined Feb 27, 2006
137
Here's and example where you can multiplex multiple segments.
http://embedded-lab.com/blog/wp-content/uploads/2011/03/Lab11_Circuit_SevenSegmentMultiplexing.jpg

You wire up all matching segment display pins up on the same line.
Then you switch each transistor on, one at any given time, and supply the segment led values that you want to turn on. Toggling a transistor allows the current to flow through the segment, thus lighting up the LEDs.
You keep looping through each segment one at a time. You have to loop through each one at a fair speed to give the illusion that they're all switched on at the same time. The reality is that only one is on at a given time. The human eye won't notice this (providing you multiplex fast enough)
 

tshuck

Joined Oct 18, 2012
3,534
ok thanks i understand the binary now so am i right in saying i can connect the ABCD to port c via a darlington driver and i need the resistors ?
You won't need a Darlington to drive ABCD, these are logic signals going to the decoder. The board (hopefully) will have the LED segments driven properly from the outputs of the decoder.

It sounds like if you are to multiplex these displays, you'll have to switch power to the displays - which it may, or may not, like.

How many I/O do you have available?
 

MrChips

Joined Oct 2, 2009
30,711
no i am not bruce lol
my name is adam
bruce is bruce we are on the same project team yes he has his side and i have my side ,
sorry if anything is wrong ?
Thanks for that, Adam. No, nothing wrong. Just checking.
It's a coincidence that you both logged in at the same time from CU.
 

Thread Starter

cassity69

Joined Dec 18, 2013
37
i tried to wire up the seven seg before and the transister didnt switch the power off (somethong to do with decoder) so i was advised to use different segs
then becuase of time i now have to use these again which is why i thought about using the darlington due to doing it in the past mayb im confusing things

im working on a fairly tight board and i have port B,C and E available
 

Hurdy

Joined Feb 27, 2006
137
You will likely be able to wire ABCD straight to the pic pins.
Then use resistors between the BCD decoder and the segment display.
 

tshuck

Joined Oct 18, 2012
3,534
i tried to wire up the seven seg before and the transister didnt switch the power off (somethong to do with decoder) so i was advised to use different segs
then becuase of time i now have to use these again which is why i thought about using the darlington due to doing it in the past mayb im confusing things

im working on a fairly tight board and i have port B,C and E available
Try operating the display without the transistor to understand how it works first, then move on to trying to multiplex it.

The pins you have available should be enough...

Do you have a datasheet for a 18F450?
 
Top