Loading...
  Show Posts
Pages: 1 ... 15 16 [17] 18 19 ... 29
241  Using Arduino / Microcontrollers / Re: Programming using AVRDUDE / unix help on: April 05, 2012, 03:30:04 pm
Well I created a script that does as much as I can...

http://arduino.cc/forum/index.php/topic,99590.0.html
242  Using Arduino / Microcontrollers / Re: atmega1284 on: April 03, 2012, 04:33:26 am
I then tried uploading a longer program, and I got errors. I tried the blink sketch again and now that doesnt work either...:

avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x64
avrdude: stk500_cmd(): programmer is out of sync

Is there something to do with autoreset i need to deal with? aparently if its not quite reset at the right moment it can cause problems?

Welcome to the 1284p !

I've had the same issues to be honest.  I asked maniacbug to produce a bootloader that uploaded at 28K but there isn't one yet.  I don't get much time to play with the 1284p etc with my other stuff but keep coming back to it.  I suspect the PCB I made for the 1284p has the crystal and caps on the limit of distance and I'm having a little timing glitch.  I had already designed a replacement but not had chance to make it yet.  How close are these devices to the legs of the 1284p on your breadboard?  It you stick the crystal at an angel or bend the legs you can get it virtually touching.

I ended up using the AVR ISP Mk2 for uploading sketches too but will sort this eventually.
243  Using Arduino / Microcontrollers / Re: Programming using AVRDUDE / unix help on: March 31, 2012, 06:00:13 pm
Thanks. Sounds about right. I tried -e and anything else. Will just have to do it another way ie write version number to EPROM and on boot if current version number doesn't match call EPROM reset routine :-)
244  Using Arduino / Microcontrollers / Programming using AVRDUDE / unix help on: March 31, 2012, 09:24:11 am
If I perform the following command:

bin/avrdude -Cbin/avrdude.conf -patmega328p -carduino -P/dev/cu.usbserial-A50066PH -b115200 -Uflash:w:hex/Controller_V092.hex:i

it programs the hex file "Controller_V092.hex" to the chip

BUT

I want to erase the EEPROM storage area at the same time in case the variables have changed.....

I've read AVRDUDE's manual but everything I've tried fails to work.


Also anyone know how I could create a unix batch file to do the following:

list the ".hex" files in the "hex" directory
allow the user to type one of them by name
check the existence of the filename they type
use that filename in the above command


Many thanks....
245  Using Arduino / Microcontrollers / Re: sanguino board heating on: March 31, 2012, 06:13:45 am
As others have said, we don't know your experience (hence not knowing what level to set this reply at) or what you are actually trying to do....

Excess heat is usually caused by trying to draw too much current from the device.

I am presuming that you have a multimeter.....

I assume you know how to read the voltage using the meter but do you know how to use the multimeter to check the current??

To check current select the mA setting and disconnect either side of the power input.  Connect one probe to this disconnected wire and connect another wire from the original location that the first wire went to to the other probe..... ie break the wire and stick the meter into the circuit so ALL the power going through the circuit goes through the meter......  Now what is the reading????

Arduino boards have a maximum power available from certain pins and from groups of pins and from all pins.  If you need more than what is allowed you can easily do this using a transistor to connect the pin to a larger current source.  I'll not go into full details as it might be a waste of time because you might know all this already and it is down to something else..

We all await your response.
246  Using Arduino / Microcontrollers / Re: RAM RAM I need more RAM!! on: March 31, 2012, 06:05:05 am
Just as a starter here is something that I use to reduce RAM requirements:


void serialPrint_P(const prog_char* s){
  char* p = (char*)alloca(strlen_P(s) + 1);
  strcpy_P(p, s);
  Serial.print(p);
}

void lcdPrint_P(const prog_char* s){
  char* p = (char*)alloca(strlen_P(s) + 1);
  strcpy_P(p, s);
  lcd.print(p);
}


in sketch:

serialPrint_P(PSTR("This text is going to be going to the serial port.  If I used the normal Serial.print command it would go there via RAM wasting lots of space in the process.  The lcdPrint_P function does the same thing for LCDs.  Have a nice day."));
247  Using Arduino / Microcontrollers / Re: atmega1284 on: March 31, 2012, 06:00:55 am
"OUTPUT is not declared in this sketch" !

