AVR Freaks

AVR forum - About ATtiny13 PB5 control !

jc168 - Jul 18, 2008 - 10:17 AM
Post subject: About ATtiny13 PB5 control !
Is the PB5 (nRESET pin) different to other pins (PB0 to PB4) ?

I tried to toggle ATtiny13 Port B (line 127 to 142)
to generate 6 square waves. The PB0 to PB4 pins
are all right, but only PB5 (#1) pin
always is kept to HIGH.

Did I miss anything ?
Janoese - Jul 18, 2008 - 12:45 PM
Post subject: RE: About ATtiny13 PB5 control !
You might want to check your fuses.
In AVRstudio the fuse you need is called: 'RSTDISBL'. When you set this fuse you must be able to use PB5 as a normal i/o port.

Hope this will help you^_^
js - Jul 18, 2008 - 12:46 PM
Post subject: RE: About ATtiny13 PB5 control !
You have to set a fuse to disable the reset function and use that pin as general i/o.

>> WARNING << Once you do that ISP programming is no longer possible. You will need HVPP to reprogram the chip.
clawson - Jul 18, 2008 - 02:11 PM
Post subject: RE: About ATtiny13 PB5 control !
Quote:
You will need HVPP to reprogram the chip

Or, at a pinch, some kind of bootloader? (though it'll eat a fair quantity of the program space in such a small device)
danni - Jul 18, 2008 - 02:17 PM
Post subject: Re: RE: About ATtiny13 PB5 control !
js wrote:
>> WARNING << Once you do that ISP programming is no longer possible. You will need HVPP to reprogram the chip.


Or burn a bootloader into the AVR prior enabling PB5 as IO.

Then you need no HV-programmer, only a single pin connected to the PC-RS232.Wink


Peter
js - Jul 19, 2008 - 01:55 AM
Post subject: RE: Re: RE: About ATtiny13 PB5 control !
...but failing to have a bootloader the chip will go to "boot hill" as far as programming Smile
danni - Jul 19, 2008 - 02:36 PM
Post subject: Re: RE: Re: RE: About ATtiny13 PB5 control !
js wrote:
...but failing to have a bootloader the chip will go to "boot hill" as far as programming Smile


You should establish the bootloader in two steps:

At first burn the bootloader and try to burn some applications with the bootloader.

Then, if it works, use SPI-Programming a second time to burn the PB5 fuse.


I know two bootloader which support ATtiny13:

The Kasper Pedersen bootloader need only 48 words but can be damaged, if the PC connection fails during programming.

My bootloader need 202 words, but was failsafe, since all critical programming tasks are done inside.
So no removing of the bootloader jump or overwriting the bootloader can occur.


Peter
All times are GMT + 1 Hour
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits