Arduino always doing things on the background?

Hi,

I am new to Arduino (I have been using Bascom for a time). I understand that Arduino is always updating the clock used by millis() and may be doing a few other other thing on the background that dont seem to be very clearly documented. Is it so? If yes, is there an easy way to disable all that?
I do need to have a precise timing(without any jitter) when executing my code. Is it possible?

Thanks a lot for your help,

Manuel

I understand that Arduino is always updating the clock used by millis() and may be doing a few other other thing on the background that dont seem to be very clearly documented. Is it so?

No, I don't think it is so.
I'd say it is very clearly documented - in fact, you've got the source, so you can find out for yourself.

What are you doing that you feel would be impacted by this?

what do I do to disable all the background tasks like updating millis() ?

Thanks,
Manuel

Disable interrupts, thats whats going up. Milis is updated by a timer overflow, either stop the timer or disable interrupts.

There are some activities that are performed in response to interrupts, like updating timers, including the one used by millis(). You could take careful aim at your foot, and disable interrupts.

I don't think that this is going to be a solution to your unstated problem, though. So much stuff that the Arduino does, like PWM, Servo control, receiving serial data, updating timers, etc. requires interrupts.

I do need to have a precise timing(without any jitter)

Well, now, that is going to be difficult if you've disabled the timers.

Maybe he is using cycle counted assembly.

I am trying to send a given number of pulses to a 17/128th microstep controller and also send trigger pulses to a video camera each 1280 microsteps. The timing needs to be as precise(no jitter) as possible

Manuel

Sorry, I wanted to say 1/120th micro step controller.
If I disable interrupts, I cannot use delayMicroseconds(), can I ?

Senso,

disabling / enabling interrupts with cli() and sei() seem to solve the problem and I can stil use delayMicroseconds() as I wanted.

Thanks so much!

Manuel