fail arduino

Hi friend!
Arduino pro mini 368p

I attached waveform.

Oscilloscope shows that Arduino interrupted every 1 millisecond

How to fix?

void setup() {
DDRD = B00101000;
}
void loop() {
while (1) {
PORTD = B00101000;
PORTD = B00101000;
PORTD = B00000000;
PORTD = B00000000;
}}

How to fix?

How is broke?

fable_x:
Oscilloscope shows that Arduino interrupted every 1 millisecond

How to fix?

That's the Arduino Timer0 interrupt handler, which is initialized by the Arduino core library and used for millis() and delay() functions, provided by the Arduino core libraries.

If you want to control the controller by 100% low level routines without any "Arduino magic" being active, you perhaps better do not initialize the Arduino core, do not use setup() and do not use loop(), but instead use a sketch like that with a 'main()' function:

int main() 
{
  DDRD = B00101000;
  while (1) 
  {
    PORTD  = B00101000;
    PORTD  = B00101000;
    PORTD  = B00000000;
    PORTD  = B00000000;
  }  
}

In that case you don't have any "Arduino magic" running in the background.

arduino new.
It all Arduino!
Checked 3 Arduino

thank you!
Everything works great!