Alright, so I just got an ATTINY2313-2oPI .. But I have no idea how to get started with this thing. Anyone have any tips, or ideas? I just want to get it hooked up, like with a 5V voltage reg. and a USB cable for programming.
Electronic – How to get started with microcontrollers? (ATTINY2313)
microcontroller
Related Solutions
In my opinion, first step should be to get four basic documents.
First one you should get is the short version of the datasheet for your microcontroller. It shouldn't be more than 20-30 pages, so do read it whole before touching the microcontroller. Don't panic if you don't understand everything (or anything!). Just read it a couple of times. While reading it, there are few thing you should pay attention to. The page you'll probably use the most is the pin configurations page. It will probably be one of the first pages. It may be a good idea to print it and keep it close to the microcontroller. There you'll find out what each pin does.
After that, it would be a good idea to get the whole datasheet. It will probably have several hundred pages, but you don't need to read it whole at once. Instead just read the bookmarks list and if you're having any problems with a specific feature, read the part of datasheet which describes it. It would be a good idea to take a look at electrical characteristics page. There you'll find relationship between voltages and frequencies, voltages for high and low, maximum output currents and other important information without which your microcontroller can die. That part may just be few pages long, so do read it.
Next two documents are a bit more complicated, but they focus on some things that are very important. They are Atmel AVR042: AVR Hardware Design Considerations and AVR040: EMC Design Considerations. They're a bit scary at first, but do read them, since they're only around 17-18 pages each. In them you'll find ways how to correctly connect the reset pin, what types of decoupling capacitors to use (you didn't mention these on your parts list for example), how to set them up and so on. As with other manuals, you don't have to worry if you don't understand everything at first. Since you're a beginner, just focus on parts which explain how to connect reset pin and how to use decoupling capacitors. For the rest, it's good read, because at one point your microcontroller board probably won't work and you'll need to figure out why. You'll be able to find some pitfalls there.
I made an AVR board few months ago and had some beginner questions about it. For example how to connect decoupling capacitors when pins aren't close.
Also take a look here. Similar situation, except that guy had ATmega 16. I wrote a bit about setting up the toolchain and getting a programmer there.
I shall answer your second part first.
is it possible to run native windows code directly from the micro controller
Certainly not, no. Simply because native Windows code need Windows to run, and needs to be compiled for the host processor - and neither of those can be done on a little Atmel.
The first part of your question:
is there any premade libraries that does the bulk of the coding work for me?
Almost certainly, yes. Look on the Atmel site, you will find some. I personally am not up on Atmel, but all the other manufacturers I can think of provide either full example code, or libraries to incorporate in your own code (such as Microchip's Harmony library), so Atmel certainly will too.
Best Answer
To get started with a bare ATTiny2313 you'll need an AVR ICSP, such as this USB AVR Programmer. You can breadboard the connection from the ICSP cable to the chip (see ATTiny2313 datasheet and ICSP pinout). Depending on the programmer used, it may be capable of providing power to the circuit (depending on your needs you wouldn't need to start with a 5V regulator).
Also mentioned in the product page for the programmer is 'avrdude'; basically a free gcc based toolchain for developing and loading code onto Atmel AVR parts (including the attiny family).
In theory an Arduino can also be used for ICSP if you have one laying about, but I'm less familiar with that process.