Show Posts
Pages: 1 2 [3] 4
31  Using Arduino / Microcontrollers / Re: Cheapest way to program standalone project on: August 15, 2011, 05:34:51 pm
OK - still moving forward smiley
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:
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
Off to do avrdude.conf sig change

Simon
32  Using Arduino / Microcontrollers / Re: Cheapest way to program standalone project on: August 15, 2011, 05:23:50 pm
Finally making progress in a forward direction  smiley-grin
I came across http://www.adafruit.com/forums/viewtopic.php?f=25&t=19260&start=0 thread and downloaded optiloader and modified it so that it did not attempt to program but just read the signature of the connected MCU.

As before, with all other attempts using AVRDude and my Uno running ArduinoISP - signature came back as 0 smiley-sad

I tried all sorts of lead replacements and then I finally removed the 2 small caps across the crystal and now optiloader is returning a sig of 9514 (the sig for an ATMega328-PU)

So I'm off to start again with ArduinoISP - wish me luck smiley

Simon
33  Using Arduino / Microcontrollers / Re: Cheapest way to program standalone project on: August 15, 2011, 02:47:05 pm
Quote
Looks like it failed right from the start, because 0x000000 doesn't look like a valid device signature. I suspect that the mcu isn't responding to the programming commands at all. I would check the breadboard wiring and the wiring to your Arduino very carefully. You might consider posting a photo of it.
I've rebuilt the circuit on a different breadboard and as soon as I work out how to upload an image on this forum I'll post it

Quote
I'm assuming that COM2 really is the port that your Arduino appears on - mine appears on COM5.
I hope so smiley My compuer initially assigned my Uno to COM26 but COM2 was free so I changed it in Device Manager - Ports - Ardunio - Properties -Port Settings - Advanced (I'm on XP) just in case anything had a problem with high com port numbers smiley
34  Using Arduino / Microcontrollers / Re: Cheapest way to program standalone project on: August 15, 2011, 05:09:23 am
Well I've got into cmd line AVRDude territoy now.

Using this
Code:
avrdude -b 19200 -p atmega328p -C ..\etc\avrdude.conf -c stk500v1 -P com2
I'm getting
Code:
avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
(if I remove the power lead from my Uno to the breadboard I get
Code:
avrdude: stk500_program_enable(): protocol error, expect=0x14, resp=0x50
avrdude: initialization failed, rc=-1
which I think shows that I've got some of the wires corrected properly)

So I got very brave an attempted to force upload a new bootloader
Code:
C:\Apps\arduino-0022\hardware\tools\avr\bin>avrdude -b 19200 -p atmega328p -C ..\etc\avrdude.conf -c stk500v1 -P com2 -F -U flash:w:optiboot_atmega328.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.05s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATMEGA328P is 1E 95 14
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "optiboot_atmega328.hex"
avrdude: input file optiboot_atmega328.hex auto detected as Intel Hex
avrdude: writing flash (32748 bytes):

Writing | ################################################## | 100% 0.56s

avrdude: 32748 bytes of flash written
avrdude: verifying flash memory against optiboot_atmega328.hex:
avrdude: load data flash data from input file optiboot_atmega328.hex:
avrdude: input file optiboot_atmega328.hex auto detected as Intel Hex
avrdude: input file optiboot_atmega328.hex contains 32748 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 37.58s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0xff != 0x00
avrdude: verification error; content mismatch

avrdude: safemode: Fuses OK
Which as you can see failed miserably smiley-sad
35  Using Arduino / Microcontrollers / Re: Cheapest way to program standalone project on: August 14, 2011, 06:05:47 pm
@dc42
BTW
Quote
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.
I believe I can't use the second method because I can't remove my soldered in 328 in my Uno smiley-sad

Simon
36  Using Arduino / Microcontrollers / Re: Cheapest way to program standalone project on: August 14, 2011, 05:46:11 pm
@dc42
I'm running into the same error msgs as h4t smiley-sad

Basically just changing the signature in avrdude.conf makes no diff - same error msg.

Adding in new entrys in avrdude.conf and adding a new board just gives the
Quote
unknown MCU 'm328au' specified
(in my case its m328 as thats the name I tried to give mine)

This is a good game smiley

regards
Simon
37  Using Arduino / Microcontrollers / Re: Cheapest way to program standalone project on: August 14, 2011, 04:33:38 pm
Quote
I hope you mean ground and reset pin?
Yes - I did smiley
Simon
38  Using Arduino / Microcontrollers / Re: Cheapest way to program standalone project on: August 14, 2011, 03:55:39 pm
@dc42
Quote
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 smiley [edit]correction from Gnd and 5V ![/edit]
Quote
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.
I don't care if it makes a cup of tea as long as it uploads and works smiley
Quote
3. 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 :-)

Simon
39  Using Arduino / Microcontrollers / Re: Cheapest way to program standalone project on: August 14, 2011, 03:44:23 pm
@crossroads
Why spend £5 when you can spend £0 smiley

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

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

Simon
40  Using Arduino / Microcontrollers / Re: Cheapest way to program standalone project on: August 14, 2011, 01:01:36 pm
@dc42
I've not managed to get it working so smiley-sad

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 smiley ) 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
Code:
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override

41  Using Arduino / Microcontrollers / Re: Cheapest way to program standalone project on: August 13, 2011, 03:44:39 pm
I wish my Uno had come like that but it came with a square chip soldered directly to the board smiley-sad

Simon
42  Using Arduino / Microcontrollers / Re: Cheapest way to program standalone project on: August 12, 2011, 06:12:44 pm
@dc42
I was hoping there was someway to it without addtional hardware (discounting the capacitor or course smiley

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

Simon
43  Using Arduino / Programming Questions / Re: Convert long to hex string on: August 07, 2011, 04:31:58 am
Applied your fix - working fine now - Ta smiley
Simon
44  Using Arduino / Programming Questions / Re: Convert long to hex string on: August 07, 2011, 04:21:23 am
Phew - I'm glad it wasn't me smiley
Thanks

Si
45  Using Arduino / Programming Questions / Convert long to hex string on: August 07, 2011, 03:29:22 am
Week 1 Arduino newbie:)
I'm decoding IR codes using Ken Sherriff's IRLibrary but I'm having problems in checking for particular codes

This code
Code:
...
unsigned long codeValue;
...
(use lib to get a value)
...
   Serial.println(codeValue);
    String sCodeValue = String(2576,HEX);
    Serial.println(sCodeValue);
    sCodeValue = String(codeValue,HEX);
    Serial.println(sCodeValue);

 produces

2576
a10
2576

whereas I was expecting/hoping for

2576
a10
a10

Can someone tell me what language error I've made please? smiley
(Basically I'd like to compare sCodeValue against a set of values but I have those values in Hex so I don't want to have to translate them all to decimal)

regards

Simon


Pages: 1 2 [3] 4