I can’t believe it’s been a month since my last entry here. In that time I’ve enjoyed my vacation, but like all things came to an end and I’ve been back for two weeks already.
Two weeks, two videos. The last one was particularly interesting, where the Raspberry Pi and an Arduino ATTiny85 joined forces. Just goes to show how small the microcomputing world can be!
I moaned a bit that my ATTiny85 module (without any USB to Serial chip) was no longer recognised by my PC and I just got “The last USB device you plugged in went foobar“, (I paraphrase the Windows’ actual message, obviously).
Almost immediately you guys reminded me of the old adage “Don’t assume, or you will make an ass out of you and me”. Well, I’m the ass, as I totally assumed the Tiny85 would come complete with a bootloader that would allow me to use it. It never occurred to me that the (clone) Digispark board would be either bootloader-absent or contain a bootloader that wasn’t suitable. Doh! (Slaps forehead). Every Arduino-based module I’ve ever bought has both bootloader and the blink program installed (so far) except for some naked ATmega328P chips. Hence my assumption. Doh!
Anyway, I’ve downloaded the Micronucleus bootloader and used the avrdude utility (normally called in the background by the Arduino IDE compiler routine) with various parameters to upload a sketch to it and this is what I got:
Plug in device now… (will timeout in 60 seconds)
> Please plug in the device …
> Press CTRL+C to terminate the program.
> Device is found!
connecting: 16% complete
connecting: 22% complete
connecting: 28% complete
connecting: 33% complete
> Device has firmware version 2.3
> Device signature: 0x1e930b
> Available space for user applications: 6522 bytes
> Suggested sleep time between sending pages: 7ms
> Whole page count: 102 page size: 64
> Erase function sleep duration: 714ms
parsing: 50% complete
> Erasing the memory …
erasing: 55% complete
erasing: 60% complete
erasing: 65% complete
> Starting to upload …
writing: 70% complete
writing: 75% complete
writing: 80% complete
> Starting the user app …
running: 100% complete
>> Micronucleus done. Thank you!
In other words: success! Windows still complained about an unknown USB device but at least I can now program directly using the USB socket on the board. No Arduino required (other than to flash the bootloader, initially).
Perhaps I should do a new video on how to do this, given that something has changed in the time I did my last video on the ATTiny85 Digistump drivers, almost two years ago. I was probably running Windows 7 at the time, come to think of it. Hmm.
It was, however, just as easy to program the ATTiny85 using an Arduino as ISP. Perhaps I should show both methods. Hmm.
And thank you to those who sent commiserations at the loss of my Raspberry Pi, once again all my own fault, as I tried to measure the 3.3-volt pin across from the 5v pin. When the two get shorted together only bad things happen. Scouring the internet to see whether my board could be salvaged (spoiler: no) it appears many people have done similarly silly things, including shorting the 3.3v or 5v pin to ground.
Electronic components can be fragile. I’ve killed a few MOSFETs just by handling them. But to kill an entire microcomputer board requires a special kind of carelessness. I’m now £35 the poorer (in fact, £70 as I bought two boards in case I ever did anything like this again and to have one for experimentation and one for my workshop automation project). So that’s all my ad revenue money from Google / YouTube from the last two months gone in a moment’s carelessness. Ouch. Double Ouch. Lesson learned, I hope.
See you in the next video, thanks for reading!