Go Down

Topic: Faster development environment? (Read 867 times) previous topic - next topic

sirnoname

Oct 08, 2012, 03:44 pm Last Edit: Oct 08, 2012, 03:46 pm by sirnoname Reason: 1
Hello together,

I did the blink test without delays to get informations about the speed that a loop can have.
I got 117,32 kHz pulse on the oscilloscope with the usual 16MHz frequency of the arduino uno.
My question is: is there a IO switching delay by the arduino uno (328) or is this a lost of the writedigital commands?
The second question would be: is there another well known software like the AVR Studio that can upload the firmware with the arduino bootloader?

Best regards,
SirNoName

PaulS

Quote
is there a IO switching delay by the arduino uno (328) or is this a lost of the writedigital commands?

The digitalWrite() function needs to map a pin to a port. This is not necessarily very fast. Direct port manipulation (google phrase for you to pursue) is much faster.

Quote
is there another well known software like the AVR Studio that can upload the firmware with the arduino bootloader?

Well, there's AVR Studio...

AWOL

First question, digitalWrite is quite slow, but it would be better if you
a) stated your aim
b) posted your code.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

sirnoname

Hi,

my aim was simple to demonstrate a slowdown problem where I am not sure it is one.
I am happy that someone can point me to a faster solution which I do not know for now.
The code is, as written, the standard blink sample of the arduino gui with the delays removed.

How you can upload a AVR Studio project to a arduino HW?

thanks for your comments,
SirNoName

AWOL

Quote
I am happy that someone can point me to a faster solution which I do not know for now.

A solution to what?

If you want the ultimate speed, direct port manipulation and an explicit loop inside the "loop()" function, though there will still be a slight asymmetry in the output.
Use the hardware if you want 8MHz square wave.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

sirnoname

Hi, 

I will search for the direct output manipulation to avoid the write command. Toorrow I will test it again.
I do not bother about asynchron outputs, it is a question of the throughput of the CPU and the used background SDK that I try to test.
It is a simple benchmark before I program parts in a CPU that will be to slow for them like PID calculations for 3 DC motors and a aim loop timing of 1kHz.

Best regards,
SirNoName

westfw

Extensive discussion here: http://arduino.cc/forum/index.php/topic,4324.0.html

Also search for "digitalWriteFast"

CrossRoads

Atmel Studio is a development environment like the Arduino IDE, it creates hex code that you down, like your sketch.

You can download it here
http://www.atmel.com/tools/atmelstudio.aspx?tab=overview
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Go Up