The new Arduino Mega 2560

I finally got my first Arduino Mega 2560 today. ArduinoMega

The Arduino Mega 2560 is a microcontroller board based on the ATmega2560. It has 54 digital input/output pins (of which 14 can be used as PWM outputs), 16 analog inputs, 4 UARTs (hardware serial ports), a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started. The Mega is compatible with most shields designed for the Arduino Duemilanove or Diecimila.

In addition I also treated myself with 2 ATmega328  chip replacements for my Arduino Duemilanove plus  one Arduino Uno.

 A couple of weeks ago, while building a prototype that involved 2 DC motors and a servo, I might have accidentally pulled more current from the 328 IC that what it is capable of delivering. I most likely burned part of it because it started acting "strange" and rather randomly after that episode. 

The two 328 replacements that I bought already come with the Arduino bootloader. It is  a small program that has been loaded on to the microcontroller. It allows the upload of code without using any additional hardware.

The bootloader is active for a few seconds when the board resets; then it starts whichever sketch was most recently uploaded to the microcontroller.

In the mean time I might have encountered an hardware limitation in the Duemilanove.

I want to be able to control, simultaneously 2 DC motors and a servo. To control the DC motors I'm using analogWrite() and for the servo, the servo lib. As it seams the limitation lies with the number of timers available in the ATmega328 - 3 timers, 0 through 2.

Timer0 is used by delay(), Timer1 is used by servo lib and disables analogWrite() on pins 9 and 10. Some thing similar happen with ServoTimer2 lib, which uses Timer2. And Timer2 is also used by analogWrite() on pin 11. In order to run the DC motors at the same time as the servo I need both the Timer1 and Timer2 for analogWrite on pins 10 and 11 and at the same time Timer1 for Servo lib...... according to my findings this limitation is not present in the Arduino Mega.....I'll keep you posted.