7 segment display

Discussion in 'General Electronics Chat' started by cassity69, Mar 25, 2014.

  1. cassity69

    Thread Starter Member

    Dec 18, 2013
    37
    0
    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
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,432
    3,360
    How many digits do you need to display?
     
  3. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,515
    2,369
    Do you have a part No of the display?
    Max.
     
  4. cassity69

    Thread Starter Member

    Dec 18, 2013
    37
    0
    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 ...
     
  5. Hurdy

    Senior Member

    Feb 27, 2006
    137
    0
    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
     
  6. MrChips

    Moderator

    Oct 2, 2009
    12,432
    3,360
  7. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,515
    2,369
    That is an ordinary 7 segment display so the 4 bit input must be extra decoding somewhere.
    Max.
     
  8. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    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...
     
  9. cassity69

    Thread Starter Member

    Dec 18, 2013
    37
    0

    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 ?
     
  10. cassity69

    Thread Starter Member

    Dec 18, 2013
    37
    0

    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
     
  11. MrChips

    Moderator

    Oct 2, 2009
    12,432
    3,360
    Are you and Bruce the same person, different persons on the same project team or on separate project teams?
     
  12. cassity69

    Thread Starter Member

    Dec 18, 2013
    37
    0
    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 ?
     
  13. Hurdy

    Senior Member

    Feb 27, 2006
    137
    0
    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)
     
  14. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    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?
     
  15. MrChips

    Moderator

    Oct 2, 2009
    12,432
    3,360
    Thanks for that, Adam. No, nothing wrong. Just checking.
    It's a coincidence that you both logged in at the same time from CU.
     
  16. cassity69

    Thread Starter Member

    Dec 18, 2013
    37
    0
    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
     
  17. cassity69

    Thread Starter Member

    Dec 18, 2013
    37
    0
    yeah sorry for that, hes in this room, its proberbly because we work on the same rota he
     
  18. Hurdy

    Senior Member

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

    Thread Starter Member

    Dec 18, 2013
    37
    0
    ok Hurdy so which pic port ?
     
  20. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    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?
     
Loading...