Go Down

Topic: Reset (Read 1 time) previous topic - next topic

baum

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

James C4S

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.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

baum

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

liudr

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

James C4S

Quote
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.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

baum

So then what is RESET?

James C4S

I capitalized the word for emphasis.  I assume from your first post you are familiar with the concept of resetting a microcontroller.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

baum

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!

James C4S

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.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

floresta

Quote
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

Graynomad

Quote
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
Rob Gray aka the GRAYnomad www.robgray.com

retrolefty


Quote
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.


Go Up