Hi Roman, Yep good idea, I suggested in the original message that the values of that resistor and the pullup to Vcc may need to be altered. May be better to increase the value of the pullup so you don't sacrifice as much current when the PIN2 is high driving the LED and the switch is closed.. Just got to watch the settling time when reading the switch state. Then again, the current isn't very much :) Cheers, Ash. --- Ashley Roll Digital Nemesis Pty Ltd www.digitalnemesis.com Mobile: +61 (0)417 705 718 > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Roman Black > Sent: Wednesday, 6 February 2002 3:02 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC]: Driving a dual LED > > > Ashley Roll wrote: > > > > Hi Josh, > > > > Good to see my idea validated by Roman :) > > > > The reason I split the current limiting resistors for the > LED was to provide > > some protection to the PIC for Electro-Static discharge and > short circuits > > in the cable. To fulfil these requirement, they MUST be > located at the PIC. > > And for ease of assembly, the other resistors should be > there as well I'd > > assume. I don't think you'll get any benefit moving them to > the end of the > > cable. > > > > Roman, this is the circuit I posted: > > 120 > > > PIN1 >-----------/\/\/\--, > > > | > > > 10K Bi Colour LED > > > Vcc >--/\/\/\-, | > > > | 120 | > > > PIN2 >---------+-/\/\/\--+ > > > | > > > 0 | > > > 0 | Switch > > > 4.7K | > > > GND >--/\/\/\-----------' > > > > > Actually I think you should change that > 4.7k resistor to about 1k or 1.5k to ensure > PIN2 is pulled sufficiently low to register > a low input condition. :o) > -Roman > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > > -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads