Author Topic: programing ATtiny45 without reset pin.  (Read 4474 times)

0 Members and 1 Guest are viewing this topic.

Offline dunkTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
    • dunk's robot
programing ATtiny45 without reset pin.
« 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 seems to suggest i can as long as i'm carefull how i power up the chip.

dunk.

Offline dunkTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
    • dunk's robot
Re: programing ATtiny45 without reset pin.
« Reply #1 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.

Offline rgcustodio

  • Robot Overlord
  • ****
  • Posts: 217
  • Helpful? 0
  • Use "Search" and ye might find answers!
Re: programing ATtiny45 without reset pin.
« Reply #2 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!
The best thing one can do when it's raining is to let it rain. - H. W. Longfellow

understanding is the path to enlightenment

 


Get Your Ad Here

data_list