Problem with Tiny13 Input

I have the tiny 13 chip working as a speed controller with 1 input and two outputs. I now want to add a second channel which involves using PortB5 as an input and it doesn’t seem to work. I have found I need to unplug the ISP programmer as this uses this pin as the reset for programming. As a test all I did was moved the input signal from B4 to B5 and changed the input mask from 10h to 20h. I have written 0Fh to the DDR which should configure both 4 and 5 as inputs. Is there something more I need to do because this pin doubles as the hardware reset.

I am not sure if this is relevant but on a mega48 I used a couple days ago there was a fuse called something like “disable reset pin function / use pin as general IO” in the fuses list in AVR Studio. You may want to check and see if that is the case for your chip.

:!: Beware :!: If you disable the reset pin, you can no longer use serial programming (aka ICSP) to program the device. You must use a parallel programmer (more $$$$) to program at that point.

If you haven’t found it yet, I’d highly recommend that you check out [AVR Freaks. I’ve never seen a community help forum like it - I switched from pic to avr just because of that place!

Jerry](http://www.avrfreaks.net)

oh yeah, good point! The ICSP needs to put the MCU into reset and then immediately start talking to it in order to work.

I also recommend avrfreaks.net, great site.

Thanks for the help as you said I would need to disable the reset and this would make further reprogramming difficult. I now need to add more IO anyway so I think I will use two processors at £ 0.75 it won’t exactly break the bank.