This relates to the processor not being recognised by the IDE and so it is not declaring the definitions etc for it.  Have you modified the relevant files?  Did you look at the thread I started about the 1284p that is linked to from maniacbugs's page?

The work he has done with v1.0 should give you a pointer.

I have the 1284p uploading and working under v1.0 now.  My only issue is that I would like an option of uploading more slowly as my test board kicks off quite a bit on longer sketches and I am too busy working on other projects to build a better one smiley

Check this thread re variant part : http://arduino.cc/forum/index.php/topic,99134.0.html
248  Using Arduino / Microcontrollers / Re: New optiboot; beta testers welcome... on: March 31, 2012, 05:49:20 am
I still cannot get the optiboot to work FOR UPLOADING VIA SERIAL on a Mega8A.

I have uploaded the optiboot bootloader using the AVR ISP MK2 and tried uploading a sketch but it doesn't upload either BUT it does upload and run using "Upload with programmer" (this is the basic blink sketch)

I have the 6 pin FTDI header connected just like I would for a 328 ie 1-GND, 3-VCC,4-TX,5-RX,6-100nF cap with other side going to reset pin.  It works on 328, 664 and 1284 so lead etc is known good.  Am I missing something?

Optiboot needs adding to version 1.1 of the IDE as a standard feature.  1.5K saved on the 328 with no disadvantages as far as I can see is too good to miss.  Hence my trying to get it to work on the Mega8.

ALSO

If I try and upload the bootloader via the IDE I get this:

Code:
avrdude: Sent: . [1d] . [04] . [04] . [00] . [a0] . [01] . [fd] . [00]
avrdude: Recv: . [1d] . [00] . [00] . [a0] . [01] . [ff] . [00]
avrdude: Sent: . [1d] . [04] . [04] . [00] . [a0] . [01] . [fe] . [00]
avrdude: Recv: . [1d] . [00] . [00] . [a0] . [01] . [ff] . [00]
avrdude: Sent: . [1d] . [04] . [04] . [00] . [a0] . [01] . [ff] . [00]
avrdude: Recv: . [1d] . [00] . [00] . [a0] . [01] . [ff] . [00]
avrdude: erasing chip
avrdude: Sent: . [12] . [0a] . [00] . [ac] . [9f] . [f0] . [ff]
avrdude: Recv: . [12] . [00]
avrdude: Sent: . [10] . [c8] d [64] . [19]   [20] . [00] S [53] . [03] . [ac] S [53] . [00] . [00]
avrdude: Recv: . [10] . [00]
avrdude: reading input file "/Users/darren/Applications/Arduino version 1.00/Arduino.app/Contents/Resources/Java/hardware/arduino/bootloaders/optiboot/optiboot_mega8.hex"
avrdude: can't open input file /Users/darren/Applications/Arduino version 1.00/Arduino.app/Contents/Resources/Java/hardware/arduino/bootloaders/optiboot/optiboot_mega8.hex: No such file or directory
avrdude: read from file '/Users/darren/Applications/Arduino version 1.00/Arduino.app/Contents/Resources/Java/hardware/arduino/bootloaders/optiboot/optiboot_mega8.hex' failed
avrdude: Sent: . [11] . [01] . [01]
avrdude: Recv: . [11] . [00]

avrdude done.  Thank you.

BUT

The file IS there, exactly where it is supposed to be !!!
249  Using Arduino / Microcontrollers / Re: New optiboot; beta testers welcome... on: March 24, 2012, 10:27:12 am
Ok added that line and removed the file added earlier....

I'm trying to upload blink

This is the error I now get:


Blink.cpp:8:21: error: Arduino.h: No such file or directory
Blink.cpp: In function 'void setup()':
Blink:10: error: 'OUTPUT' was not declared in this scope
Blink:10: error: 'pinMode' was not declared in this scope
Blink.cpp: In function 'void loop()':
Blink:14: error: 'HIGH' was not declared in this scope
Blink:14: error: 'digitalWrite' was not declared in this scope
Blink:15: error: 'delay' was not declared in this scope
Blink:16: error: 'LOW' was not declared in this scope


If I #include the Arduino.h file in the first line I still get the same error ie the Ardunio.h file is still missing.....

250  Using Arduino / Microcontrollers / Re: New optiboot; beta testers welcome... on: March 21, 2012, 08:08:41 pm
Actually, I managed to try it tonight.....

Added the entry as stated and then..

Compiled it and it says...

Code:
In file included from Blink.cpp:8:
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h:212:26: error: pins_arduino.h: No such file or directory

So I copied the file called pins_arduino.h into the directory stated.....

and the error became:

Code:
In file included from /Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h:212,
                 from /Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/wiring_private.h:33,
                 from /Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/wiring_digital.c:28:
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:90: error: 'DDRA' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:94: error: 'DDRE' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:95: error: 'DDRF' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:96: error: 'DDRG' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:97: error: 'DDRH' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:99: error: 'DDRJ' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:100: error: 'DDRK' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:101: error: 'DDRL' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:106: error: 'PORTA' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:106: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:106: error: (near initialization for 'port_to_output_PGM[1]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:110: error: 'PORTE' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:110: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:110: error: (near initialization for 'port_to_output_PGM[5]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:111: error: 'PORTF' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:111: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:111: error: (near initialization for 'port_to_output_PGM[6]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:112: error: 'PORTG' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:112: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:112: error: (near initialization for 'port_to_output_PGM[7]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:113: error: 'PORTH' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:113: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:113: error: (near initialization for 'port_to_output_PGM[8]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:115: error: 'PORTJ' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:115: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:115: error: (near initialization for 'port_to_output_PGM[10]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:116: error: 'PORTK' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:116: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:116: error: (near initialization for 'port_to_output_PGM[11]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:117: error: 'PORTL' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:117: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:117: error: (near initialization for 'port_to_output_PGM[12]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:122: error: 'PINA' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:122: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:122: error: (near initialization for 'port_to_input_PGM[1]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:126: error: 'PINE' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:126: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:126: error: (near initialization for 'port_to_input_PGM[5]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:127: error: 'PINF' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:127: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:127: error: (near initialization for 'port_to_input_PGM[6]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:128: error: 'PING' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:128: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:128: error: (near initialization for 'port_to_input_PGM[7]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:129: error: 'PINH' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:129: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:129: error: (near initialization for 'port_to_input_PGM[8]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:131: error: 'PINJ' undeclared here (not in a function)
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:131: error: initializer element is not constant
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:131: error: (near initialization for 'port_to_input_PGM[10]')
/Applications/Arduino v1/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/pins_arduino.h:132: error: 'PINK' undeclared here (not in a function)
.....and more.....
251  Using Arduino / Microcontrollers / Re: New optiboot; beta testers welcome... on: March 21, 2012, 07:36:07 pm
Thanks, I will give that a try in the morning, makes sense.
252  Using Arduino / Microcontrollers / Re: Backing up ATMEGA8 Program/Data? on: March 21, 2012, 06:19:08 pm
Which mega8 is it ? Some has on board USB so it could be one of those smiley
253  Using Arduino / Microcontrollers / Re: New optiboot; beta testers welcome... on: March 21, 2012, 05:45:42 pm
This optiboot is great.  I have a sketch on the 328 that only fits everything using it.

Thanks to everyone involved.....


Just received a bag of mega8u SMD chips and programmed optibook with the fuses as per makefile and all is well.....

Connected a FTDI lead as I would on a 328p ie 0-gnd, 2-VCC, 3-TX, 4-RX, 5 - RESET via 100nF cap

Trying to upload the LED flash sketch with LED connected to pin 17 SCK but upload fails as Arduino NG or older w/ ATmega 8..........

also tried UNO as that is what worked on 328p


Any ideas, at least I know the FTDI lead and IC work.
254  Using Arduino / Microcontrollers / Re: mega8 fuses etc on: March 21, 2012, 05:39:56 pm
arr, they are all in the makefile smiley

high = CC
low = BF

no ext
255  Using Arduino / Microcontrollers / mega8 fuses etc on: March 21, 2012, 10:17:25 am
What fuse bits do you set for a mega8 SMD ?  I am using optiboot.  I have the boot loader programmed
Pages: 1 ... 15 16 [17] 18 19 ... 29