This does the same:- "PIND=PIND^0b00000100;"
Also, the simulator fails to recognise PD2, and after it tells me with a message, clicking [Edit] also crashes the simulator.
(ATMega328P / UNO )
Code: Select all
DDRD|=0b00000100; // Make pin 2 an output.
// PIND^=(1<<PD2); // Tried this first, simulator won't recognise PD2 then crashes on [Edit] press.
PIND^=(1<<2); // Crashes the simulator, (it locks up).
// PIND=PIND^0b00000100; // This crashes the simulator too, same as above line.