2

I've recently purchased a no-brand 1€ ATtiny programmer off eBay, and with the ridiculous price obviously came no documentation nor support from the seller.

At first I thought that using it with the Arduino IDE would have been as simple as plugging and programming, but no default lib worked. My hopes definitely crumbled when I realized the device wasn't even being picked up by Debian, showing instead this in the logs:

kernel.info: [ 2758.501968] usb 6-3: new low-speed USB device number 2 using ohci-pci
kernel.err: [ 2758.641798] usb 6-3: device descriptor read/64, error -62
kernel.err: [ 2758.885515] usb 6-3: device descriptor read/64, error -62
kernel.info: [ 2759.125231] usb 6-3: new low-speed USB device number 3 using ohci-pci
kernel.err: [ 2759.265065] usb 6-3: device descriptor read/64, error -62
kernel.err: [ 2759.508779] usb 6-3: device descriptor read/64, error -62
kernel.info: [ 2759.748500] usb 6-3: new low-speed USB device number 4 using ohci-pci
kernel.err: [ 2760.156027] usb 6-3: device not accepting address 4, error -62
kernel.info: [ 2760.291871] usb 6-3: new low-speed USB device number 5 using ohci-pci
kernel.err: [ 2760.699382] usb 6-3: device not accepting address 5, error -62
kernel.err: [ 2760.699421] usb usb6-port3: unable to enumerate USB device

and with lsusb outputting this:

Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 07d1:3c0a WiFi Dongle
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 045e:0745 Mouse/Keyboard BT Dongle
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Reading up on the subject seemed to confirm that it was something I shouldn't have bought, and the closest I've got to a better understanding was with this question (link) which I can't comment.

So building up on the answer there, can anyone please explain a bit more in detail what for and where micronucleus would be needed?

Alternatively, is it possible to go with something as easy as installing the drivers and plugging it into the Arduino IDE?

7
  • I'm in the same boat, or will be soon when the bits arrive from China. The 1€ price tag is hard to resist! Commented Sep 14, 2016 at 14:52
  • 1
    I got a couple of Chinese USBASP programmers from eBay at 2.78 € each, with free shipping. They work great for programming ATtinies, and they are supported by avrdude (the programming tool used by the Arduino IDE). But you have to connect 6 wires... Commented Sep 14, 2016 at 17:33
  • It would be handy if you specified which specific item you bought. Most likely it's just the ATTiny breakout board that has the ISP-header brought out, and has a micro usb port, that is only used for power. I'd get a UsbASP programmer. They work perfectly for me.
    – Gerben
    Commented Sep 14, 2016 at 18:16
  • If the board has a real ISP header, that would actually be a nice addition to the usbasp. No need to use the board's USB connector though, as the chip will be powered by the usbasp through the ISP. Commented Sep 15, 2016 at 8:20
  • This is unanswerable without a picture of the other side of the board. Without that, and with no documentation, there's little reason to believe there is any IC on this capable of functioning as a USB device. The provided failure message are merely a result of having a pullup resistor on a USB data line, without necessarily meaning any USB interface engine connected. As this is in unanswerable form it should be closed Commented Oct 15, 2016 at 15:29

3 Answers 3

2

Micronucleus is a bootloader - in the same way that Optiboot is a bootloader used on the Uno. It provides the USB connection to program the chip.

Without it you can't do anything at all with that, since the USB port just plugs direct into the ATTiny chip. With no software on the chip the USB port doesn't do anything. It's kind of a catch-22 situation - you need software on the chip in order to put software on the chip.

In essence Micronucleus turns the ATTiny into a kind of Mini Leonardo.

You need to first put Micronucleus on the chip (which you can do with an Arduino as an ICSP programmer) and then once that is installed you should be able to start using that little board with the chip to program it.

Since you're on a decent operating system there's no need for "drivers".

2
  • Crystal clear, thank you! So basically the socket on the board is not meant for the "end-product" MCU, but rather for the programming MCU... If that's the case, that sucks. Would some other board (Sparkfun's i.e.) instead provide a direct usb2tiny interface? EDIT: I will of course make do with what I have now, but the whole point was to remove all the wiring from the process and in this very moment I simply shrunk the Mega I was formerly using to program the tinys...
    – nxet
    Commented Sep 14, 2016 at 13:28
  • You want a board that has a built-in hardware programmer. It will have a second MCU on the board to do the programming. If there is no second MCU on the board then all you have is a fancy socket like this one.
    – Majenko
    Commented Sep 14, 2016 at 17:08
