Digital read/write pinMode : Fast Execution

Hello All.

I am trying to test some Fast Execution Commands in type of pinMode, digitalWrite …
But i have a problem with “Verify”. Program announces mistakes when i use above commands.
So for using that commands, Do i have to import any library or do anything ?

An example code below use these commands, please help me check this code to fix it.

Thanks All!
PS Sorry my bad English

sketch_nov28b.ino (517 Bytes)

Arduino Mega?

hi robtillaart,

I am using Arduino2560.

And here is the code. Please, help me!

void setup() {
// initialize the digital pin as an output.

(DDRH |= _BV (5)); // pinMode (8, OUTPUT);
//(DDRH &= ~_BV (4));
}

// the loop routine runs over and over again forever:
void loop() {

PORTH |= _BV (5); // digitalWrite (8, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
PORTH &= ~_BV (5); // digitalWrite (8, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second

}

But i have a problem with "Verify". Program announces mistakes when i use above commands.

What are the error messages?
would be helpful to post them exactly as they appear too.

what board have you selected in the tools menu?

Thanks so much for your help!

I found my mistake by choosing wrong board.

Thank you again :smiley: and Best Wish for you!