14 June 2010

RSTDISBL fuse and Serial Downloading/Programming

My fun with two samples of ATmega168 microcontrollers was very short. For my target application I wanted to check if PortC's 7 bits would allow me to read a 3x4 keypad: I needed to disable the /RESET function on pin1, so unsettimg RSTDISBL fuse.

I own a parallel port "serial download" programmer, which works perfectly fine both for ATtiny2313 and ATmega168 (mind different chip size and pin assignments, of course). I could unset the RSTDISBL fuse but then I was locked out of chip reprogramming.

Why? Why!! Well, it turns out that it's not stated in the datasheet, but once RESET is disabled, serial downloading is not possible anymore. You need either a High Voltage Programmer or an ISP or a JTAG cable (the latter two might not be supported by the chip itself).

Now I have two mega168, perfectly sane but that I cannot reprogram unless I build a HVP. At the time being I have chosen to order new mega168 and invest my time on the code instead of building the HVP.

Well, actually I have re-built my parallel port programmer with a DIP28 socket and a longer cable. Pics will follow in a future post.

Note, for search engines ;-), this observation applies to Atmel's ATtiny2313, ATmega48, ATmega88, ATmega128, ATmega328 chips and variations. To others probably