I'm a newbie in Arduino and I bought an Arduino Mega instead of the Uno. I want to know what the so-called additional i/o pins do. Are they the same with PWM and SPI? What can they do?
Firstly some background info on the Arduino Mega:
I haven't used the Mega, but I've used the Uno, and have worked with a variety of ATmega microcontrollers.
First thing you need to know is that the Arduino Mega (or any other Arduino) is a board that uses the Atmel ATmega microcontrollers. The specific microcontroller used on the Mega is the
So if you are keen to learn more about your Arduino, a good place would be to look at the datasheet of the microcontroller itself. Just google
ATmega1280 ATmega2560 datasheet.
However this might be a fair bit complicated, since you are new to the Arduino and microcontroller world.
A good place to start would be the Arduino website itself (but I suppose you've already looked at it).
Now, regarding your question:
I'm not sure what you are referring to as "additional i/o pins", but here's a quick rundown on what I/O pins are and used for.
As you may know I/O pins are used by the microcontroller to talk to the outside world. On the ATmega chips, most of these are GPIOs (General Purpose I/Os) that can be programmed to receive or send digital signals. Of these GPIOs some are used for PWM, and some may be used for some communication protocol. And of course there are analog input & reference pins, voltage supply, ground etc.
You can find all this information in the datasheet I linked above.
If you are curious how Arduino has routed the pins, you can have a look at the schematic of the Arduino Mega here.
If you also have a look at the Arduino website, they have a very good description on what each pin does: Arduino Mega.
Look at "Inputs and Outputs".