Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!



Help with programmi...
 
Share:
Notifications
Clear all

[Solved] Help with programming an AVR ATmega328p with an Arduino.

8 Posts
2 Users
0 Reactions
753 Views
(@Anonymous)
Joined: 1 second ago
Posts: 0
Topic starter  

Hello, I am trying to program an AVR ATmega using an arduino, and have wired it properly.

 

I have it wired correctly as per this image

 

I followed all of the instructions on this website, and tried to upload the code onto my arduino using "upload with programmer"  https://www.brennantymrak.com/articles/programming-avr-with-arduino

 

When I try to upload it, I get an error message. It only says error, and does not describe what went wrong.

 

If anyone has any advice, please help.

r/arduino - Help with programming an AVR ATmega328p with an Arduino.

Everything I wired is correct


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2714
 

It is probably best to contact the developer of the tool/code you using (Brennan - the writer of the article), but since you're posting your question here I would assume you tried this and maybe did not get a [helpful] response?

Are you using the standard Arduino IDE to upload the code to your Arduino? (this is what you are referring to, right?)
Normally one would expect more info in the Arduino IDE than just "error" ...? Odd.

Can you copy and paste all the output you see in the Arduino IDE?


   
ReplyQuote
(@Anonymous)
Joined: 1 second ago
Posts: 0
Topic starter  

@hans   Here is everything that occurred in the error screen

 

Warning: Board breadboard:avr:atmega328bb doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA328BB
Sketch uses 262 bytes (0%) of program storage space. Maximum is 30720 bytes.
Global variables use 0 bytes of dynamic memory.
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


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2714
 

Looks like the device you've selected from the menu isn't matching up with the device that you have connected.
Either that or some kind of config file has been corrupted (specifically for the atmega328bb).

I'd probably start by looking to make sure you have the latest Arduino IDE installed.
If that doesn't work, consider these options (tested none of these - just what I found online):

 

So the first part is just a warning, which can be ignored or fixed by doing this (source):

In the file hardware\breadboard\avr\boards.txt add the following line:

atmega328bb.build.board=AVR_ATMEGA328BB

 

Alternative; here they suggest using another board defintion file

Use MCUDude's miniCore - It supports the atmega328p and pb, as well as the smaller flash versions of those chips, with all the common clock options....

GitHub - MCUdude/MiniCore: Arduino hardware package for ATmega8, ATmega48, ATmega88, ATmega168, ATmega328 and ATmega328PB

 

Not sure if either will fix this - but considering the "Yikes" message, I'd think using a proper board definition may resolve the warning and the yikes message.

The Yikes message can also point to your connection, the selected port, and/or the need for a driver for the USB controller on your Arduino. I presume this is maybe not an original Arduino, rather a clone?

 


   
ReplyQuote
(@Anonymous)
Joined: 1 second ago
Posts: 0
Topic starter  

The arduino I am using is an Arduino Uno R3


   
ReplyQuote
(@Anonymous)
Joined: 1 second ago
Posts: 0
Topic starter  

@hans

 

I tried putting the text you said to put into the .txt file, but nothing changed.  For the second option, where do I put the github file?


   
ReplyQuote
(@Anonymous)
Joined: 1 second ago
Posts: 0
Topic starter  

@hans where do I put the minicore file for the second option that you discussed?


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2714
 

Sorry for the delay ...

Board definitions can be added as shown here, which is example how I did this with the board definitions of the ESP8266. Obviously for you the file may be different.

The Github page shows how it is done as well under their "how to install" section.


   
ReplyQuote
Share: