Linear blinking pattern on PORT D
Here the delay has been provided a static value.
To produce a incrementing or decrementing delay review the following code:
....
int del=100;
_delay_ms(del--); // WON'T WORK! => As of Atmel studi 4, the _delay_ms() function needs to be provided a constant;
....
INSTEAD USE:
void delay_ms(uint16_t delay){ // own function to pass a dynamic value of delay
while(delay--){
_delay_ms(delay);
}
}