Creating a new Arduino PCB in the Arduino IDE - Trials and Tribble-ations
If someone can help me out then I will write a tip/walkthough on this subject.
Quite often DAGU products use the ATmega168 MCU rather than the ATmega328 because they are a bit cheaper and 16K of program memory is often enough.
The problem is that ATmel no longer produce the ATmega168 20-AU which we had been using. They now produce the ATmega168PA which is almost identical but has a different device signature ID.
We have used these chips with Arduino compatible products and normally we do not have a problem except when burning the bootloader with the Arduino as an ISP. AVR dude will complain about the invalid signature ID.
So now with our Micro Magician controllers about to go on sale I am learning to create a new board type. After a bit of googling I found out that there is an avrdude.conf file. I added a new chip configuration identical to the 168 except for the different signature ID and called it 168p.
I added 2 boards to the boards.txt file. One for previous DAGU products using the 168p (5V, 16Mhz) and one for the Micro Magician which uses the 168p at 3.3V, 8MHz.
Using the Arduino IDE 0018 & 0022 (with updated avrdude file) and the new Arduino 1.0, I can now write the bootloaders to the boards using an Arduino Nano running the Arduino as ISP example code. I used the same bootloader normally used for the Arduino Nano w/ 168 for the Wild Thumper controller and the Arduino Pro Mini (3.3V, 8MHz) for the Magician.
Now I have a new problem.
While the new board options work fine for burning the bootloader, they don't work for uploading the code. Using a Wild Thumper controller with the 168PA chip as an example, I must still select "Arduino Nano w/168" as my board type for uploading the code.
Since I used the "Arduino Nano w/168" bootloader I assume I must now edit it to send the correct signature ID.
I have also found with the newest Arduino IDE that while it burns my bootloader quite happily it will not compile programs now that I have changed the board.txt and avrdude.conf files. It looks for a missing "pins_arduino.h" file.