I have noted on more than one occasion the comments in sketches "reserving pin 13 for future PWM backlight dimming of the LCD" while using Uno and Nano boards. Am I missing something ? I always considered it NOT possible as PWM output is only available on pins 3,5,6,9,10 and 11 on most boards.

  • Have you checked schematics and processor datasheets? That pin may be backed with PWM hardware, but not be supported by Arduino software for the reason stated. Remember that an Arduino is a product of a little self-contained ecosystem with certain design goals in mind. – TimWescott Nov 17 '18 at 20:06
  • you can program any pin to output a PWM signal – jsotola Nov 17 '18 at 20:18
  • yes, but analogwrite() only works with those pins backed by hardware PWM circuitry on-chip – Jasen Nov 17 '18 at 23:01

Arduino pin 13 is SCK/BP5 on the ATmega8 MPU, there's no hardware PWM capability on that pin, so any PWM would be software driven.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy