I am using the Arduino IDE as an ISP programmer to program my ATtiny44 IC. Unfortunately, I ran out of pins, so I want to use the reset pin as I/O. I read several articles online that says it is possible and even the datasheet says so.
I have a high voltage programmer as well. I wrote the code in the Arduino IDE and then used its hex file to program it using the high voltage programmer (TNM PROGRAMMER).
After I program, the IC stops working.
////////////////////////////////////EDIT/////////////////////////////////////
const int led = 0;
const int reset_led = 11; //physical pin 4 on attiny
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(led, OUTPUT);
pinMode(reset_led, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(reset_led, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite (led, HIGH);
delay(1000); // wait for a second
digitalWrite(reset_led, LOW); // turn the LED off by making the voltage LOW
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
New fuse bit setup:
////////////////////////EDIT 2 /////////////////////////////////////////
Now, the led on reset has turned off completely while the another still blinks. Powering my attiny44 with 5v.Code is same as before
////////////////////////////////EDIT 3////////////////////////////////////
#include <avr/io.h>
const int led = 0;
#define ledd PB3
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(led, OUTPUT);
DDRB |= (uint8_t)(1<<PB3);
pinMode (ledd, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
PORTB |= (uint8_t)(1<< PB3);
digitalWrite (led, HIGH);
digitalWrite (ledd, HIGH);
delay(1000); // wait for a second
PORTB &= ~((uint8_t)(1 << PB3)); // set PB3 to "low"
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
This code worked miraculously for me, Thanks to @thebusybee.
/////////////////////////////EDIT 3/////////////////////////////////////////
The PB3 pin is pin11 in arduino.