Author Topic: Digispark only supports PWM on pins labeled p0, p1 and p4?  (Read 32 times)

bulrush

  • Newbie
  • *
  • Posts: 5
New Digispark and new forum user here! I'm new to programming boards and am using the Arduino IDE 1.8.2. I successfully got the onboard LED to light using a pin value of 1.

I have a Digispark with microusb port. I'm trying to light LEDs using analogWrite(). I just found out that analogWrite() is for doing PWM. So PWM can only be used on pins labeled p0, p1, and p4?

I need to light at least 4 LEDs via PWM. How many pins on the Digispark Pro can be used with PWM? The DSPro has more pins.

Thank you!.

KASA

  • Newbie
  • *
  • Posts: 10
Re: Digispark only supports PWM on pins labeled p0, p1 and p4?
« Reply #1 on: May 22, 2017, 01:31:45 pm »
Yes, only P0, P1 and P4 can d  HARDWARE PWM but you can use software PWM (lower frequency) on all of them.
https://digistump.com/wiki/digispark/tricks#software_pwm