MiniCore - An Arduino core for the ATmega8/ 48/ 88/ 168/ 328

I believe what happened is that hansibull originally had a hack in place to work around the no efuse issue by defining a separate AVRDUDE tool for ATmega8:

But later a cleaner solution was found that consists of adding a dummy efuse definition to avrdude.conf:

but he forgot to add an extended_fuses property to boards.txt for the ATmega8.

They did the same fix for the "Arduino NG and Older" board in Arduino AVR Boards but as you can see they added an empty extended_fuses property in boards.txt:
https://github.com/arduino/Arduino/blob/master/hardware/arduino/avr/boards.txt#L773

So try this:

  • Open C:\Users\Carlos\Documents\Arduino\hardware\MiniCore\avr\boards.txt in a text editor
  • Add the line:
8.bootloader.extended_fuses=
  • Save the file
  • Restart the Arduino IDE
  • Try burning the bootloader again.

I don't have an ATmega8 to test it.

Using a Usbasp with jp2 shorted, I am able to burn bootloader using another Usbasp with no problems using MiniCore.

Using USBtinyisp (two different versions) I fail every time.

Changing efuse makes no difference for me.

###################

ATmega8/A

###################

8.name=ATmega8
8.upload.tool=avrdude
8.upload.protocol=arduino
8.upload.maximum_size=7680
8.upload.maximum_data_size=1024

8.bootloader.tool=avrdude
8.bootloader.unlock_bits=0x3f
8.bootloader.lock_bits=0x0f
8.bootloader.low_fuses=0b{bootloader.bod_bits}{bootloader.sut_cksel_bits}
8.bootloader.extended_fuses=
8.build.core=arduino:arduino
8.build.board=AVR_ATmega8

I have attached the failure printout for the USBtinyisp.

m8-usbtinyisp.txt (13.8 KB)

Hi guys. Thank you for your prompt responses. Here are my findings:

  1. I have added 8.bootloader.extended_fuses= with no luck. Problem persists.
  2. However, as Pert suggested I’ve used Arduino as ISP configuration and it works flawless!!

As a side note, let me comment that there is in fact a problem between USBtiny programmer and latest AVRdude 6.3 version. I even have problems uploading a simple blink program by using USBtiny programmer and either ATmega8 or Atmega328p!! What I had to do (based on a suggestion from someone on the matrix) is configure an IDE with an old AVRdude (version 5.10). And this is how I do it whenever I need to upload programs with USBtiny and Arduino IDE.

So I've commented out the “8.bootloader.extended_fuses=” and re did the test…

Still works with “Arduino as ISP” setup! So I’m concluding that it is something between USBtiny and AVRdude 6.3.

It is unfortunately that I am not able to use my USBtiny programmer but I’m happy that I will be able to use MiniCore with Arduino as ISP set up. Maybe it is time for me to buy another programmer;-)

Thanks a lot for your suggestions!!

Sorry to send you two on a wild goose chase with my guess as to the problem. Looks like my first hunch was better. It does look like the blank extended_fuses property in boards.txt does result in less confusing AVRDUDE output so it still might be worth considering adding that to MiniCore

I'm a big fan of the USBasp and it sounds like kprims had success using one with MiniCore and ATmega8. Some people swear by the USBtinyISP but I have a few of them and just don't get consistent success. I never have problems with my USBasp or Arduino as ISP and (with the latest AVRDUDE) my AVRISP mkII works fine too. I also think the USBtinyISP have some limitations regarding programming chips with more flash.

On the contrary, thank you for your suggestions Pert and kprims for posting your findings!! I have fun doing these tests; it is a learning process for me. I agree with you in including "8.bootloader.extended_fuses=" in MiniCore Board.txt.

I learned a lot from this and other sites and hope all these findings will help others as well!!

hansibull:
Hi!
Last year I accidentally ordered an ATmega328 instead of an ATmega328p. I thought there wouldn't be a problem using the ATmega328 in Arduino IDE, but I was completely wrong. All Atmel microcontrollers have a device signature, and in this case ATmega328 and ATmega328p doesn't share the same signature. This means that the ATmega328 isn't officially supported (the same goes for the ATmega168).
I started searching for 3rd party cores that would add support for this, but I couldn't find any. That's why I decided to create one myself! :slight_smile:

This core is supposed to be working perfectly, but lets be honest; that ain't gonna happened right after the release. I'm able to squash a few bugs here and there, but I sure need your help in order to make this a bug free core.

Why use other chips that the ATmega328P?

  • You might not need 32kB flash and 2kB ram for your project
  • Some chips are dirt cheap and can be bought for under a dollar at Ebay or AliExpress
  • Less is more :slight_smile:

Core features:

Supported clock frequencies:

  • 16 MHz external oscillator
  • 20 MHz external oscillator
  • 12 MHz external oscillator
  • 8 MHz external oscillator
  • 8 MHz internal oscillator
  • 1 MHz internal oscillator

What the core doesn't have:

  • Support for the older Arduino 1.5.x and 1.0.x versions (Arduino IDE 1.6.x required)
  • Support for the ATmega88/168/328PB

The core and more information is available at my Github repository:
GitHub - MCUdude/MiniCore: Arduino hardware package for ATmega8, ATmega48, ATmega88, ATmega168, ATmega328 and ATmega328PB

Please let me know if you have any feedback! :smiley:

when i open with atmega328 & atmega168 & atmega88 i dont recieve this error , but for atmega8 i recieve this error. how can i fix it?
p.s: when i use blink app for mega8 , its work properly and wont recieve any error.

please download error.txt file bellow for the following instruction of error and see it. tnx

error.txt (11.1 KB)

And this is the program

code.txt (8.11 KB)

when i open with atmega328 & atmega168 & atmega88 i dont recieve this error , but for atmega8 i recieve this error. how can i fix it?
p.s: when i use blink app for mega8 , its work properly and wont recieve any error.

please download error.txt file bellow for the following instruction of error and see it. tnx

You get the error because the ATmega8 doesn't got pin change interrupts (PCINT), which the original SoftwareSerial library requires. However, I've just pushed a commit to MiniCore where I've added a modified version of SoftwareSerial, where you can use the "regular" interrupt pins (INT0 and INT1, Digital pin 2 and 3) for the RX and TX pins. Just do a manual install of the core (remove the old one first), and you're good to go :slight_smile:

hansibull:
You get the error because the ATmega8 doesn't got pin change interrupts (PCINT), which the original SoftwareSerial library requires. However, I've just pushed a commit to MiniCore where I've added a modified version of SoftwareSerial, where you can use the "regular" interrupt pins (INT0 and INT1, Digital pin 2 and 3) for the RX and TX pins. Just do a manual install of the core (remove the old one first), and you're good to go :slight_smile:

Hi, thanks for the answer. I did not understand what to do. . . Please explain more

Hi, thanks for the answer. I did not understand what to do. . . Please explain more

With the ATmega8 you can only use digital pin2 and 3 for the software serial library

SoftwareSerial mySerial(2, 3); // RX, TX

hansibull:
With the ATmega8 you can only use digital pin2 and 3 for the software serial library

SoftwareSerial mySerial(2, 3); // RX, TX

Well, I did exactly the same thing. . Please see the code I sent

That means that you're still using the SoftwareSerial library that comes with the IDE. Remember, you want to use the custom one.

BTW you should post the new error too. It's important because you need to know which directory the IDE is getting the library from

hansibull:
That means that you're still using the SoftwareSerial library that comes with the IDE. Remember, you want to use the custom one.

BTW you should post the new error too. It's important because you need to know which directory the IDE is getting the library from

hey bro i know about this problem! i want a solution to solve it! but i dont know how to use custom one code. if you may please guide me step by step to type the correct code and use costum IDE ill be glad so much. i get an error every time

Try an example. Select ATmega8 in the boards menu, and choose SoftwareSerial (MiniCore) under the examples menu. I get no errors when compiling SoftwareSerialExample.

hansibull:
Try an example. Select ATmega8 in the boards menu, and choose SoftwareSerial (MiniCore) under the examples menu. I get no errors when compiling SoftwareSerialExample.

Hi, I got an error again! Is it possible to log into my computer via TeamViewer software and solve my problem?

Do this:

  • Delete E:\app\barnameh\ARDUINO\arduino-1.8.1-windows\arduino-1.8.1\hardware\MiniCore-master. Please be very careful when deleting things on your computer. When in doubt back up!
  • Download https://github.com/MCUdude/MiniCore/archive/master.zip
  • Unzip the downloaded file
  • Move the extracted folder to C:\Users\abbas\Documents\Arduino\hardware. If the hardware folder doesn't already exist then create it.
  • Restart the Arduino IDE if it's running.

Note that you should never install anything to the Arduino IDE installation folder because anything you put there will be lost when you update to a new version of the Arduino IDE. Instead, always do manual installation of hardware packages and libraries to the sketchbook folder, as was intended.

pert:
Do this:

  • Delete E:\app\barnameh\ARDUINO\arduino-1.8.1-windows\arduino-1.8.1\hardware\MiniCore-master. Please be very careful when deleting things on your computer. When in doubt back up!
  • Download https://github.com/MCUdude/MiniCore/archive/master.zip
  • Unzip the downloaded file
  • Move the extracted folder to C:\Users\abbas\Documents\Arduino\hardware. If the hardware folder doesn't already exist then create it.
  • Restart the Arduino IDE if it's running.

Note that you should never install anything to the Arduino IDE installation folder because anything you put there will be lost when you update to a new version of the Arduino IDE. Instead, always do manual installation of hardware packages and libraries to the sketchbook folder, as was intended.

that was perfect
Very good
Thank you
Thank you
Error erased
I must go now
Replace atmega8 hardware with atmega328
You worked hard for me
Thank you

Hi, may be obvious question is it possible to support the m168pb by just changing the signature in the avrdude.conf file or is there a reason I wouldn't want to do this? thanks in advance-

I think the m168pb is not just a clone of the m168p, it has some different registers and stuff.

Hello,
I've downloaded minicore, and tested it using blink for quick timing check (atmega8, 8 mhz external clock) and it looks OK, soon i tried to upload my sketch, it has I2C LCD display (F.Malpartida) function, and it didn't work, lcd just showed blank. My display sketch works very well on atmega328 with the same hardware setup (same lcd, same connection). What to be check ?

regards