I have started experimenting with the Arduino a couple of months ago. I created a couple of projects and now I am trying to find a way to make these projects permanent. By this I mean, I want to use my arduino uno for prototyping, but would like to upload my program to an independent ATmega168 or 328 to then solder everything together.
Right now I have the schemes of my project and haf to always rewire everything to my Uno and upload the code.
I currently have the Arduino Uno SMD. I found on solarbotics.com the ATmega168(http://www.solarbotics.com/products/28958/) and the ATmega328(http://www.solarbotics.com/products/28960_a/) and I have a couple of questions that need to be answered before I purchase a couple of them.
- Is it very useful to have the Arduino Firmware preloaded?
- Is their a way to upload my code to a ATmega168 using only my Arduino Uno SMD (Wiring up both together and connecting the Uno by usb to my computer) ?
I found a couple of solution like the Ardweeny (http://www.solarbotics.com/products/kardw/) and the breadboard arduino that could work to loading my code, but I would like to have the most simple, cost effective solution.
Thanks alot, and I am looking forward to interact with the Arduino community.
the arduino software (the bootloader) its used for easier programming of the chip, since your going to use your uno for developing you don't need to burn the bootloader on to the final chip so you could use the arduino uno as an isp programmer (if you do this you must disable the autoreset circuit - search the forum there is a lot of info on how to do it) or spend a lil more money and get a dedicated programmer to burn the final sketch to your chip
you can use your uno to upload code to your atmega168/328 (the same way you do it on your uno now) but first youll need to disable the atmega328 since you cant just remove it - i think connecting the reset to gnd will solve that (but may cause problems with the autoreset circuit meaning youll have to add a reset button on your custom board and press it every time you want to upload new sketches) , also for this to work youll need to burn the bootloader on the new atmega
or you can use arduino as isp and program the chip without burning the bootloader - in this case youll need to create a new board and edit uploading settings to reflect youll be uploading with a programmer
you could also buy a cheap usb to serial converter to eliminate the need to "hack" the uno
this is not so cheap http://www.solarbotics.com/products/50520/ or this http://www.sparkfun.com/products/9716
but this is if you don't mind buying stuff from ebay http://www.ebay.com/itm/USB-2-0-UART-TTL-6PIN-Connector-Module-Serial-Converter-CP2102-New-/350499583299?pt=LH_DefaultDomain_0&hash=item519b673543
hope this helps
This will point me in the good direction.
I just read this tread, it sound like the same thing that I am planning to. Test a project using an UNO board, if work, re-program a ATMega328 with Arduino bootloader in to re-upload my prototype sketch. My Idea is : build a small PCB version of the Breadboard Arduino version, using a FTDI USB to Serial board to program the “blank” chip, instead using a standard IC socket, I will use a ZIP socket instead. My solution. I will build it very soon, I did experiments with Dave’s Weat USB to Serial board, a FTDI Basic and mini USB Adapter. One more experiment left is : using the COM1 or COM2 of my PC <— a real RS-232C - 9 pin. ← a 2003 Motherboard and still kicking.
I did my research and today I am going to test out my ideal. I will use the Uno as an ISP Programmer. I am going to follow the instructions un the Tutorial 'ArduinoToBreadboard' (http://arduino.cc/en/Tutorial/ArduinoToBreadboard) for boot loading the firmware and then loading my sketch. Because my Uno is the versions that you cant remove the Atmega, I will use a 220ohm 1/4 watt resistor between the reset and ground. Also, instead of buying a crystal, I will use a Ceramic Resonator 16MHz that is much cheaper.
For power supply, I will connect my wall adapter to a 5v regulator with a 220uF capacitor and setting the reset on my Atmega like indicated.
That should be good for what I need. Anyone see something missing? With what I saw, this should work, but its my first so something could be missing. I wanted to go more minimalist with the chip, but thought it would be easier to start off with a ATmege328.
Thanks for the help
These guys are great for low cost parts.
You can see the pricing here for 16Mhz crystals. (still the need the caps though)
As an alternative to using an another Arduino to burn a bootloader into the AVR.
For a few bucks you can get a USBASP ISP programmer off ebay that can be used to
directly program the AVR using ISP vs using a bootloader and a serial connection.
(There may be cases that you don't want/need to put in support for the serial port in your final designs)
You have to update your Arduino IDE boards.txt and programmers.txt files to suport
the USBASP programmer but then it works for regular sketches just like using a bootloader
only there is no bootloader in the chip.
This also frees up some flash space in the part.
Using a real ISP programmer avoids all the "Arduino as an ISP" issues.
I just finish my experiments to program the Arduino chip ATMega328 with a bootloader.
First : I build a breadboard version. ( just the ATMega328 chip with bootloader, 16 Mhz crystal, wires, 10 K, a push-button switch )
Second: Use the following :
Dale’s Wheat USB Adapter - http://dalewheat.com
FTDI Basic Breakout 5 V - http://www.hvwtech.com/products_view.asp?ProductID=1107
Arduino mini USB - http://arduino.cc/en/Main/MiniUSB
RS-232 SchmartModule - http://www.schmartboard.com/index.asp?page=products_populated&id=84
Dale’s - USB power your Ardiuno, compatible with the breadboard - inline with RX, TX, Reset of the chip. Make sure you disconect your reset circuit - wire going to the reset pin of the Arduino chip to load your program. The board is Duemilanove
Basic - USB power your Arduino , connect RX to TX, TX to RX ( Basic to Arduino chip ) , add 0.1 uF cap in series between the DTR and Reset. The board is Ardiuno Pro ( 16 MHz, 5 V , Atmega328 )
Arduino Mini - USB power your Arduino, connect RX to RX, TX to TX ( Mini to Arduino chip ) , add 0.1 uF cap in series between the DTR and Reset. The board is Ardiuno Pro ( 16 MHz, 5 V , Atmega328 )
RS232 - Power the Arduino circuit and the RS-232 module ( I use a 4.5 V Battery pack ), connect RX to TX, TX to RX ( RS232 to Arduino chip ) add a 0.1 uF cap in series between the DTR and Reset. The board is Arduino Pro ( 16 Mhz, 5 V, Atmega328 )
And make sure the port number ( the USB or RS-232 ) match the port number in the IDE.
just doing the experiments to see the pros and cons.