Show Posts
Pages: [1] 2
1  Forum 2005-2010 (read only) / Troubleshooting / Re:  Prescaler on Watchdog timer interrupt?? on: May 11, 2010, 05:52:50 am
Has anyone managed to get an interrupt from a wdt?

I'm trying with:
Code:
     cli();      // important: disable interrupts
      WDTCSR = (1 << WDCE); // watchdog change enable
      WDTCSR |= (1 << WDIE) | (0 << WDE); // enable wdt interrupt
      sei();
and:
Code:
ISR(WDT_vect)
{
      wdt_disable();
      Serial.println("Got watchdog reset...");
      delay(700);
}
2  Forum 2005-2010 (read only) / Troubleshooting / OT: unable to reprogram ppm encoder module with av on: May 06, 2010, 01:08:05 pm
Hi there

I know that this is not directly related to arduino, but I thought that some clever guys might still have a hint for me.

I ordered a 8 Channel PPM Encoder and now I'd like to change the software on it. I connected an AVRISP mkII In-System Programmer to the ISP Pins, but the only message I get in avr studio programmer is:

could not enter programming mode.


I already tried to lower the frequency of the programmer. The led on the programmer turns to green which is correct. I flashed other mc's successfully with the same programmer.

Is there anything special I need to take care of?

You can find the schematics and some infos here: http://store.diydrones.com/ProductDetails.asp?ProductCode=BR-PPME

The board is based on a ATMEL ATMEGA168/328 AVR processor.

Thanks a lot!

/Edit: Sorry for wrong forum, this should be in hardware
3  Forum 2005-2010 (read only) / Development / Re: Arduino on Eclipse : Quick and dirty tutorial on: March 25, 2010, 06:54:10 pm
Thanks for your answer, look here for the details, I created a new thread:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1269513491/0

About the hack discussion: There is another way to use the library, just let eclipse/gcc compile it for you, thats how I'm doing it now and I think its the cleanest way. (Because if you need to, you can easily hack the libraries... )
4  Forum 2005-2010 (read only) / Development / Re: Arduino on Eclipse : Quick and dirty tutorial on: March 25, 2010, 03:35:01 am
I'm trying to use the Wire library in an eclipse project. So I copied that Wire folder and the utilities subfolder into my eclipse project. Now the funny thing is that twi is built (from the subfolder), but not Wire, I did just #include <Wire.h>. I just get a linker error now, because the object is not built...

why does eclipse not build that library?

Furthermore why are you suggesting to just copy precompiled objects from arduino? Thats just a hack and not a solution... I mean eclipse/gcc should be able to compile everything just from the c/h files.
5  Forum 2005-2010 (read only) / Development / Re: Arduino Config Library on: March 29, 2010, 12:07:44 pm
You might want to use http://code.google.com/p/inih/

Its working for me on an arduino.
6  Forum 2005-2010 (read only) / Development / Re: eclipse + wire library: Linker Problem on: March 25, 2010, 06:52:35 pm
I still don't understand why its not compiling the stuff when this extern thing is there.

Now I created a new real c++ project in eclipse, didn't change Wire.cpp to just .c but still had to comment out this extern directive. However its working like this.
7  Forum 2005-2010 (read only) / Development / Re: eclipse + wire library: Linker Problem on: March 25, 2010, 10:07:51 am
I figured it out:
Code:
//extern "C" {
  #include <stdlib.h>
  #include <string.h>
  #include <inttypes.h>
  #include <twi.h>
//}

So those were ignored and not included.

What does that mean? Can anyone explain me this c and c++ thing? I mean it does use g++ to compile the stuff...
8  Forum 2005-2010 (read only) / Development / eclipse + wire library: Linker Problem on: March 25, 2010, 05:38:11 am
Hi guys

I've setup eclipse with the method to compile the core as a sepearte library. This works fine so far.

Now I copied the Wire library to my eclipse arduino project and try to use it. It does only compile if I rename the Wire.cpp to Wire.c, otherwise the cpp file is just ignored. (Weird, does anyone know why? Looks like eclipse does just not build it when its .cpp).
With this change the Wire library and the utility twi is built to objects, however in the end it fails at the linker:
Code:
BBuilding target: ArduinoMegaTests.elf
Invoking: AVR C Linker
avr-g++ --cref -s -Os -o"ArduinoMegaTests.elf"  ./main.o  ./Wire/utility/twi.o  ./Wire/Wire.o   -lArduinoMegaCore -lm -Wl,-Map,ArduinoMegaTests.map -L"D:\ba_umars\program_code\arduinoMegaCore\Release" -mmcu=atmega1280
./Wire/Wire.o: In function `TwoWire::send(unsigned char)':
Wire.c:(.text+0x124): undefined reference to `twi_transmit'
./Wire/Wire.o: In function `TwoWire::send(unsigned char*, unsigned char)':
Wire.c:(.text+0x168): undefined reference to `twi_transmit'
./Wire/Wire.o: In function `TwoWire::endTransmission()':
Wire.c:(.text+0x1a2): undefined reference to `twi_writeTo'
./Wire/Wire.o: In function `TwoWire::requestFrom(unsigned char, unsigned char)':
Wire.c:(.text+0x1c4): undefined reference to `twi_readFrom'
./Wire/Wire.o: In function `TwoWire::begin()':
Wire.c:(.text+0x210): undefined reference to `twi_init'
./Wire/Wire.o: In function `TwoWire::begin(unsigned char)':
Wire.c:(.text+0x21e): undefined reference to `twi_setAddress'
Wire.c:(.text+0x226): undefined reference to `twi_attachSlaveTxEvent'
Wire.c:(.text+0x22e): undefined reference to `twi_attachSlaveRxEvent'
make: *** [ArduinoMegaTests.elf] Error 1

Any idea why? These functions are available in the twi.c file and the object is given to the linker and does exist...
9  Forum 2005-2010 (read only) / Deutsch / Re: Arduino Mega Startprobleme on: April 26, 2010, 01:11:29 am
Das hab ich noch nicht verifiziert. Die Serials sind aber aktiviert und er startet.
10  Forum 2005-2010 (read only) / Deutsch / Re: Arduino Mega Startprobleme on: April 25, 2010, 01:17:03 pm
Mit 4.3.4 läfuts wirklich...

Das Problem sollte entweder den arduino oder gcc Entwicklern mitgeteilt werden!
11  Forum 2005-2010 (read only) / Deutsch / Re: Arduino Mega Startprobleme on: April 25, 2010, 01:06:26 pm
Auch mit 4.5.0 gibts die Probleme, das Ding scheint einfach nicht zu starten, auch wenn die anderen Serials auskommentiert sind. Letzter Versuch gcc 4.3.4!
12  Forum 2005-2010 (read only) / Deutsch / Re: Arduino Mega Startprobleme on: April 25, 2010, 12:42:25 pm
Dann versuch ichs mal offensiv mit gcc 4.5  smiley-wink
13  Forum 2005-2010 (read only) / Deutsch / Re: Arduino Mega Startprobleme on: April 25, 2010, 07:20:32 am
Das Problem gibts ja schon länger, also wird wohl kaum nur an einer bestimmten gcc version liegen, denk ich mal.
14  Forum 2005-2010 (read only) / Deutsch / Re: Arduino Mega Startprobleme on: April 25, 2010, 03:16:59 am
gentoo und arch linux... habs mit beiden schon probiert.
15  Forum 2005-2010 (read only) / Deutsch / Re: Arduino Mega Startprobleme on: April 24, 2010, 10:27:02 am
Nein das glaube ich nicht. Vielleicht die einzigen mit Linux und daher aktuellem gcc. Was mich nervt ist, dass es auch nicht mehr geht wenn ich die Serials auskommentiere...

Und den ganzen gcc downzugraden hab ich keinen Bock.
Pages: [1] 2