Sending data on the reset pin

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Please pardon me if this is in a FAQ somewhere, but I can't find it...

Could someone explain how the reset pin works as a normal port pin?

I've got a tiny45, not that it makes a difference in the concept.

My specific questions are:

1) if the reset pin (PORTB5) is configured as an input, how does the chip get reset?

2) if the reset pin is configured as an output, and I set it to low, won't that always cause a reset?

The answer to question 1 and 2 will probably answer #3 , but I'll ask anyway:

3) In my program, I've got PORTB5 configured as an output. I have no activity on the pin as my program toggles it with sbi and cbi. If I switch to a different port pin, I get the desired results.

My application needs all the pins, so can't just switch to another pin unless it's impossible, in which case I lose features I wanted.

Thanks for your help!

Kurt

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The function of PORTB5 is controlled by a fuse setting (RSTDISBL). Leaving this pin unprogrammed will cause the pin to act as a reset input. Programming the RSTDISBL fuse low will allow the pin to act as a normal I/O pin. In the latter case you would have no external reset (although you could still reset the AVR by using the Watchdog timer).

Dave

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In reading a bit more, seems like I would have to set the RSTDISBL fuse in order to use the RESET as a normal pin. But then, how do I pull out of it when I need to reprogram it (I'm using the STK500)?

Bottom line is I need to read up more on how fuses work, I suppose.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

But then, how do I pull out of it when I need to reprogram it (I'm using the STK500)?

Short answer: You don't. ;) It renders it somewhat OTP via normal ISP means.

Longer answer: If you have a DIP version and can plug it into the STK500, then you can use "high voltage programming". See the datasheet and the STK500 Help section of AVRStudio for a primer, then come back with any specific questions.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Dave & Lee!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

how does the chip get reset?
You can use the BOD to do the power on reset, so you will just lose the low voltage ISP functionality as Lee points out. As the chip is only an 8 pin device (ie does not have PARALLEL HV programming), can you make provision so that the reset pin can accept 12V? This way you can still do programming without removing the chip from the board.

Optionally you could put a removable jumper from your circuit to the reset pin so the high voltage programming will not destroy anything on the board. Thinking along the line of a single pin next to pin 5 (reset) of the ISP connector so that you MUST remove the link in order to plug in the programmer.

EDIT:
Fingers engaged before brain... :oops: I see that there isn't really a "standard" pin out for serial HVP, so you may need to make up your own I guess, the Dragon has a good guide for it, it will require 7 pins from what I can see.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly