I have a project which needs more pins than are available on the standard Arduino, so I built in on a Mega board (ATMega1280).
Looking about I chose an ATMega164PA because it does have more than enough pins, and also has more than enough Flash ( 11k is all I need).
I have managed to get the sketch to compile without errors by adding a new board in the boards section based on the maniacbug-mighty-1284P.
I have found the hex file, and thought that I could get that file onto the 164PA by using an arduino board as an ISP. Alas, I don't have the know how to get this to work, nor do I know whether it is something I should even be trying to do. I set up the arduino with the ArduinoISP , connected up the 164PA on a board and connected up the SPI, reset and power pins as directed, but I cannot get the sketch to upload on the 164PA.
Can anyone advise whether this is possible, if there is a step by step guide to get it to work or whether I should just get another programmer ( and if I do, will it be any easier ) ?
I downloaded from http://gammon.com.au/Arduino/Atmega_Board_Programmer.zip and ran it using the serial port monitor. It reports that it can see the ATMega164PA and that it does not support a bootloader ( which is fine by me as long as I can run my sketch ).
Extract from the boards file:
##############################################################
arduino_164p.name=ATmega164P via Arduino
arduino_164p.upload.protocol=stk500
arduino_164p.upload.using=arduino:arduinoisp
arduino_164p.upload.speed=115200
arduino_164p.upload.maximum_size=14336
arduino_164p.bootloader.low_fuses=0xFF
arduino_164p.bootloader.high_fuses=0xD2
arduino_164p.bootloader.extended_fuses=0x07
arduino_164p.bootloader.path=optiboot
arduino_164p.bootloader.file=optiboot_atmega1284p.hex
arduino_164p.bootloader.unlock_bits=0xFF
arduino_164p.bootloader.lock_bits=0xEF
arduino_164p.build.mcu=atmega164p
arduino_164p.build.f_cpu=16000000L
arduino_164p.build.core=standard
arduino_164p.build.variant=standard
##############################################################
I have searched high up and low down, but cannot find anything which helps me.. Hoping someone here has done something with the 164 and can point me in the right direction..