Go Down

Topic: Cheapest way to program standalone project (Read 4 times) previous topic - next topic

simplesi

OK - still moving forward :)
Uploaded ArduinoISP and changed preferences.txt and added capacitor to Uno.
reloaded IDE and uploaded a modifed Blink (does pin5 instead of 13 just to keep it away from programming lines)
Got
Code: [Select]
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
Off to do avrdude.conf sig change

Simon

simplesi

Yippee!!!!!!!  :smiley-mr-green: :smiley-mr-green: :smiley-mr-green:
I have a blinking LED on my breadboard :)

Cinderella can go to the ball  :smiley-mr-green:
(Or to put it another way - an Arduino Uno can be used as a programmer for the cost of a 10uF capacitor - so the cheapest way so far is £0.05 (it cost me 23pence for a pack of 5 :) )

Thanks everyone and very much thanks to dc42 for sticking with me :)

Simon

dc42

I'm glad you got it working. If it was removing the capacitors that made it work, then I suspect they were the wrong value capacitors, e.g. 22nF instead of 22pF.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

MarkT


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


And ATmega168's are significantly cheaper than ATmega328's if you don't need the extra RAM/ROM...
[ I won't respond to messages, use the forum please ]

simplesi

Quote
then I suspect they were the wrong value capacitors, e.g. 22nF instead of 22pF

:smiley-red:
Schoolboy error :(
I'd assumed the 2 little ones in the kit were smaller in value than the 2 bigger ones :lol:
(I'd used the 100nF provided for PSU filtering instead of the 22pF :) )

I think I need to invest in one of those little devices with a magnifying glass and a couple of croc clips :)

Simon

simplesi

Well, my cheap programmer eventually arrrived from HK
http://www.ebay.co.uk/itm/USBASP-USBISP-AVR-Programmer-AVRDude-USB-Port-/180666590548#vi-desc
and I downloaded the USBasp driver
http://www.fischl.de/usbasp/
connected the leads reset/vcc/gnd/miso/sck/mosi to the same pins on my ATmega328-PU  and used this
Code: [Select]
avrdude -c usbasp -p m328p -C ../etc/avrdude.conf
(which gave me the expected device error msg due to using a 328-PU and not a 328P-PU )
Code: [Select]
avrdude: Device signature = 0x1e9514
avrdude: Expected signature for ATMEGA328P is 1E 95 0F

I did the Shift-Compile trick to find where my system keeps its hex file and then just used
Code: [Select]
avrdude -c usbasp -p m328p -C ../etc/avrdude.conf -U flash:w:BlinkPin2.cpp.hex -u -F and it ignored the device signature and uploaded and ran it :)

dc42

That's a neat (and inexpensive) little programmer! I'd buy one if it had the 6-pin connector and cable instead of the 10-pin one.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

spycatcher2k

Hi dc42, don't let that put you off, you can make/buy (or swap something for 1 from me) a 10 pin to 6 pin 'converter' board, you can make 1 from strip board, or make a PCB.

It's always better to have a programmer, even if you don't need it now, it's great for moving your projects to a more permanent state.


Drew.
Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

Go Up