Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
analogWrite fade LED
24-08-2018, 11:44 PM, (This post was last modified: 24-08-2018, 11:46 PM by nolash.)
#1
analogWrite fade LED
I'm a beginner, so please bear with me.

Tried this program on the PIC18F45K50, Pinguino IDE 12.0.41-beta2, bootloader 4.14:

http://www.pinguino.cc/wiki/index.php?title=AnalogWrite

I connected an external LED kathode (1.8mA/2.2V drop, with 1500 ohms resistance) to pin 10 or 11, trying both 10 or 11 as ledPin, and the anode to "+" (5v) on the same side of the board. The result is that the LED glows with full brightness only. 

Do I need to wire it differently?
Reply
Yesterday, 08:56 AM, (This post was last modified: Yesterday, 08:56 AM by nolash.)
#2
RE: analogWrite fade LED
I see 17 and 18 are labeled PWM, so I presume that's the ones I should use? They don't seem to be working either, though;

pin 17/18 -> led anode, led cathode -> ground

is there some special trick here?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)