Pages: [1]   Go Down
Author Topic: How to break or block internal arduino process?  (Read 859 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I develop photo frame with avr atmega8,16.
http://www.circuitidea.com/Article/DIY-photo-frame-with-BL-TFT240320PLUS.html



I try to port to arduino. but speed is slower than native code.
I think. There are a process running on background.
Is it posiable to break process when plot data to screen?
Logged

ottawa, canada
Offline Offline
God Member
*****
Karma: 6
Posts: 990
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You could use noInterrupts(); and I don't think anything would run other than your code but I doubt that's the problem.  What are you comparing to code-wise and how big a difference are you seeing?

I'm thinking it's something to do with using arduino/wiring function calls vs native c or machine language.

pretty display by the way.
Logged

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

For all practical purposes, there is NO "background process" in arduino.
However, the level of abstraction provided by an arduino function call like digitalWrite(pin, val) makes it MUCH slower than something like "sbi PORTB,4"   About 20x slower.
There has been a fair amount of discussion on this in other threads.
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1230286016
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thank westfw.
I try to make arduino compatable, digitalWrite(pin,val).
I will try to change back to sbi. Orginal code use sbi.
Logged

Pages: [1]   Go Up
Jump to: