Non-Genuine Nano and IDE 1.6.5 issues

I am using several types of Arduino boards for my projects and development. One of the boards I like to use is the Arduino Nano. But I think the ones I am using are not genuine. Anyway, they were working until now without any problems. There has been a long time since I last used a nano board. In the meantime the Arduino IDE versions have improved and now I am using 1.6.5
I have also used some Digistump Attiny cards and in order to be able to program them I had to install a specific version of Arduino IDE. It is version 1.5.8
That means I have two different versions of Arduino IDE on my computer now.
In my projects I like to use Attiny85 chips where possible. I program them using a dedicated Arduino Uno board, a breadboard and some jumper wires. I decided to find a more comfortable way for Attiny programming. I have purchased a TinyUSB board but it will take a significant amount of time for the shipment of the product. So I tried to find another solution until the programmer board arrives.
My decision was to use a Nano board on a small printed circuit board and program my Attiny’s using this setup. Design and production of such a board was very straightforward but there was a serious problem during programming.
I have selected the “ArduinoISP” sketch. Selected “Nano” from the board menu. Atmega328 form the processor menu. I have selected the appropriate port. And of course “Arduino as ISP” from the programmer menu.
Using this configuration, if I do not connect the Nano and press “compile” button, there is no problem and the code will be compiled without any errors. But if I connect the board to my computer and press either “compile” or “upload” buttons I get java errors. (See attached pic)
On the other hand, if I use the other version (1.5.8) of the IDE there are no problems. I can compile and upload the ISP code to the nano board and then I can open a sketch for Attiny85. Make the necessary menu selections and compile & upload the code to the Attiny. I can also burn a bootloader to the Attiny.
The most logical explanation for the dramatic difference between IDE versions seems to be that the newer IDE versions have defense mechanisms against non-genuine boards.
Now my questions:

  • Are there really code portions in the IDE 1.6.5 which prevents the use of non-genuine boards?
  • Is using a non-genuine Arduino clone board wtih Arduino IDE illegal?
  • Am I doing something wrong?
  • Is there a way to use my non-genuine nano boards with IDE 1.6.5 or later?
  • Is it not appropriate to ask somethig about a non-genuine board in this forum?

Thank you very much for your help and advices…

In my experience, if you have 2 versions of the IDE and both are 1.5 or later, they interfere with each other because the settings for both versions are kept in one place. I remember seeing (don't have the link but I'm sure you can google it) a web page which shows how to extract and use the Digispark add-ons with 1.6.x and later. It looked like too much of a bother for me, so now I just use my Digispark boards as plain ATtiny85 breakout boards or as Trinkets with 1.6.5.

And I use derivative Nanos with the CH340G USB chip with 1.6.5 without problems.

Thank you very much for the replies. My examples of non-genuine nano boards have the CH340 chip. I have two options now: 1- Continue using this setup, use IDE 1.5.8 for the nano boards. 2- Uninstall both versions and then reinstall IDE 1.6.5.

I think I will try the second option. I will report the results here.

Thank you again...

I have uninstalled both IDE's (1.5.8 and 1.6.5). I deleted (after backing up) all Arduino related files and folders and then made a clean install of IDE 1.6.5. Unfortunately the problem recurred. There are no problems until I physically connect the nano board to the computer. After this connection I get the same error during compiling. Then... I decided to download the Arduino Nightly Build (1.6.6). It works flawlessly. Now I can easliy program my Attiny85's using my self made programming board. That's fine! Now... A new problem. To be able to use the Attiny series of AVR's I had to download a couple of files to place them under the hardware directory. The files contain board definitions, pin definitions etc for the Attiny series. I have built a second programmer board for Atmega328 chips. To be able to use this programmer board I need similar definition files for the Atmega series but I couldn't find them. I can use the Atmega Programmer by selecting Arduino Diecemila from the boards menu and then select "upload using programmer" but if I could have an Atmega menu entry (just like Attiny) it would be more user friendly and nice. Do you have any idea about how I can find definitons for Atmega328 chip?

Hmm, I don't know if anybody has a pre-built setup like that for sharing, and if they do it may be outdated. I think most people use the Uno or Pro Mini board selections for working with stand alone ATmega328P. Or to get a little fancy, build a boards.txt file with the necessary entries. This is a guide to doing that:

Note that in recent versions of the IDE you can create a hardware directory as a subdirectory to your documents/Arduino directory so it is no longer necessary to mess with the Arduino IDE installation directory to add customizations. That is what the link above is all about.

I think most people use the Uno or Pro Mini board selections for working with stand alone ATmega328P.

I bootload all my '328Ps as Uno, takes all the confusion out. I don't typically us the A6, A7 for anything. Or run things at 8 MHz.

Another question:

Suppose that we have the following setup:

  • Arduino Nano (containing Arduino ISP sketch) connected to an Atmega328P appropriately.

  • Atmega 328P has the necessary crystal and the two capacitors.

  • I want to use the Atmega with 8 MHz internal oscillator.

How can I set the necessary fuses?

If it were an Attiny I would select it from the menu and then select "Burn Bootloader". But in this case this is not possible. Is there any way to do this?

If you have a crystal on it anyway, why not go ahead and use the crystal instead of internal oscillator? You can divide the 16MHz frequency by 2. Like on this thread:

To use internal or external, in either case you can create your custom boards.txt file with custom entries that you like. The 3rd party hardware specification web page I gave earlier gives the details. For the fuse values, have a look at the data sheet for the 328P and use a fuse calculator (google arduino fuse calculator).

Or, in the IDE preferences set verbose output on upload. Then burn your boot loader the usual way. The avrdude command used to set the fuses will be shown to you. Copy that command to a text editor and doctor it up with the fuse settings you like. You don't need to change the lock bits, just the fuse bits. (omit the -e option which erases the chip and omit the -Ulock option which changes the lock bits.) Then run your avrdude command to set the fuse bits.

If when you are messing with the fuses you mess up and set some fuses which brick your chip, you may need to use a HV programmer to unbrick it. Fuses such as those which disable serial programming or set wrong clock source or disable the reset pin will do that. HV rescue:

Nick Gammon has a good web page which talks about fuses: In fact, when I want to explore heavy-duty topics on Arduino, I open google and type "gammon set fuses" or "gammon bootloader" or "gammon timers" or something along those lines, and good stuff pops up.

Thank you for the great info! I will try to visit the recommended pages...

I agree that using an Atmega with an external crystal is very easy but what I want is to understand the basics.