I have developed a board with an ATMEGA328P on it and I am planning to run it as a classic Arduino Nano (a nano embedded in my own board). I have used an Arduino Uno to program the bootloader on it, but the external 16MHz oscillator does not seem to start when I check it with an oscilloscope.
The programming of the bootloader went fine (it writes and reads back everything):
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Users/rolf/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
User configuration file is "/Users/rolf/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/cu.usbmodem101
Using Programmer : stk500v1
Overriding Baud Rate : 19200
AVR Part : ATmega328P
...
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e950f (probably m328p)
...
avrdude: writing flash (32768 bytes):
Writing | ################################################## | 100% 0.00s
avrdude: 32768 bytes of flash written
...
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 32768 bytes of flash verified
...
avrdude: reading on-chip lock data:
Reading | ################################################## | 100% 0.01s
avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude done. Thank you.
I don't see any errors or warnings in the process above. (dots are snips, if I need to post more logging let me know).
Then when I connect my homebrew board (with ftdi chip) to my USB port, the computer (MacOS) recognizes that there is a USB device connected. When I try to get the board info it complains that it doesn't know what board it is (I can accept that).
When I try to flash a program to the board it seems to send data to the board, but then the log shows:
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Users/rolf/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
User configuration file is "/Users/rolf/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/cu.usbserial-A50285BI
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
Since the oscilator does not seem to be running, I suspect that I have one of the following problems:
- The fuses aren't set correctly (although the avrdude logging above seems to indicate that it is setting fuses, and since I replicated the Nano schematic, I assumed that it would set the fuses to use the external oscillator.
- The oscillator itself is not the correct make/model and the atmega can't get it to oscillate
I am wondering what the next smart step is in analyzing this problem, before ripping off the oscilllator and replacing it with one off of an original Arduino Nano board.