2

It isn't clear to me what you need to do- both for specific chip and your programming needs.

You can easily program an ATTiny with just an arduino and a breadboard. A breakout board and a socket are fun, you could also build or buy a permanent shield for this.

With that breakout board (you could just use a breadboard, too) and an Arduino, you can program your ATTiny from the ArduinoIDE or from avrdude (if for example you have just a .hex file from an Instructable. You will find that the Arduino IDE doesn't support uploading .hex files directly, but since the IDE calls on avrdude for all the actual work- you can invoke avrdude from the command line to upload your .hex file to the chip).

If you mention which ATTiny you need to program, I've missed it.

Overall process is: From the Arduino IDE, add these core libraries from: Tools/ Boards/ Boards manager

github.com/damellis/attiny This will get you:

ATtiny 25 (8 pin)
ATtiny 45 (8 pin)
ATtiny 85 (8 pin)
ATtiny 24 (14 pin)
ATtiny 44 (14 pin)
ATtiny 84 (14 pin)

Add: github.com/MCUdude/MicroCore (this will need manual install, instructions are provided)

and sourceforge.net/projects/ard-core13/files/latest/download (I forget if this can be added from the IDE or needs manual install).

if you need ATtiny13 support. Each has some advantages the other does not.

You will want to use IDE 1.6.x.

Wire up your breakout board (or breadboard) to your Arduino appropriately for the ATTiny you are using. For example, according to the wiring diagram here for the ATTiny85: highlowtech.org/?p=1695

And from there you should be able to program your ATTiny so that it can run independently from your Arduino.

If you need to upload a .hex file to your ATTiny check the examples here: arduinodiy.wordpress.com/2012/09/11/programming-hex-code-on-an-attiny85-with-the-arduino/

You can do that by using the Arduino as an ISP and then uploading the .hex file to the ATTiny using AVRdude. You'll have to tweak the avrdude command line params a little specific to your situation.

I've just done programming of ATTiny13 using an Arduino Uno, a breadboard, and 6 jumper wires just fine. Both uploading sketches I made in the Arduino IDE as well as using compiled .hex files that were part of an Instructables.com project I was building worked fine.

If you need to upload a program to a board and then use that board to mass-produce many identically programmed ATTiny without using an Arduino, adafruit as a solution, as does shop.myavr.com. I can't justify the expense but they look really neat. Using the Arduino as ISP for this of course works as well.

htlinux has a shield for Arduino's that is really inexpensive and comes with sockets for many Atmel pinouts:

www.htlinux.com/product/attiny-isp-shield/

I ordered one and it isn't here yet, it took a month to get the shipping notice, but it looks like a convenient all-in-one solution. It still needs an Arduino to act as programmer. It would meet your requirement of "removing all wiring" if you are find with a shield.

You could easily build your own shield with a proto board, too. http://www.instructables.com/id/ATtiny-Programming-Shield-for-Arduino-1/?ALLSTEPS

I hope this helps! I spent a while figuring out all this stuff, hopefully having many items in one answers helps the next person looking to program ATTiny with Arduino. I'm working from OS X, it should be even easier from Windows or Linux.

2
  • 1
    Thanks for all the detailed info, I'm sure they will come in handy to many, but I'm actually past that point. I can successfully program tinys (45/85) with the setup you described. With the board as from topic I was instead hoping to remove all the extras and have a single socket 'plug and program' solution for this.
    – nxet
    Commented Sep 15, 2016 at 14:28
  • Sounds good. So you want a stand-alone programmer? As Majenko indicates, you can build one or just buy one. I think you are looking for something like: learn.adafruit.com/mass-avr-isp-programmer Commented Sep 15, 2016 at 15:00
1

Judging by the picture it's just a board.

If it is anything like this link on eBay (the first hit for "attiny programmer board") then this is the description:

Development board supporting chip:ATtiny13A / ATtiny25 / ATtiny45 / ATtiny85 etc

It supports the named chips, it doesn't have them on it.

I presume you are supposed to do a few things with it:

  • Purchase an ATtiny85 (or similar) chip
  • Install it on the board
  • Solder in an ICSP header onto the 8 pins on the right
  • Program the Micronucleus bootloader using a suitable other piece of hardware (like a ICSP programmer)
  • Then use the board as a ATtiny development board.

It's not responding because there is no chip there (unless you can see one on the other side). That's why it's cheap. You are buying a board, not a microcontroller on a board.

This other link on eBay for a slightly different board (for the same price) shows that the other side does not have a processor on it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.