Archive for April, 2007

ISP quick tip

23-04-2007

Low frequency main clock…

If you use simple ISP programmer (like stk200) and your AVR microcontroller stops responding after changing clock frequency to very low – don’t panic.

I’ve got similar problem with avrdude – it just can’t detect atmega88 after I change clock speed to about 100kHz. Because I’m using the power save mode (those with timer2 clock enabled) changing the main clock prescaler gives me about 100-200 uA less current consumption. What I tried to do was to change system prescaler before the sleep mode (I’ve changed timer2 prescaler so timer worked with same speed in normal and sleep mode).

Avrdude can’t detect device because it’s to inpatient :-). All you have to do is talk to your AVR a bit slower. I’m afraid it can’t be done with avrdude (at least you probably may put some delays into avrdude code to make it work slower, avrdude is an open source utility, so use the source luke :-) ). Theoretically AtmelISP had some options to change frequency of programming avr with stk200, but I could’nt find any working with atmega88 and stk200 aplication on Atmel site.

Use uisp!

Uisp is an isp programmer, like avrdude. I’m not sure if uisp supports newer avr microcontrollers (I’m not so sure if “new” is the right word here) like atmega88, but I was able to erase flash memory with atmega8 parameter. After that avrdude starts detecting my atmega.