ATTiny 45V runs code when connected to Arduino, but doesn't run it without

I wrote some code to put on my ATTiny 45V. The code runs fine with the Arduino attached, but as soon as I try it without the Arduino, it doesn't work.

Is something wrong with my ATTiny?

Lack of power?

I've tried both 5 volts from my laptop's USB and 3 volts from a button cell battery.

(deleted)

spycatcher2k:
Please show your wiring or schematic, and how you have connected it up rather than how you think you have connected it up.

I have the Arduino connected to the ATTiny based on this guide: http://www.instructables.com/id/Program-an-ATtiny-with-Arduino/

And on pin 5, I have a 220 ohm resistor connected to an LED connected to ground.

(deleted)

spycatcher2k:
OK - We know you have it connected correctly to the arduino - how are you connecting it when you are not using the arduino - a picture would help.

If you have a multimeter, you can check the voltage between pins 4 and 8 (Gnd and +5V)

if you don't, use an LED with a resistor.

Measure on the legs (it may be as simple as a loose connection)

That can't be it. All I'm doing is disconnecting one of the power pins to the Arduino and holding the USB 5v power to the pins. I'm not even moving the chip.

laptopdude90:
All I'm doing is disconnecting one of the power pins to the Arduino and holding the USB 5v power to the pins. I'm not even moving the chip.

So the Arduino processor is connected to the circuit but not powered?

(deleted)

Yes.

I've also tried it in my own circuit board, so it hasn't been connected at all. The only thing is that my board gives it only 3v.

There is a high probability you will damage your Arduino processor doing that. If it is part of a powered circuit it needs to be powered.

Oh wow. I rebuilt the circuit, completely disconnected from the 'duino, and it worked!

Except now it won't work off a 3V CR1220 battery. Only off of 5V usb.

Edit: Battery was just crappy.