I am new to Arduino but have legacy-era microcontroller experience (from 1970s) and extensive TI MSP430 experience. I am using Windows 10 and Arduino 1.8.16.
My goal is to upload an existing Arduino sketch ("blink" example) to an external ATMEGA386P-AU (TFQP32 package) part (purchased through distribution, was not previously configured with a boot loader), using my Arduino Uno R3 as a ICSP programmer (I'm not at first using the ICSP connector method, I've just wired the ATMEGA386P-AU pins as needed to the Arduino Uno R3 which runs ArduinoISP).
If successful, the result of this effort is to have the ATMEGA386P-AU toggle PD7 (pin 12 on the ATMEGA386P-AU) as if it were LED_BUILTIN (pin 13 on the DIP packaged ATMEGA386P-PU on my Arduino Uno R3.)
I am looking for help on how to troubleshoot this - I am unclear of the role of the Arduino Boot loader in my application, and I am unclear of how the target "board" is specified (I tried Arduino Uno, I did not see a way to tell Arduino that my target as an ATMEL386P part, but that's the base part number also on my Arduino Uno R3). In my application case, I have populated an ICSP (2x3 header) port to appropriate pins on the ATMEGA386P-AU chip, and plan to use the Arduino Uno (as an ISP using ArduinoISP running on the Arduino Uno R3) to upload my application firmware to the external ATMEGA386P-AU once it's in place on the application PCB.
I think at this stage I need to first clarify any concepts I'm getting wrong, then what the steps are involved to achieve my task, then once I am doing the steps properly, verify that I have made the proper electrical connections from the Arduino Uno R3 to my external ATMEGA386P-AU IC.
At the end of the steps I followed (further below), the upload operation resulted in the error message copied below.
Arduino: 1.8.16 (Windows 10), Board: "Arduino Uno"
Sketch uses 924 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override this check.
An error occurred while uploading the sketch
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
How I got to this point:
-
Verified that the Auduino Uno R3 could have "blink" uploaded directly to it (and I could change the delay and re-upload, seeing new LED blink rate.)
-
Uploaded ArduinoISP to the same Arduino Uno R3. This appeared to complete without error.
-
Wired a small adapter from Arduino Uno R3 pins specified by ArduinoISP sketch application:
Arduino Function ATMEGA386P-AU pin(s)
10 RESET 29
11 MOSI 15
12 MISO 16
13 SCK 17
GND GND 3,5,21
+5V +5V 4,6,18
Crystal 7
Crystal 8
The crystal is 20 MHz (this is the CPU speed intended for my final application.)
All other pins on the ATMEGA386P-AU IC are unconnected at this point.
The Arduino application is configured as follows when I try to upload the Blink example (that is, this is how I've configured Arduino software once I have (apparently successfully ) completed the upload of "ArduinoISP" to my Arduino Uno R3:
Tools -> Board -> Arduino Uno
Tools -> Port -> COM3 (where the Arduino Uno R3 connects)
Tools -> Get Board Info returns:
BN: Arduino Uno
VID: 2341
PID: 0043
SN: 9533335303735151C1B1
Tools -> Programmer -> Arduino as ISP
At this juncture, I tried Tools -> Burn Bootloader and got
Arduino: 1.8.16 (Windows 10), Board: "Arduino Uno"
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override this check.
Error while burning bootloader.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I subsequently did:
Sketch -> Upload
and ended up with the error message text cited earlier in this posting.
Thank you very much for any help aiming me in the right getting-started direction!