PWM obviously require computing resources (and thus cannot be done simultaneously with other processes), but if I were to set a pin as output 5V or 0V, do these states remain constant or are they repeatedly "refreshed" as the microcontroller works on other processes?
This is hard to explain in text so I thought of an analogy to my question. Imagine I have a glass in my hand and am instructed to put it on the table. Then I am instructed to sit down in a chair.
The glass on the table is a state. Do I leave the glass on the table, or do I pick it back up and sit down and the repeat very quickly so you do not realize the glass was ever removed from the table?
Or perhaps more simply, does the microcontroller "forget," if you will, about the states of its pins unless you explicitly program a state change?
Hopefully I made that as confusing as possible.