ATmega328 with Arduino without dev board (NOOB)

I'm just getting into some development with Micros.
I want to use some small micros for some projects and was thinking about using some of the 8 pin ATmega micros.
However, the Arduino is a bit easier to interface with and I already have the board to program with.

I see though that my Arduino board has lots of stuff on it besides a chip. This concerns me. I know that most of it is for USB to serial and power regulation. My fear is the oscillator.

The ATmega328 has an internal oscillator so it shouldn't need that in the wild right? Does the Arduino bootloader rely on the oscillator? if not, what is it used for?

Finally; If I wanted to write some code into an ATmega328 with Arduino burned on it, what externals would I have to supply ? Am I overlooking anything beyond the oscillator?

Thank you in advance for your support!

The crystal oscillator is only needed for high speed serial coms. The default baud programming speed is not high speed.

Should be fine with the internal RC osc.

Awesome! Thank you for your help!

If only it were that simple..........

Trust me, putting an oscillator in circuit is nothing to the problems caused by runniing at at a relatively unstable half speed. Everything in anyway timing orientated comes from the oscillator. Use the Lilypad bootloader (which lets it know it isn't running at normal speed) and be prepared for problems.

Take a look at the RBBB http://www.moderndevice.com/products/rbbb-kit

Its the simplest practical circuit with an oscillator and is pretty easy to do on stripboard or breadboard. You could even buy one, its a lot cheaper than an arduino, but you'll need a FTDI breakout board or simlar to upload sketches (or swap chips with a real Arduino).

Really? You can’t use the onboard oscillator for timing related things? And if not why?

The internal oscillator can be off by 5%. While I have not done it myself, according to the Atmel documentation it can be calibrated to about 1%.

iAll the timing is derivrd from the oscilltor, the standard bootloader works with 16 mHz, if you use the internal oscilator which runs at 8mhz, 1 millisecond becomes 2 milliseconds, all the serial baudrates go to cock, half the timing dependant libraries stop working. The arduino lillypad uses the internal so its aware that its running at half speed, but since the internal oscillator is an RC rather than a crystal, its timing stability is measured in percentages rather than PPM so don't expect to be able to do anything timing critical.

At its simplest an external oscillator is one component with 3 connections (or 3 components if you use a crystal) its hardly rocket science and far more NOOB friendly than overcoming the problems caused by changing the operating speed.

Ok... It looks like I just need a 16MhZ crystal and two 22pF caps hooked to ground and pins 9 and 10 of the Atmel chip?

Hmm... I'm looking at oscillators and crystals and I'm seeing two stats that I don't know how to size.

One is the capacitance of the crystal. I see that the one in the schematic has two caps coupling it to ground but not a capacitance listed for itself.

As far as oscillators go; This looks like the easiest to adapt to a circuit as I don't need the caps right? However, they have a voltage and a capacitance rating.

Can anybody push me some insight into how to size these? Thanks!

A 16Mhz ceramic resonator is a reasonble, cheaper and simpler alternative. Not as accurate as a crystal, but not inaccurate enough to cause too many problems. It saves using the capacitors but its slightly messy to use on a breadboard. I've built sevral stripboard 'Arduino's using ceramic resonators. I've also done one using the internal and its a right royal pain in the backside.

As I said earlier the circuit for the RBBB is the simplest, it uses a ceramic resonator. You needn't worry about voltages and capacitances. Its just one component. The centre pin goes to ground, the outside pins got to pins 9 & 10 on the chip.

Take a llok at the Instructions and Schematic for the RBBB linked from the page I posted earlier. Its very noob friendly.

Cool! I just checked out that schematic and found some ceramic oscillators on Mouser. I'm pumped to get it running!

Thanks!

Pity the pin orientation on the Atmega chips isn't too friendly for breadboard use. You tweak the legs on the resonator a bit and sort of put it in a bit diagonal..........

If I wanted to use the ATMega328 in say, the QFRP (I think that is right) SMT package, is there an external resonator that is SMT for the 16 (or ideally, 20 - yeah, I know I would need a different bootloader) MHz operation?

Just curious...

Somebody somewhere will make what you're after, whether it can be bought economically in quantities less than 5000 is a different matter. SMT and hobbyist don't really go together IMO.........

cr0sh -

I bought a bunch of SMT components from sureelectronics. They have a pack of 50 SMD Oscillators (9 different values, one of which is 20 Mhz) for $2.68. http://www.sureelectronics.net/goods.php?id=179 All of them are SMT except the 32kHz ones, even though the pics show thru hole devices.

Sureelectronics also has great bulk packs of other SMT components (resistors, caps, etc…)

Another good site for SMT component assortments is Welcome to the best place to buy Electronic Kits, Arduino Modules, Transistors, ICs, Resistors, Capacitors, LEDs, Inductors, Amplifier Kits and electronic hardware. Stop by our new retail store in Ocala, FL. 636 NW 27th Ave. | NightFire Electronics LLC

cr0sh -

If I wanted to use the ATMega328 in … SMT package, is there an external resonator that is SMT for the 16 (or ideally, 20 …) MHz operation?

Yes, for example at Farnell at 1-off, or at worst 5-off prices. One claims a tolerance of 0.1%.

You’ll probably have a better range, or lower price, in the USA than me :slight_smile:

HTH
GB

Hi,
i have a question to a similar topic, so i ask in this thread instead to open a new one. I want to use two atmega328 on a self made circuit board to log data of two sensors. The logging is time critical, using the two interrupts of a single controller leads to loss of data, that's why i want to use two independent controllers. Building two boards would be no problem for me using the known manuals, like
http://itp.nyu.edu/physcomp/Tutorials/ArduinoBreadboard

But to save space, parts and a second battery i had the idea to combine two atmegas on a single board, using just one power source.
Is it possible to use the widely used 7805 voltage regulator to power two circuits at the same time? My first intention was that it should be no problem, the regulator provides up to 1.5 ampere at 5 volts, far enough to power two chips in theory. But is there something i missed which makes it impossible or could damage the chips or something special to take care of?

using the two interrupts of a single controller leads to loss of data,

That implies you are not doing it right.

Is it possible to use the widely used 7805 voltage regulator to power two circuits at the same time?

Yes, people do this all the time. I would just add a bit of extra supply decoupling to be on the safe side.

The logging is time critical, using the two interrupts of a single controller leads to loss of data

I am curious too, how close together in time must the two sensors be sampled?

I can imagine a problem getting simultaneous analogue samples because AFAIK, there is a single sample and hold in the Arduino's Analogue-to-Digital Converter (ADC), but that isn't an issue of losing data in interrupt routines.

GB