Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: dunk on June 07, 2007, 04:07:24 AM

Title: programing ATtiny45 without reset pin.
Post by: dunk on June 07, 2007, 04:07:24 AM
hmm,
is this "Electronics" or "Programming"....

so i'm planning to make use of the ATtiny45.
it's perfect for my application if i can use all 5 I/O pins.
but one of the I/O pins is shared with the RESET function.

so here's the question: can i program using serial programming if i disable the RESET function (so i can use that pin as I/O).

the datasheet http://www.atmel.com/dyn/resources/prod_documents/doc2586.pdf (http://www.atmel.com/dyn/resources/prod_documents/doc2586.pdf) seems to suggest i can as long as i'm carefull how i power up the chip.

dunk.
Title: Re: programing ATtiny45 without reset pin.
Post by: dunk on June 07, 2007, 05:38:14 AM
hmm, now i read up on this a bit more it appears it is not possible to program serially after the reset pin has been disabled.

i missed this in the datasheet the first time round:
Quote
Both the Flash and EEPROM memory arrays can be programmed using the serial SPI bus while
RESET is pulled to GND.
so it appears the reset pin must be low WHILE the AVR is programmed.
i initially thought that it could be programmed AFTER a reset (which i was planning to do in software).

o well,
back to the drawing board.
need to find a way to multiplex 2 inputs.
or build myself a parallel programmer.
or maybe an AVR with more I/O pins.

dunk.
Title: Re: programing ATtiny45 without reset pin.
Post by: rgcustodio on June 07, 2007, 09:34:22 AM
AFAIK ISP requirements are also discussed in the this appnote:
http://www.atmel.com/dyn/resources/prod_documents/doc0943.pdf

For most AVRs to use the RESET line as I/O you will have to disable it via the fuse bits (RSTDISBL). Thus one can not reprogram an AVR once the RESET pin has been disabled. You will need to reprogram the AVR in parallel (high-voltage) mode.

If you wanna make your own high voltage programmer here's one:
http://www.scienceprog.com/avr-serial-and-parallel-high-voltage-programmer/

Go with an AVR with more IO pins!