Go Down

Topic: How to break or block internal arduino process? (Read 934 times) previous topic - next topic

whoami

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?

bill2009

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.

westfw

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

whoami

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

Go Up