For a big project I bought 10 ATMEGA328P U chips only to find, because they are new, they do not have a boot-loader. Research took me to this URL (URL Gammon Forum : Electronics : Microprocessors : How to make an Arduino-compatible minimal board ) that was well written back in 2012. However, after compiling both Sketch that were recommended ‘Atemga_Board_Detector’ and ‘Atmega_Board_Programmer’ I found errors in compiling.
My questions: What is the most current instructions on setting a new ATMEGA328P U Chip to accept programs? If this is it, where do I get a Sketch that will compile without errors?
Errors:
Arduino: 1.8.13 (Windows 10), Board: "Arduino Uno"
C:\Users\bill\Documents\Arduino\Atmega_Board_Detector\Atmega_Board_Detector.ino: In function 'void readBootloader()':
Atmega_Board_Detector:202:16: error: 'readFuse' was not declared in this scope
byte hFuse = readFuse (highFuse);
^~~~~~~~
C:\Users\bill\Documents\Arduino\Atmega_Board_Detector\Atmega_Board_Detector.ino:202:16: note: suggested alternative: 'extFuse'
byte hFuse = readFuse (highFuse);
^~~~~~~~
extFuse
Atmega_Board_Detector:257:14: error: 'readFlash' was not declared in this scope
showHex (readFlash (addr + i));
^~~~~~~~~
Atmega_Board_Detector:275:11: error: 'readFlash' was not declared in this scope
mem = readFlash (addr++);
^~~~~~~~~
C:\Users\bill\Documents\Arduino\Atmega_Board_Detector\Atmega_Board_Detector.ino: In function 'void readProgram()':
Atmega_Board_Detector:330:14: error: 'readFlash' was not declared in this scope
showHex (readFlash (addr + i));
^~~~~~~~~
C:\Users\bill\Documents\Arduino\Atmega_Board_Detector\Atmega_Board_Detector.ino: In function 'void getSignature()':
Atmega_Board_Detector:346:3: error: 'readSignature' was not declared in this scope
readSignature (sig);
^~~~~~~~~~~~~
C:\Users\bill\Documents\Arduino\Atmega_Board_Detector\Atmega_Board_Detector.ino:346:3: note: suggested alternative: 'getSignature'
readSignature (sig);
^~~~~~~~~~~~~
getSignature
C:\Users\bill\Documents\Arduino\Atmega_Board_Detector\Atmega_Board_Detector.ino: In function 'void getFuseBytes()':
Atmega_Board_Detector:374:12: error: 'readFuse' was not declared in this scope
showHex (readFuse (lowFuse), true);
^~~~~~~~
C:\Users\bill\Documents\Arduino\Atmega_Board_Detector\Atmega_Board_Detector.ino:374:12: note: suggested alternative: 'extFuse'
showHex (readFuse (lowFuse), true);
^~~~~~~~
extFuse
C:\Users\bill\Documents\Arduino\Atmega_Board_Detector\Atmega_Board_Detector.ino: In function 'void setup()':
Atmega_Board_Detector:396:3: error: 'initPins' was not declared in this scope
initPins ();
^~~~~~~~
C:\Users\bill\Documents\Arduino\Atmega_Board_Detector\Atmega_Board_Detector.ino:396:3: note: suggested alternative: 'init'
initPins ();
^~~~~~~~
init
Again, My questions: What is the most current instructions on setting a new chip to accept programs? If this is it, where do I get a Sketch that will compile without errors?