Cheapest way to program standalone project

I've just bought a starter kit that came with an Arduino Uno and I'd like to build a standalone version of an IR Transcoder Sketch (to make my TV remote control my DVD player) and it seems I can't use it to directly program a standalone ATMega 328 chip because of a unresolved software issue with the UNO optiboot bootloader :frowning:

As a family man with a strict budget for my toys :slight_smile: I'd like to know what the cheapest way to get my sketch from a Uno onto a standalone project.

Any ideas please :slight_smile:

regards
Simon
PS Loving Arduino :slight_smile:

(deleted)

There are several ways of disabling auto-reset when using ArduinoISP with an Uno.
Search the forums for other "bootloader" posts.

@drew - thats the right price :slight_smile: but are there any instructions on how to use one (or a compatbile equivalent) to upload a Uno sketch with it?
@westfw - I've found a few (I've even found a post saying that the Uno does work with ArduinoISP!) - have you got a link to one you used yourself?
regards
Simon

Are you in the US?
I'm using this one.
http://www.mdfly.com/index.php?main_page=product_info&cPath=5&products_id=415

Here it is in action programming my '1284 based "Bobuino"
Add these 2 lines to programmers.txt after download/install the driver, link is on the same page.

usbasp.name=MDFLY
usbasp.protocol=usbasp

(deleted)

usbasp.zip (78.8 KB)

@drew and crossroads - ta very much :slight_smile:

Simon

I've just moved a sketch from Arduino Uno to a virgin processor in my own hardware, using the Arduino Uno itself as a programmer. See Prototyping small embedded projects with Arduino | David Crocker's Solutions blog.

@dc42
I was hoping there was someway to it without addtional hardware (discounting the capacitor or course :slight_smile:

My barebone kits of parts has arrived so I'll give your method a go tomorrow and let you know how I got on :slight_smile:

Simon

This has to be one of the least expensive USB AVR programmers I have seen.
http://www.nkcelectronics.com/pocket-avr-programmer.html
I just received one today. Comes with a 10-pin to 6-pin cable to plug onto ICSP pins as well.

I'd like to know what the cheapest way to get my sketch from a Uno onto a standalone project.

Cheapest method has to be:

  1. Upload sketch to your arduino Uno board.
  2. Remove 328p chip from Uno and install it in your standalone project 28 pin DIP socket.
  3. Purchase replacement $6 328p chip with bootloader and install it into the Uno board.

Lefty

I wish my Uno had come like that but it came with a square chip soldered directly to the board :frowning:

Simon

simplesi:
I wish my Uno had come like that but it came with a square chip soldered directly to the board :frowning:

Simon

The is because you have a Uno SMD model, and that is unfortunate. I think I read that they came out with the Uno SMD model because there was a shortage of 328p chips in the DIP package so they started building Uno SMD boards until the supply situation improved. Now they seem to offer both Uno and Uno SMD boards? Not sure if that is all true or not, but as long as the standard DIP version of the Uno is avalible I see no reason in the world one should buy the SMD version.

Lefty

ArduinoISP and bare new chips is cheaper than buying pre-bootloader'd chips. Chips w/bootloader are definitely the easiest.

@simplesi

I know how you feel to be on a low budget. The cheapest way that I am thinking is to get : USB-to-TTL adapter, an ATmega328 with pre-loaded bootloader , a 16 MHz crystal and wires. Check this site to how to do it : http://www.dalewheat.com/

The company that I shop for Arduino & PICAXE : http://www.robotshop.com/ca/ but they don't have crystal ( Located in Montreal, Quebec and they have store in the US ) and http://www.hvwtech.com/, they carry crystals, ZIP <-- Zero-Insertion-Socket ( located in Calgary , Alberta )

The only part you need to purchase once is the USB-TTL adapter.

I hope this help.

@dc42
I've not managed to get it working so :frowning:

I'm using this set of parts
http://www.oomlout.co.uk/component-bundle-for-arduino-compatible-arcb-p-227.html

and have wired it up like this
http://arduino.cc/en/Tutorial/ArduinoToBreadboard (1st image)

which (if I've understood thinks properly :slight_smile: ) is the equivalent of connecting ICSPs together as per your blog.

Any suggestions?

Simon
PS I' m the IDE attempts to upload, after a minute it comes up with this error

avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override

Next hardware purchase, try this:
http://www.nkcelectronics.com/arduino-runtime-board-rev-b.html
All parts needed can be found at www.dipmicro.com really inexpensively.
Put the uController in a socket.

For programming:
http://www.nkcelectronics.com/breakout-board-for-ft232rl-usb-to-ser232.html
or this
http://www.nkcelectronics.com/ftdi-basic-breakout.html
Make a 6-pin cable that can plug from one to the other for downloading sketches: Vcc, Gnd, Reset, Tx, Rx,

Or use an ISP programmer
http://www.nkcelectronics.com/pocket-avr-programmer.html
This one comes with a 10pin to 6pin cable to plug onto the UCSP header.

Then if some accident happens again during development you only need replace the ATMega328 (or 168 if you decide you can live with less memory).
With the programmer you can also easily download bootloaders, so you don't need to buy blank parts and save a few dollars. 3-4 projects and it pays for itself.
http://www.newark.com/atmel/atmega328p-pu/ic-8bit-mcu-megaavr-20mhz-dip-28/dp/15R0268

I bought a tube of 10, planning ahead some and also taking advantage of the price break.

Hi,

  1. Yes the first image in that tutorial is equivalent to what I suggested in my blog, except that you also need the capacitor connected to the Uno to suppress the auto reset.

  2. Since you bought the MCU with bootloader already programmed in, you should be able to upload a sketch to it using the second image in that tutorial, if you don't mind it always running the bootloader before it runs your program.

  3. What is the exact marking on the MCU? The "Invalid device signature" might mean that your mcu is an atmega328 instead of atmega328p. The marking in full should be ATMEGA328P-PU. There is a fix for this if your device doesn't have a P in the right place.

@crossroads
Why spend £5 when you can spend £0 :slight_smile:

At them moment, I'm hoping the $5 lead from Hong Kong will do the job WHEN it arrives :slight_smile:

In the meantime, I'll continue to try it the cheap (but hard way) :slight_smile:

Simon

@dc42

  1. ..except that you also need the capacitor connected to the Uno to suppress the auto reset.

Got one strapped between GND and Reset on Uno :slight_smile: [edit]correction from Gnd and 5V ![/edit]

  1. Since you bought the MCU with bootloader already programmed in, you should be able to upload a sketch to it using the second image in that tutorial, if you don't mind it always running the bootloader before it runs your program.

I don't care if it makes a cup of tea as long as it uploads and works :slight_smile:

  1. What is the exact marking on the MCU?

Well on using the sort of image enhancing tools used in Blade Runner I've managed to decipher the black writing on black plastic as saying ATMEGA?28-PU (where the ? is truely indecipherable!)
Hopefully this is my issue and you'll be winging an answer on its way to me :slight_smile:

Simon