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.)
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:

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?
24-09-2018, 08:56 AM, (This post was last modified: 24-09-2018, 08:56 AM by nolash.)
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?
30-09-2018, 11:03 AM, (This post was last modified: 30-09-2018, 11:04 AM by nolash.)
RE: analogWrite fade LED
I changed the MCU chip, and now it works. So I guess I fried the other one at some point. Sorry for the noise.

Forum Jump:

Users browsing this thread: 1 Guest(s)