can you take a ATmega328 and put it in the arduino then program it then pull it out and hook it up to power resonator and correct pins and it will run? If so... do the new arduino's come with a ATmega328 soldered directly to the board or in a dip socket?
Yes, you can program the chip inside the arduino, then pull it out and use it as a standalone...
here is a good lesson on how to set up the atmega without the arduino:
http://itp.nyu.edu/physcomp/Tutorials/ArduinoBreadboard
Arduinos (those with the dip atmega chip) come with the chip in a socket.
Thanks!! Im ordering a Arduino from Amazon and am gonna get a bunch of parts from mouser and now i know to order extra ATmega328s...
Make sure you order the extra Atmega328s pre-programmed with the Arduino bootloader to make things easy on youself.
How do i know if it has a boot loader on it. How hard is it to install the bootloader?
Also why does the arduino use a 16mhz crystal and not the chips max of 20 mhz
It will usually say "arduino bootloaded" or something... sparkfun has pre-bootloaded atmegas...
Also why does the arduino use a 16mhz crystal and not the chips max of 20 mhz
Until recently the Arduino core timing functions (millis and delay) required a CPU frequency that was either 8MHz or 16MHz. The curent version does work at 20MHz but there are some third party libraries that do not work correctly at this frequency
Also why does the arduino use a 16mhz crystal and not the chips max of 20 mhz
Because when Arduino first came out it had a AtMega 8 - the predecessor to the mega168 and Mega328 that are used now.
The AtMega8 maximum is 16MHz. This speed has been mainatained so that all the different boards are compatible.
The AtMega8 maximum is 16MHz. This speed has been mainatained so that all the different boards are compatible
Its not the boards that are compatible, products like the Lilypad and Pro-Mini designed to run on 3.3v use the 8MHz clock speed instead of the 16MHz clocks used by the Duemilanove.
The bootloader and runtime software are designed adjust for the difference in the hardware clocks. But some software (like NewSoftSerial) is specifically tuned to 8MHz and 16MHz and although it will recognise which frequency is used by the currently selected board, it will not run correctly at clock rates.
Ok, so I should have said "All the 5V standard boards are compatible"
If the crystal was bumped to 20MHZ it'd no longer be suitable (well within the official spec anyway) for AtMega8's
Yes, Atmega 328 runs with 16 MHz crystal, two 22pF capacitors and some 100nF blocking capacitors for Vcc. Simply get Arduino's schematics, remove everything related to FTDI chip, voltage stabilisator etc. and you have a minimum version.