On Thu, 10 Jul 2003, Alex Kilpatrick wrote: > > >> I'm using the CCS compiler. The code looks like this: > > >> > > >> Output_low(PIN_A1); > > >> Delay_ms(200); > > >> Output_high(PIN_A1); > > > > Wouldn't you need a delay after the output high, so you can > > see the led is on? > > > > No, the anode of the LED is connected to the PIC. The cathode is > connected to +3. Matters not. Here is what you're doing: Turn LED on for 200ms Turn LED off for 1uS Turn LED on for 200ms See a problem there? > I generally do this, since PICs can sink more current than they can > supply, right? Some can, some cannot. Check the data sheet. But it's immaterial if you are not trying to run 20-25mA to the LED. If you have a current limiting resistor in series with the LED to less than 20mA, then who cares whether the pin can do 20 or 25mA in that direction? Having said that, either way is fine. Dale -- It's a thankless job, but I've got a lot of Karma to burn off. Get a PicoKeyer: http://www.hamgadgets.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu