Pages: [1]   Go Down
Author Topic: Faster development environment?  (Read 545 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: October 08, 2012, 08:46:33 am by sirnoname » Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 547
Posts: 45960
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 237
Posts: 24278
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

First question, digitalWrite is quite slow, but it would be better if you
a) stated your aim
b) posted your code.
Logged

"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.

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 237
Posts: 24278
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

"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.

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 106
Posts: 6364
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Also search for "digitalWriteFast"
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 435
Posts: 23597
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

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.

Pages: [1]   Go Up
Jump to: