?

Log in

No account? Create an account

Previous Entry | Next Entry

Atrocious Arduino Adventures

And another goodie for 2016 - this time, it started with an innocent "Geez, let's have a bit of fun with the Arduino for a change!"

Note that I got myself one of these back when they were still (rather) new-ish and my device is not the most up-to-date one. But I did use it with the arduino studio back in the day and I knew it to work just fine.

The reasoning: I'd love to do some "blinking christmas ornament" (more about that later *if* I can get things running in time)


I already had the current version of the Arduino Studio installed on my laptop (Linux) since I want to use a compatible wifi board as a demo object. Easy enough, right? Plug in the original Arduino NG board, select it in the board list, push "upload" with the blinking sample and check the output. Right? Noooo... we have 2016! Working stuff is so yesterday's news!

For some reason, the half-finsihed program I had put into the chip ages ago was still there and the serial monitor did interact with it. So I knew: the chip DOES work. Fine. But: Upload? What? Where? How? No way! It just would not upload any new sketch to the device.

After some reading, I came to the conclusion: the Arduino bootloader must be either broken or I did use the STK500 dev board I got to program the thing "native" i.e. without the Arduino layer. Either way: Re-flash the boot loader and go on. Easy, right? Weeeeelll...

Turns out you need an external programmer for that. The ISP interface of the Arduino can't quite do it.

But, oh joy! They have the STK500 board in the boards list and offer "write bootloader" as a menu item!
...alas, it did not so much as write a single bit.

I did try several ATMega168 chips that I got as spares (again, back in the day) and neither showed any signs of working in the Arduino board.

Another idea popped into my head: There's circuits out to use one arduino to program another - and I *do* have that compatible thingy around! Well... that might have been a mistake since that compatible device is only "pin" compatible, not "voltage compatible" and it seems that the 5V chip knocked out one of the IO pins on the 3.3V chip... darn. Didn't expect that. Bad thing is: it's the "TX" line of the chip that has now a level of 0 or 0.7V instead of 0 and 3.3V. Which means that whatever the chip is sending on the programming port, the software doesn't get it. And that means: bricked... unless I can splice a level converter into that line... hmmm... but that's a project for another day. Replacements ordered, lesson learned, moving on.

Note that I "wasted" quite a lot of time (several hours) at this point already.

The next idea is what I should probably have done all along: get AVR Studio up and running and re-program that chip manually in the STK500. Sounds easy, doesn't it?

Weeeelll... AVR Studio is now a 850MB download... that installs Visual Studio as hosting environment... The setup in my VM took about two hours, including searching for specific Windows updates and a driver for the USB->RS232 cable that I have.

And all that just so I can select a "burn image" and "edit fueses" dialog.

But: FINALLY! The Process of burning that image went rather smooth... Plugged in the Arduino into my Linux box again, programmed the "fade" demo and: Woohoo! It's ALIIIIVE!

IMG_20161217_190458.jpg

...and it took only a bit over a day!

Comments

( 1 comment — Leave a comment )
c_eagle
Dec. 19th, 2016 08:58 am (UTC)
I knew you could do it!
( 1 comment — Leave a comment )

Latest Month

September 2018
S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
30      

Tags

Page Summary

Powered by LiveJournal.com
Designed by Katy Towell