Not working without isp

Hi,

I have a simple circuit with a potentiometer that my attiny reads and varies the duty cycle of a HIGH and LOW signal. For some reason, this thing is only working when my avrispmk2 is plugged in. The minute I disconnect, the thing doesn't work. I suspect it has something to do with reset pin but Im not sure whether to make it always grounded or always high. Plz help

Thanks!

Reset is active LOW so you generally connect it to Vcc with something like a 10k resistor.

my existing circuit has a 4.7K resistor between reset and Vcc and it still only works when I connect the 6-pin isp header. I measure the voltage across Gnd and Reset and i'm getting approx 3.8v. Is this okay? What is the programmer doing that I can emulate when I disconnect?

The ICSP header includes Vcc and Gnd. What power supply are you using?

The ICSP header connects to the SPI pins (MOSI, MISO, SCK). Are you using any of those pins for anything? Could be the ICSP is providing pull-up or pull-down on one of your pins.

Which ATtiny processor are you using? Which pins are you using for what?

I am using a benchtop power supply and giving 3.8v to pin 8 and pin 4 of the attiny13 microcontroller (Vcc and GND)

MOSI, MISO, and SCK connect directly to my ICSP header pins

My circuit has a 4.7Ohm resistor between VCC and Reset (pin 8 and 1 of the attiny13)

For some reason, if I probe reset and ground when programmer is connected, I am getting a constantly fluctuation voltage from 0v to 2.5v and back and forth.

Also, it seems to work for a second when I bridge Reset and ground. As soon as I disconnect the bridge, it works for a second and stops functioning. When I bridge it again and let go, it works again for a second until it stops again.

Thanks,
Rohit

So, what does your sketch look like?

my sketchLconst int analogOutPin = 0; // Analog output pin that the LED is attached to

void setup()
{
pinMode(analogOutPin, OUTPUT);

}
// the loop routine runs over and over again forever:
void loop()
{
digitalWrite(analogOutPin, HIGH);
delay(1000);
digitalWrite(analogOutPin, LOW);
delay(1000);
}

I managed to find out that the microcontroller stops working whenever I disconnect VTG or MOSI from the ISP. Im not sure why but these two pins always need to be connected for the chip to start working. Any ideas? could it be a crystal problem?

rkrishnan2012:
my sketchLconst int analogOutPin = 0; // Analog output pin that the LED is attached to

void setup()
{
pinMode(analogOutPin, OUTPUT);

}
// the loop routine runs over and over again forever:
void loop()
{
digitalWrite(analogOutPin, HIGH);
delay(1000);
digitalWrite(analogOutPin, LOW);
delay(1000);
}

I managed to find out that the microcontroller stops working whenever I disconnect VTG or MOSI from the ISP. Im not sure why but these two pins always need to be connected for the chip to start working. Any ideas? could it be a crystal problem?

It can't be a coincidence that Pin 0 is the same as the MOSI-pin. Will you please provide as with a schematic of how your connections are hooked up? "I'm assuming that you're using a attiny45/85". How does your fuses look like? And if you don't know then I assume that you used the tiny-arduino library to burn the fuses. Which option did you choose to burn the "bootloader" / fuses with?

Something that you can try is hookup the Reset pin to 5V through a 10kOhm resistor and see if that helps (it really shouldn't matter, because I already tried both 5V and 3.3V and it works in both cases) but at least it's something you could try.

You mentioned something about a crystal. Did you burn the fuses to use an external oscillator and maybe forgot to connect a crystal? Because the chip won't function at all without the oscillator.

Edit: here is a picture of the arduino pin-outs of the attiny45/85.