You shouldn't connect every LED through one resistor. What are your LEDs rated at? What is the forward voltage? If you have 5ma LEDs and the forward voltage is 1.2v, then a resistor of 760 ohms [(5V-Vforward)/.005=resistance] should be in series with the LED. If you are using a transistor to turn them on, then you will need to also account for the voltage drop across the transistor. The purposes of multiplexing the LEDs are less parts and less current. Something else to consider: if you are using 20ma LEDs and they are all connected to you PIC, then if they all turn on, you can exceed to overall current rating of the PIC. Even though each pin can sink/source 25ma, all of them can't at the same time. -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Lindy Mayfield Sent: Friday, June 04, 2004 3:15 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC:] First Project Finished! But... it used up all my bat tree I connected my multimeter from +5 on the battery to the circuit and it reads about 75 mAmps. I'm quite new to this, but that seems like a lot. Since all the LED's are connected to a common ground in my circuit (already soldered), can I add a resistor between the cathode of the LED's to the battery ground? -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Fred Hillhouse Sent: Friday, June 04, 2004 21:11 To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC:] First Project Finished! But... it used up all my bat tree Although many LED clocks have 9V batteries in them, usually the LEDs are off if the AC power fails for some reason. The 9V battery only powers the 'time keeping' circuit, not the 'time displaying' circuit. You may want to consider a 9V wall wart instead. -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Lindy Mayfield Sent: Friday, June 04, 2004 2:48 PM To: PICLIST@MITVMA.MIT.EDU Subject: [PIC:] First Project Finished! But... it used up all my bat tree Hi Guys. I finished my first project! Finally. I got the idea from Mike Predeko's book for the LED clock. But I couldn't find the right parts to put together the multiplexing for all the LED's, so I decided to work with what I have available and made a binary clock: 20 small 3mm LED's that show the hours, minutes, and seconds in bcd binary. The design so far is simply a 9v battery, a 5v voltage regulator, a PIC 16f877, a 32.768 kHz crystal + 2 22pf caps, resistors and LED's, and one resistor tied to MCLR. The programming was fun. Building and soldering the rat's nest out of wires on the back of the board wasn't. (-: (Took 3 weeks.) I left it running for a test last night and it sucked all the juice out of my 9 volt battery in just a few hours. Would someone give me hints as to how to figure out what the problem is why it is using so much power? Thanks in advance. Lindy --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.663 / Virus Database: 426 - Release Date: 4/20/2004 -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.663 / Virus Database: 426 - Release Date: 4/20/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.663 / Virus Database: 426 - Release Date: 4/20/2004 -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu