Author Options:

C++ (attiny/mega) programming language tutorial? Answered

where can i find one?
one thats for absolute beginners, and with examples on how to use the code.
i recently started using these, but ive just used codes from others, and i'd like to get onto writing code myself.


do you know how to program in c?  Or are you totally new to this?

completely new, i know how to get the codes into attinys, but not how to write them.

btw, i use programmer's notepad for that...

so you have avrstudio4 and winavr downloaded, right (I'm assuming you're using windows)

I'll post a little tutorial video later today

im using windows XP mostly, but one of the computers i use has vista -.-"

and i downloaded winavr...

ty for the vid

alright, i don't have time to post a vid or anything cause my mom's being a complete b**** and pretty much just disowned me

this is all you need to know

writing code for avr's is almost exactly the same as normal c++  everything in c++ applys to avr microcontrollers.  So google for a c++ tutorial

there are things called registers in avrs.  each register is 8 bits long (as in 8 binary long, like 01001100 or something like that) and each register does different things.

by setting different bits of different registers hi/low (1/0), you can control inputs and outputs of the miccrocontroller.

There's a whoel register for defining which pins are inputs and outputs, a register for analog to digital conversion, etc.

I'm sorry, I'm just really pissed right now and i don't feel like giving really good instructions

maybe later i'll be better

doesnt matter, but thnx for the effort anyway :)

but i saw a POV (one of those wavy thingies with 8 leds to display txt/images) code once and that had those 8bit binary all over the center part.
so when its a 1 the port is high, and if its 0 the port is low?

and about C++, i dont even know the basics, the only languages i know so far (except dutch) are plain english and HTML (a bit) so dont expect rocket science from me right away, but im a quick learner (thank god!)

btw, how did u learn it?
and is there an easy tutorial online? i searched for it, but all i get are sites that overcomplicate things, and sites that dont say anything about it...

I am taking a C++ class in school

but as for using c with avr's, I learned mostly from just googling and Gmoon on this website

I'll try and write up a tutorial, but I'm not promising anything ;)

k. well i might go to a school where they could teach it, so maybe im lucky :)\

and lemme  know when that  tut comes out k?