Equivalent for PORTB in Arduino Mega 2560 Like I said in the subject, I would like to know the equivalent for the instruction:

PORTB |= 0x01;
PORTB &amp;= ~0x01;


More precisely I was using it to trigger a fast pulse conversion on my shield-ADC on an Arduino Uno. Now I am using an Arduino Mega 2560.

Can you write the exact same instruction for ATMega2560?
This code sends a pulse on pin PB0, which on the Uno is equivalent to
digital 8. On the Mega, digital 8 is PH5, thus you would write

PORTH |= _BV(PH5);
PORTH &amp;= ~_BV(PH5);


The equivalence between the Arduino pins and the AVR pins is provided in
the official
documentation, but
there are nicer versions at pighixxx.com:


Uno pinout
Mega pinout