This is probably a totally noob question but i need to know.
After developing on the Arduiono Diecimila which has been a lot of fun (software guy, trys hardware), can I take the ATmega168 out of the Arduino board and use it on a breadboard or pcb ?
I'm thinking yes, once the code has been uploaded it's going to be usable.
But how do the Arduino i/o pins relate to the chip and can I just connect up the way I did when using the board or are there critical stuff on the arduino board which needs to be replicated.
Basically, I want to know how to convert a prototype to an actual stand-alone device without sacrificing my lovely Arduino.
If you want your code to run unchanged, the main thing you need is a 16 MHz oscillator and the two capacitors that work with it. See the Diecimila schematic for details: http://www.arduino.cc/en/uploads/Main/Arduino-Diecimila-schematic.pdf. You also need a way to power the chip, of course, and probably a way to reset it (besides just pulling the power). If you're going to want to program it on a breadboard, you'll probably want to hook up the auto-reset, which involves putting a 100 nano-farad capacitor between DTR (of whatever USB-to-serial convertor you're using), and the reset line of the ATmega168. Or you can just put the chip back in the Diecimila to reprogram it.
can I just connect up the way I did when using the board or are there critical stuff on the arduino board which needs to be replicated.
crystal+caps, reset line pullup resistor, regulated +5V supply, .1uF cap at or near Vcc, and probably a pullup resistor for the RX data line. (I don't think I've forgotten anything.)
There's nothing magic on the Arduino board; the biggest thing is to make sure the clock source (crystal) in the target circuit matches the settings in the ATmega's fuse bits. If you include a crystal of the same speed as on the Arduino board, you've taken care of that.
Look around the Arduino site a bit, especially tutorials and the playground. You'll find examples of homegrown arduino boards, an "Arduino breadboard", etc.