How to turn ATTiny PB5 RESET and I/O pin into a regular I/O PIN? Changing RSTDIS

Hi How can I change the RSTDISBL fuse bit in order to turno PB5 into a regular I/O pin? I am using arduino as ISP and I am programming using arduino approach

Thanks

Once you disable the RESET pin (to use it for I/O) you can no longer use an ISP programmer.

Might be time to invest in a High Voltage Parallel Programmer.

Oops, that is right, tiny85 Pin 1 is connected to UNO Pin D10.

Is it possible to program it with a avr dragon or ISP cable that come with STK300, after turning the RSTDIS fuse?

You can't use ISP once you disable the reset pin, no matter what ISP programmer you get.

You require a High Voltage programmer.

You can also make the following shield that turns a arduino to a high voltage programmer.. Here it is: http://mightyohm.com/blog/2008/09/arduino-based-avr-high-voltage-programmer/

That link wouldn't really help much for an Attiny85. This would however: http://www.rickety.us/2010/03/arduino-avr-high-voltage-serial-programmer/

The updated version now supports t85 also. http://mightyohm.com/blog/products/hv-rescue-shield-2-x/

[quote author=Tom Carpenter link=topic=178971.msg1326824#msg1326824 date=1374608747] That link wouldn't really help much for an Attiny85. This would however: http://www.rickety.us/2010/03/arduino-avr-high-voltage-serial-programmer/ [/quote]

Well my link describes how the project started etc.. If you read on you can see at the bottom that there is a link with an updated version like the one posted by hiduino which support t85 and t2313... You can't expect me to give the thread starter everything on a silver plate ;)..

[quote author=Tom Carpenter link=topic=178971.msg1326700#msg1326700 date=1374603963] You can't use ISP once you disable the reset pin, no matter what ISP programmer you get.

You require a High Voltage programmer. [/quote]

or, as mentioned in the other thread, a tiny arduino bootloader which allows programming with reset pin as io and no 12v required.

Bootloaders can also be used. But to go down that route you have to tune the internal oscillator and hope that it doesn't detune itself.

I modified a version of Optiboot to work properly with Attiny devices. The bootloader includes CodingBadly's TinyTuner sketch to allow you to tune the oscillator and have the tuned value be loaded automatically as part of the bootloader routines. Once the oscillator is tuned, the tinyTuner sketch code is deleted meaning the bootloader takes up only 576 bytes of flash. The bootloaders can be found here: https://github.com/TCWORLD/ATTinyCore/tree/master/tiny/bootloaders/optiboot

Many thanks. I dont know nothing of High Voltage programmers and I have to read about it... But it seems there is other options (you wrote about) and so i have to study them too. Thanks

alexe100: Many thanks. I dont know nothing of High Voltage programmers and I have to read about it...

They don't work with the Arduino IDE.

john1993: [quote author=Tom Carpenter link=topic=178971.msg1326700#msg1326700 date=1374603963] You can't use ISP once you disable the reset pin, no matter what ISP programmer you get.

You require a High Voltage programmer.

or, as mentioned in the other thread, a tiny arduino bootloader which allows programming with reset pin as io and no 12v required. [/quote]

Doesn't that mean you just have to reserve a different pin for the bootloader, making it moot?

Well, There is the power pin...

Doc

fungus: Doesn't that mean you just have to reserve a different pin for the bootloader, making it moot?

Nope, just add jumpers. That way you can disconnect the jumpers when programming, and reconnect them when done. I've used an Attiny85 this way before, it works quite well.

Also, if the pins chosen are ones used as outputs then depending on the applications you can probably get rid of the jumpers.

But if you think about it, if you need a HVP, then you would need to be able to isolate all 5 pins in order to program it. For a bootloader you only have to be able to isolate 2.

If you are using a DIP package it doesn't matter as you can simply pull the chip, program it, and then plug it back in.

[quote author=Tom Carpenter link=topic=178971.msg1327617#msg1327617 date=1374667029] Nope, just add jumpers. That way you can disconnect the jumpers when programming, and reconnect them when done. I've used an Attiny85 this way before, it works quite well. [/quote]

Assuming all pins are being used for something else: How do you tell the chip you want to upload a new program?

The same way you tell an Arduino when to program, you reset it. If you don't have a reset pin, the easiest way to do that is to do a power cycle (turn the power off and on again just before programming). That's how I do it for my Attiny84's that have all 12 pins used for something else.

[quote author=Tom Carpenter link=topic=178971.msg1327400#msg1327400 date=1374654453]But to go down that route you have to tune the internal oscillator and hope that it doesn't detune itself.[/quote]

i dont see how this effects clock source at all. in any case im guessing nearly all tiny chips, certainly the 8 pin ones, use internal anyway. in fact some like t13 have no abilty to use external crystal at all.

anyway you have pretty much correctly summed up all the details of using this method. i would only add that manual power cycle is not the only way (even though we must remember manual reset was how original arduino worked). it can be done automatically via the same handshake bit connected to chip vcc instead of reset pin. in fact standard pc port has more than enough drive to power these chips. for weak ftdi type a simple transistor buffer works.

john1993: i dont see how this effects clock source at all. in any case im guessing nearly all tiny chips, certainly the 8 pin ones, use internal anyway. in fact some like t13 have no abilty to use external crystal at all.

Bootloader = Need for accurate Baud rate = Need for tuned oscillator. I am assuming that an external crystal is not used.

true.

mostly needed because they come set for 8mhz which, as was mentioned elsewhere, is a terrible choice for serial. recently i did run a few hunderd new t24 through my own version of tuner and noticed none deviated more than 1 or 2 percent. almost concluding its not necessary to individually tune but instead just add a fixed value to osccal in the startup code.