1

I'm trying to program AtTiny13 using Arduino IDE. I have connected the atTiny to my PC using USBasp programer.

I want to write a simple blink application to test whether it works or not. Which pins should I blink?

1

You'll need an Arduino library that supports that chip, to make it appear in the Tools > Board list. The library docs will tell you which pins then correspond to which Arduino digital I/Os. From that you can decide which pin to attach an LED to (with resistor) and how to edit the blink sketch.

Example: http://www.instructables.com/id/Pimp-Your-Chocolates-with-Arduino-IDE-and-ATtiny13/step2/Program-the-ATtiny13/

1

Because pins 0 and 1 (physical 5,6) are PWM's you should keep them for later ... and you still have A3 and A2 for analogWrite so, you should use Pin 2 (Physical 7, next to +5V) like this :

add this in the setup function

pinMode(2, OUTPUT);

And add this in your loop function:

digitalWrite(2,HIGH);

In case you forget

For reference : SparkFun's Help guide

Remember : Physical pin "1", reset, has a dot marked on it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.