Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

basic atmega328 circuit (without programmin/serial functionalities)

Status
Not open for further replies.

snaggy

New Member
I need to create a few cheap atmenga328 based circuits. These circuits I design and develop on the arduino 2009 board, but then when in production I don't want to waste the arduino board, so could you point me to a simple schematics that lists the bare minimum to make the microcontroller (previously programmed on the arduino board) work?

I guess it should include oscillator, a few caps.. ?
thanks!
 
You're right, if you don't want ISP, serial and the LEDs on digital pin 13 (PB5), power, Rx and Tx your circuit will need just this:
- ATmega 328 (168 or even ATmega 8 are fine, depending on how big is your firmware)
- 16Mhz quartz attached to XTAL1 (PB6) and XTAL2 (PB7)
- 2 x 22pF ceramic capacitors for the quartz.
A small bypass capacitor (0.1uF) between the power source and ground is always a good idea.
Make sure you have a regulated 5V power supply.
A push button between Reset and ground and a pull-up resistor (10K) between Reset and VCC.
If you have even the simplest ISP programmer you can add a standard ISP 6 pin header.

Good luck!
 
In relation to your circuit once programmed you have only to look at the Arduino schematics. You'll have to replicate everything from the I/O pin(s) in question to the outside world, this includes the voltage regulator and any other Arduino specific devices which you may be using.
 
Last edited:
You could use even less components if your application isn't timing critical by using the internal oscillator (8MHz). This would allow you to eliminate the need for the external crystal and two small capacitors.
 
You could use even less components if your application isn't timing critical by using the internal oscillator (8MHz). This would allow you to eliminate the need for the external crystal and two small capacitors.
I believe that most (if not all) of the Arduino libraries assume you are running at 16 MHz. For instance, if he's using I/O shield for serial communications or the Ethernet shield and the chips were programmed, as he said, on the Arduino board, even if his own application is not time critical, the libraries would not perform as expected.
 
I believe that most (if not all) of the Arduino libraries assume you are running at 16 MHz. For instance, if he's using I/O shield for serial communications or the Ethernet shield and the chips were programmed, as he said, on the Arduino board, even if his own application is not time critical, the libraries would not perform as expected.

Simply add #define F_CPU 8000000 into your sketch code and when it is compiled, all timed routines will be calculated on 8MHz.


Also, if timing is not ultra critical but you still will high speed without modifying the F_CPU, you can use a 16MHz 3 pin ceramic resonator. This takes the place of the crystal and 2 caps. The timing is still usually accurate enough to run 9600 serial communications. Anything faster than that and the timing is usually to far out.
 
Last edited:
Also - lookup "standalone arduino"; this is the common term for what you want to do. BTW - it might be cheaper and quicker to go this route: **broken link removed**
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top