кто может подсказать как переписать этот код с уно ,чтобы работало на мега?спасибо
if(PORTD & 0b00000100){PORTD &= 0b11111011;}//step high на 2-м пине
else {PORTD |= 0b00000100;}//step low
if(PORTD & 0b00100000){PORTD &= 0b11011111;}//step high на 5-м пине
else {PORTD |= 0b00100000;}//step low
}```
if(PORTE & 0b00010000){PORTE &= 0b11101111;}//step high на 2-м пине
else {PORTE |= 0b00010000;}//step low
if(PORTE & 0b00001000){PORTE &= 0b11110111;}//step high на 5-м пине
else {PORTE |= 0b00001000;}//step low
Writing a logic one to PINxn toggles the value of PORTxn, independent on the value of DDRxn. Note that the SBI instruction can be used to toggle one single bit in a port.