three 7 segment display over a PIC input

Discussion in 'The Projects Forum' started by evios, Dec 9, 2008.

  1. evios

    Thread Starter Member

    Nov 9, 2008
    29
    0
    Hi everyone, I am doing a project, and I'm now facing a critical part. As we know 7 segment display has 10 pins, while 7 pins are used for displaying a character. In my project, I am using 3 characters for a particular reading, for example: 123, which means 21 pins involved. And now, I need these readings to the input of a PIC16F886 via a serial communication only at A pin at the RX. How am I able to program the PIC so that I can get the reading accordingly? Or any suggestion that can make use of a SIMPLE additional hardware so that I can get the reading accordingly? Seriously need help, guidance are welcomed. Thanks a lot.
     
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Well, you could do something like use RB0 through RB7 to drive a ULN2003 (7 Darlington pairs) via resistors to sink current from a common-anode 7-segment a thru g pins, and use another three I/O pins to turn on PNP transistors (such as 2N2907 or 2N4403) to source current to a single 7-segment display at a time. This is multiplexing the display; it saves a lot of I/O pins.

    1) Load the character to be displayed in RB.
    2) Turn on the current to the selected 7-segment display for a period of time.
    3) Turn off the current.
     
  3. evios

    Thread Starter Member

    Nov 9, 2008
    29
    0
    Em... RB0 to RB7 from a PIC? How if only a RX pin is used here? ;)
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    doH! :rolleyes: (best Homer Simpson response)

    OK, in that event, you'll need something like three 4021 static shift registers to capture the data from the displays. Once you've latched the data, clock it into the PIC a byte at a time and decode each byte.

    Don't leave the "unused" bit from each byte float; it may oscillate at high frequency. Tie it to ground instead.
     
    Last edited: Dec 9, 2008
  5. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    That could be a bit interesting. If the displays are common anode, the segment drives will be low if active. But common cathode displays will only have the drop across the LED's present at the display - 1.5 - 2.1 volts.

    If you can't get to the driven side of the limiting resistors for a common cathode display, the less than logic level signal may have to be amplified before it can be sensed by a latch.

    Do you know what sort of displays you are working with?
     
Loading...