Reset

Many common MCUs (ATtiny's ATmega's etc) have a reset pin for programming them. The datasheets always talk about the "minimum pulse length." What is this, and how can you use the reset pin as a reset pin AND as a GPIO w/out triggering a reset?

Thanks!
baum

In short, you can't.

From the datasheet: "If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the electrical char- acteristics of PC6 differ from those of the other pins of Port C.

If the RSTDISBL Fuse is unprogrammed, PC6 is used as a Reset input. A low level on this pin for longer than the minimum pulse length will generate a Reset, even if the clock is not running. The minimum pulse length is given in Table 28-12 on page 323. Shorter pulses are not guaran- teed to generate a Reset."

The RSTDISBL (reset disable) fuse determines if the pin is a Reset or I/O.

So in my projects, I'm better off not using PC6 and just using the other 5?

Just tuned in to this thread. Thanks James. That was very clear. I'm taking notes. :slight_smile:

So in my projects, I'm better off not using PC6 and just using the other 5?

Well, "better off" if you want the ability to RESET the processor. If not, then it doesn't matter.

So then what is RESET?

I capitalized the word for emphasis. I assume from your first post you are familiar with the concept of resetting a microcontroller.

Reset is like the reset button on arduino (which is wired directly to reset pin). But why do I need to use reset w/ Arduino ISP? (which I will be using).

Thanks!

The ISP programs the microcontroller's on-board flash ROM. To make sure the processor is doing nothing while this occurs, the processor must be held in Reset.

But why do I need to use reset w/ Arduino ISP? (which I will be using).

You cannot program the chip using the ISP (ICSP in Arduinospeak) pins without the reset function enabled. If you want to use the reset pin for I/O then you have to program the chip via a bootloader.

Don

If you want to use the reset pin for I/O then you have to program the chip via a bootloader.

Or use high-voltage programming, although I admit that's something most Arduinoites would not be into.


Rob

floresta:

But why do I need to use reset w/ Arduino ISP? (which I will be using).

You cannot program the chip using the ISP (ICSP in Arduinospeak) pins without the reset function enabled. If you want to use the reset pin for I/O then you have to program the chip via a bootloader.

Don

Even with the bootloader, without a reset function the arduino auto-reset-before-uploading function will not work, so you will be trying to plug it into the USB (to get the power-up reset to bootloader) at just the right time to catch the upload handshake. I don't think that would work often enough before one gives up in disgust.