Strange avrdude problem & how to fix it

On August 31, 2010, in Tech, by tom

I was doing some development using an ATtiny26l micro and an Atmel AVRISP mk2 serial programmer tonight. I’ve been using the Eclipse IDE for C/C++ Developers with avg-gcc (via CrossPack for Macs), the AVR Eclipse Plugin, avrdude and a USB to serial dongle without a problem for the last few years, it’s not a bad environment when you get used to the eclipse quirks.

However tonight something went wrong, my Mac locked up and I had to turn it off and reboot. But on restarting I found that avrdude wasn’t working properly through Eclipse, it kept timing out.

I tried programming from the command line and it showed that while it was working, it was taking minutes to write what normally took seconds, and it was suffering from timeouts on reading back the data to verify the programming operation.

I tried different USB to serial dongles, uninstalled and reinstalled the FTDI driver, rebooted my Mac, tried a different power supply, tried programming different devices and tore my hair out – nothing appeared to fix the problem .

I then did some creative googling and found an entry on the evilmadscientist site that fixed the problem.

Head over to the site to see what I found in the context of the problem they had, but here’s what I did to fix my problem to restore normal programming speed on an ATtiny26L connected to a avrisp Mk 2 programmer via a USB to serial converter:

If avrdude is giving you grief by running slowly, eg takes minutes to program < 2k of memory in my example, open up the Mac OS X terminal and enter the following: $ avrdude -p t26 -c avrispmkII -P /dev/tty.usbserial-000041FA -tuF wait for avrdude to display its terminal mode prompt then enter avrdude> sck 10
avrdude> quit

And that’s all, avrdude should now return to normal service and program at its normal high speed.


Mac OS X Serial Terminal Programs

On April 28, 2010, in Tech, by tom

I do some embedded software development at home on my Mac, and as others in this situation know, it’s a Windows world out there. It’s fair to say that while there are some tools for embedded developers, there’s not a lot going around by way of free or open source embedded development tools.

Thus my choice of of Atmel AVR micro-controllers which are supported by the free and open avr-gcc based CrossPack development environment from Objective Development and eclipse C/C++ IDE with the AVR-eclipse plugin for an IDE. I use an Atmel AVRISP-Mk2 serial programmer with a USB-RS232 dongle and this works fine with Avrdude for programming devices. I also sometimes use Arduino and its development environment, and recommend it for anyone starting out programming micro-controllers.

However I have long been on the look out for a reliable, fairly simple serial terminal program for OS X for debugging purposes. It’s always useful to have serial terminal to display program flow information and register settings or to interact with the micro-controller, but I have had trouble finding one which suits my needs. I have tried the various “screen” command line tricks but found this lacking in flexibility, and I have tried ZTerm and found it unreliable, always messing up characters and I wasn’t about to go through the pain of setting up and using minicom. So the search continued.

Until today, when I found 2 new programs I’d not seen before: CoolTerm and goSerial. CoolTerm looks a little more full featured and polished at this stage and I’m happy with it’s performance. It’s more reliable than ZTerm from my short experience with it today.

Tagged with:  

2010 AFL Ladder Widget Now Available

On March 28, 2010, in AFL Ladder, by tom

Head over to the AFL Ladder Widget page to download the 2010 version of the widget!

Update: 11-04-2010

Version 2.0.2 fixes a small bug in 2.0.1 and drops the AFL website as a source of data (that site was causing timeouts) and adds another couple of websites to replace it.

I’ve submitted the new version of the widget to Apple to include on their Widgets download page, but it’s not up there yet. They have to check it out first.

I have removed the previous version from my server, if you try and download it you’ll get a file telling you to come to this site which, at least for now, is the only place to get the widget.

Tagged with:  

2010 AFL Ladder Widget – Stay tuned!

On March 7, 2010, in AFL Ladder, by tom

The footy season is about to start for 2010, and once again the AFL Ladder Widget is going to be available for footy fans.

As has been the case every other season so far, I will probably need to release a new version of the widget so that it displays the correct information for 2010. This is because the websites that the widget uses to download the ladder information from always change each year in ways I can’t predict prior to the start of the season. So I have to wait until the source websites have their 2010 ladders up before I can guarantee that the widget will work properly.

It’s a pain but the AFL and other sites don’t publish their ladder pages at the same address every year, they seem to want to change the addresses in non-obvious ways.

So stay tuned!

Tagged with:  

New AFL Ladder Widget!

On March 29, 2009, in AFL Ladder, by tom

The latest version of the AFL Ladder Widget is ready to download!

Head over to the AFL Ladder Widget page and download it from there, follow this link: AFL Ladder Widget.