I have made a custom Atmega328p-AU board with some sensors and storage. The schematic and PCB layout is attached. The purpose of the board is to collect imu data from BMX160 IMU, timestamp it using M41T62 RTC and store the data on SD card. The board is rated at 3.3V and the crystal is 8 MHz.
To make sure I have access to the SPI pins for burning bootloader, I added jumpers on MISO, MOSI and SCK pins (which normally go to the SD card), which I keep open during programming to disconnect the MCU chip from SD card module.
I connected an Arduino Uno to the computer and uploaded the ArduinoISP sketch to it. Then I wired the board and the Arduino as follows:
Board - Arduino
VCC - 3.3V
GND - GND
SCK (D13) - D13
MISO (D12) - D12
MOSI (D11) - D11
Reset - D10 (there is a 10k pull up resistor on-board if you see the schematic, along with a capacitor).
In the Arduino IDE, I chose the board as Arduino Pro Mini and processor as Atmega328p (3.3V, 8 MHz). I chose the programmer as Arduino as ISP. However, when I try to burn the bootloader, I get the following error message:
avrdude: Expected signature for ATmega328P is 1E 95 0F
Double check chip, or use -F to override this check.
Error while burning bootloader.
To make sure the chip is alive, I disconnected everything from the Arduino and it reports a different error:
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
Error while burning bootloader.
I checked the datasheet and the chip and if I am not wrong, Atmega328P-AU is just the SMD version of Atmega328p-PU, so the signatures should match.
I tried using Gammon's programmer: Gammon Forum : Electronics : Microprocessors : Atmega bootloader programmer. When I run board detector sketch, the sketch says it fails to enter programming mode.
I tried to repeat the steps using an Arduino Nano as the programmer but get the same errors.
Any help would be appreciated.