Pinguino Forum
analogWrite fade LED - Printable Version

+- Pinguino Forum (
+-- Forum: Software (
+--- Forum: Syntax & Programs (
+--- Thread: analogWrite fade LED (/showthread.php?tid=4993)

analogWrite fade LED - nolash - 24-08-2018

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?

RE: analogWrite fade LED - nolash - 24-09-2018

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?

RE: analogWrite fade LED - nolash - 30-09-2018

I changed the MCU chip, and now it works. So I guess I fried the other one at some point. Sorry for the noise.