Digital output interruption in a "While" loop?

Hi guys
I'm a rookie doing its first useful project on an Arduino nano. I have 2 easy questions:

  1. When a variable condition is "True" when monitoring an input adress and I then set a digital output to HIGH, its value will be 5V and will remain 5V unless the variable condition has changed (or the Arduino is shut down), right?

  2. What happen if the variable condition evaluation is within a "While" loop? Could the output voltage have very short voltage interruption during the execution cycle of the "While" loop?
    (I don't know if the electronic device that receives that output is sensitive to very short interruption in the magnitude of some miliseconds)

When a variable condition is "True" when monitoring an input adress

What does that mean?
Edit - in question 1, which variable are you referring to? A direct read of the port, or some allocated variable?

coolboot:
(I don't know if the electronic device that receives that output is sensitive to very short interruption in the magnitude of some miliseconds)

electronic devices can toggle between high and low states at over 100 MHz (100,000,000 times a second).

However, software may not be able run as fast, it may take several usec (on Arduino) to execute code to change the state of an output bit

digitalWrite (LedPin, HIGH);

but when software changes the state of an bit in hardware, that bit can change state within pico seconds.

Typically, digital I/O also toggles synchronously. In primitive systems, it is usually the CPU clock. Now it's not uncommon to see independent clock branches for CPU and I/O but they are still generated from the same clock tree. It also means that I/O can sample faster than the CPU, which is nice. Obviously, anything set or sampled by the CPU is clocked by the CPU cycles, but any signals such as input captures that are latched, have the higher resolution of the higher I/O clock speed. I'm sure that DMA can also run at various non-CPU speeds (but definitely not on all processors).

If I understand the second question, which I'm not sure of but I think I have an idea... It is certainly possible to miss the transitions of signals that you are sampling discretely at some rate. You can never sample slower than the data than you need to capture. That is what happens when you are executing a loop that takes some time... if you make some test on an input sample, it is just what you see at that moment and says nothing about what happened all the time you ignored it.

coolboot:
2. What happen if the variable condition evaluation is within a "While" loop? Could the output voltage have very short voltage interruption during the execution cycle of the "While" loop?

Like the others I am unsure what you are asking.

If you are wondering whether some normal program activity might inadvertently cause a pin that was set HIGH to go LOW for a short period then the answer is NO. The only way to make a pin change state is to instruct it to change, for example with digitalWrite(). And if you do digitalWrite(myPin, HIGH); to a pin that is already HIGH there will be no glitch.

...R