Demo entry 6630900

AVR setting pins high or low

   

Submitted by Jo on Jul 11, 2017 at 11:23
Language: C++. Code size: 158 Bytes.

PORTD &= ~(1 << PD0); // PD0 goes low
PORTD |= (1 << PD0); // PD0 goes high 

PORTD &= ~(1 << PD1); // PD1 goes low
PORTD |= (1 << PD1); // PD1 goes high 

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).