How many LEDs could a wood chuck light


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305

    Default How many LEDs could a wood chuck light

    I've got a 12f683 and want to run 16 LEDs off it. I want one LED to be on for about 2 seconds then move on to the next. What is the easiest and cheapest way to hook them up?

    I'd swear I saw an article that the maximum number of LEDs one could hook to a PIC was defined by 2 raised to the number of pins available. That would mean a 12f683 is capable of controlling 64 LEDs (2 to the 6th).

    Is that true?

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default

    Adding column drivers to a Charlieplexed matrix allows lighting multiple LEDs in each column to increase duty cycle and brightness. If you're only going to light one LED at a time you can eliminate the column driver transistors.

    With Charlieplexing you get N(N-1) outputs (N = number of pins)...

    Regards, Mike
    Attached Images Attached Images   
    Last edited by Mike, K8LH; - 16th November 2010 at 01:33.

  4. #4
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Now the hard part

    Using the circuit from Tip #2 with the LEDs on the ICSP pins I get a wrong chip selected error. On the 12f683 I have GP0 on pin 7 and GP1 on pin 6. Pin 4 is pulled high with a 500 ohm resistor. It seems the programmer is only picky about pin 7 being used.

    Tip #2 should be what you need.
    http://www.picbasic.co.uk/forum/cont...ips-and-Tricks

    How can I connect LEDs and the ICSP header on the same pins?

    As usual, your thoughts are surely better than mine.

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Sometimes a resistor in series from the programing pins to the application circuit works, sometimes diodes.
    The sure fire way is to use a removable jumper to disconnect the programing pins from everything else while programing.

    If you are using the PicKit2, the PicKit2 User Guide briefly mentions this.
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    May 2010
    Location
    Chile
    Posts
    25


    Did you find this post helpful? Yes | No

    Default

    Remember that most 12Fs usually have an input only pin (mclr/gp3) but yes with charlieplexing and driving your leds at a higher current / lower pulse width should do the trick.

    Anyway if you want more and more outputs, just use a 74HC595 connected to the 12F combined with shiftout command for an unlimited number of them if your timing allows them to refresh
    "If at first doesn't work, kicking it wont help either"

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts