loading

AVR Help

I finally have all I need to start programming, I have a programmer (this one to be exact)
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&rd=1&item=130202441672&ssPageName=STRK:MEWN:IT&ih=003
and I have a bunch of attiny13v
You can talk to me as if I know nothing about microcontrollers and programming.
I have googled for about 10 minutes and havn't found a tutorial or anything that can help me. I just want to learn the most up to date stuff, like I don't want to learn assembly if I can use C (I don't know C). Please, I need help.

Also I need help of how to setup everything on a breadboard, like what pin of the 10 pins from the programmer go to which pins of my attiny13 and where to apply how much voltage.

sort by: active | newest | oldest
1-10 of 16Next »
twenglish19 years ago
hey im new to programming too and i was wondering if anybody knew how to use a push button switch with the attiny13
to like turn an led on and off
Yes.

So let's say you want to have a button and an LED connected to a tiny13, so that when you push the button, the LED goes on. Then if you push the button again, the LED goes off. Sorta like any number of electronic gadgets you can buy. You'd have a circuit that would look something like the one attached: LED connected between one pin and GND through a resistor, another pin connected by the button to GND, with a "pull up" resistor to V+ to keep in the high state when the button isn't pushed.

Then your software will logically look sorta like this psuedocode, regardless of the actual language you use:
if buttonPushed    if (LED is on) then turnLEDoff    else turnLEDon

buttonPushed checks the IO pin (set to be an input) with the button to see if it's low or high. It gets slightly complicated because switched "bounce" if you look at them in enough detail; each button press will look like MANY separate signal state changes, so the routine really has to check "see if the button stays in the 0 state for some continuous amount of time.") And then you don't one LONG button press to make the LED blink. so somewhere you have to wait for the button to get un-pressed (which also bounces.)

Are those enough hints?

avrswitch.png
im using C could you help me with the code cause im really new to it and only know a few things about it
yes that helps thanks for an answer
guyfrom7up (author) 9 years ago
Bringin this back up Can anyone recomend a good AVR book? something like under 30 bucks that has examples, explanations... Stuff that explains ADCs and how to program various things?
It's hard to beat the datasheets, once you get used to reading datasheets.
Also, see the articles and Tutorials at AVRFreaks.net
gmoon9 years ago
Here's the pinout for an STK200/300 ISP header.

You'll be able to find the MOSI / MISO / SCK / RESET pins on the attiny13. Add a 10K pullup on the RESET pin and they recommend a 10uF cap between Vcc and GND for every AVR, and you'll be good to go.

C will work work the attiny13 (unlike the 11, 12, 15 and 28--they don't have any volatile memory, other than registers), although with only 64 bytes of ram you'll be limited in the "depth" of function calls, variables, etc.

The attiny13V has a wide voltage range (1.8 - 5.5V) so it's easy to power. Looks like your programmer works in the 2.7 - 5V range.

Also looks like you supply power for the board project (programmer doesn't supply any.) So I doubt the 5V+ pin on the STK200/300 would be active on the programmer--that's OK, so long as both project board and programmer share the GND...
guyfrom7up (author)  gmoon9 years ago
check check... and check, now my breadboard is already! Thanks!

I just found this tutorial and I'm downloading a buttload of stuff
http://tinkerlog.com/2007/06/03/programming-avr-with-eclipse-and-winavr/

is all that info good?
Hmmm I guess Eclipse is a dev environment, and I don't use it. That looks like mostly like instructions on how to configure the Eclipse IDE to work with avrgcc (which might be worth trying.)

I also don't know if you're using Windows or Linux... Assuming Windows (I mostly use Linux.) But I have AVR Studio 4 installed, too.

AFAIK, AVR Studio 4 still includes a current build of Winavr, which includes avrlibc, avrgcc, a makefile builder, etc. If not, here's the website (and help) for Winavr.

If you use Linux, you can usually use "synaptic" and install all the AVR packages or debs easily. In use, it's definitely a different approach than using AVR Studio, tho. I was pretty comfortable with gcc before I picked up an AVR, so it was natural, in my case...
1-10 of 16Next »