user49784: I have written a simple Arduino sketch, that shall produce a clock signal. 
Here is the code: 
void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(8,HIGH);
  delayMicroseconds(500);
  digitalWrite(8,LOW);
  delayMicroseconds(500);
} 

Namely the pin 8 of Arduino Uno is periodicaly set to HIGH and LOW.
The output that I receive, for three different frequencies, is: 



My question is: Why is falling edge not as sharp as rising edge? As can be noted, for high frequencies the signal wouldn't go to LOW after all.

user614: The pin is not configured as OUTPUT.
By default, all of the GPIO pins on pretty much any microcontroller are configured as inputs following reset. This prevents the chip from "fighting" an external device that might be driving any of those pins before the firmware has had a chance to configure the GPIO correctly.
On the MCU used on the Arduino, the output latch controls the state of an internal pullup resistor when the pin is configured as an input. Your code was simply enabling and disabling this resistor. When you set the pin low, it makes the pin open-circuit, and you see a slow decay of voltage through your oscilloscope probe.

49784: <p>I have written a simple Arduino sketch, that shall produce a clock signal. </p>

<p>Here is the code: </p>

<pre><code>void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(8,HIGH);
  delayMicroseconds(500);
  digitalWrite(8,LOW);
  delayMicroseconds(500);
} 
</code></pre>

<p>Namely the pin 8 of Arduino Uno is periodicaly set to HIGH and LOW.</p>

<p>The output that I receive, for three different frequencies, is: </p>

<p><a href="https://i.stack.imgur.com/9OII3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9OII3.png" alt="enter image description here"></a></p>

<p><a href="https://i.stack.imgur.com/xN1q9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xN1q9.png" alt="enter image description here"></a></p>

<p><a href="https://i.stack.imgur.com/m287Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/m287Y.png" alt="enter image description here"></a></p>

<p>My question is: Why is falling edge not as sharp as rising edge? As can be noted, for high frequencies the signal wouldn't go to LOW after all.</p>
 614: <p>The pin is not configured as OUTPUT.</p>

<p>By default, all of the GPIO pins on pretty much any microcontroller are configured as inputs following reset. This prevents the chip from "fighting" an external device that might be driving any of those pins before the firmware has had a chance to configure the GPIO correctly.</p>

<p>On the MCU used on the Arduino, the output latch controls the state of an internal pullup resistor when the pin is configured as an input. Your code was simply enabling and disabling this resistor. When you set the pin low, it makes the pin open-circuit, and you see a slow decay of voltage through your oscilloscope probe.</p>
