0

I have bought this cheap AVR Programmer Board and I thougth that I would be OK just plugging it into my USB port. Then after I did that nothing happened so I passed last 4 hours trying to understand what was going wrong. I learned that ATTiny85 microchips often come with no bootloader. cheap AVR Programmer Board So first I tested it with Arduino as ISP and simple blink code. It worked. Then I downloaded micronucleus and i flashed it via Arduino as ISP. I think this process worked pretty well as the output show

> avrdude -C ../etc/avrdude.conf -c arduino -p t85 -P COM3 -b 19200 -U flash:w:/micronucleus/firmware/releases/t85_default.hex
 
 avrdude: AVR device initialized and ready to accept instructions
 
 Reading | ################################################## | 100%
 0.01s
 
 avrdude: Device signature = 0x1e930b (probably t85) avrdude: NOTE:
 "flash" memory has been specified, an erase cycle will be performed
          To disable this feature, specify the -D option. avrdude: erasing chip avrdude: reading input file
 "/micronucleus/firmware/releases/t85_default.hex" avrdude: input file
 /micronucleus/firmware/releases/t85_default.hex auto detected as Intel
 Hex avrdude: writing flash (8166 bytes):
 
 Writing | ################################################## | 100%
 0.09s
 
 avrdude: 8166 bytes of flash written avrdude: verifying flash memory
 against /micronucleus/firmware/releases/t85_default.hex: avrdude: load
 data flash data from input file
 /micronucleus/firmware/releases/t85_default.hex: avrdude: input file
 /micronucleus/firmware/releases/t85_default.hex auto detected as Intel
 Hex avrdude: input file
 /micronucleus/firmware/releases/t85_default.hex contains 8166 bytes
 avrdude: reading on-chip flash data:
 
 Reading | ################################################## | 100%
 0.09s
 
 avrdude: verifying ... avrdude: 8166 bytes of flash verified
 
 avrdude: safemode: Fuses OK (E:FF, H:DF, L:62)
 
 avrdude done.  Thank you.

Problem that I'm now facing is that when I try to upload a code using ATTiny Development Board via arduino IDE (selecting Attiny85 digispark default 16.5mhz) and it asks me to plug in the device, device is not recognized.

I already installed drivers downloaded from github release section of DevicestumpArduino repository, tried installing micronucleus configuration driver via zadiag like i read in this question but nothing worked. What am I missing?

3

From your AVRDude output:

avrdude: safemode: Fuses OK (E:FF, H:DF, L:62)

It does not appear that you have programmed the AVR configuration fuses.

One for thing, E:FF, is extended fuse value 0xFF, which is missing the SELFPRGEN (self-programming) fuse that would allow Micronucleus to load your code onto the AVR, that is allow the AVR to execute instructions to program itself. So, assuming it managed to show up on USB, you wouldn't actually be able to use it to put code on your chip.

You can see what they should be where the makefile fuse target defers to your t85_default configuration:

FUSEOPT = -U lfuse:w:0xe1:m -U hfuse:w:0xdd:m -U efuse:w:0xfe:m

The fuses that are actually preventing it from showing up on USB are more likely the clock related fuse bits in the low fuse byte. In particular CKDIV8 (factory default) is set to divide-by-8 where it is not in the makefile. The CKSEL bits are set to 0x2 (factory default) for the 8Mhz internal RC oscillator whereas the makefile wants them to be set to 0x1, for internal PLL (phase locked loop) that generates higher clock rates from the RC oscillator. In short, your chip is running at 1MHz rather than 16Mhz. The Micronucleus code may also be written such that it needs PLL for bit-banging USB, though I haven't looked into that to be certain.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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