I read from this page: http://arduino.cc/en/Main/ArduinoBoardMega2560
Arduino mega 2560 has 14 PWM pins (0-13). However, I found pin 0 and 1 seems cannot after testing. Anyone knows what is the reason?
freecity:
I read from this page: http://arduino.cc/en/Main/ArduinoBoardMega2560
Arduino mega 2560 has 14 PWM pins (0-13). However, I found pin 0 and 1 seems cannot after testing. Anyone knows what is the reason?
From the arduino reference section: analogWrite() - Arduino Reference
On most Arduino boards (those with the ATmega168 or ATmega328), this function works on pins 3, 5, 6, 9, 10, and 11. On the Arduino Mega, it works on pins 2 through 13.
Indeed, pin 0 and 1 are in theory PWM-capable, but since they are also the Serial (TXD and RXD) pins, connected to the FTDI chip, it's not usable in practice.
However, if you are looking for PWM functions, I'd like to know whether pins 38-40 of the chip (connected to pin 44-46 on the board) are PWM capable or not ?
The eagle schematic identifies them as OC5A / OC5C and it looks like all "OCiX" pins are pwm-capable. There is a "pwm" label on the wire as well. But I'm not sure
the SW supports it at this stage.
BTW strangely enough, pin 0 and 1 are not references as OC-something.
Forgot to say : I actually use a MEGA (1280, not 2560), but both schematics are similar, so it should be valid for both boards/chips. I even got the impression that the boards are the same,
as I got mine with a "1280" sticker, probably on some "2560 marking...