I have the following snippet that seems to be taking a total of 6 CPU cycles per invocation.
Can I speed this up somehow?
x is a byte with the 3 lowest bits set.
#define SET_COLOR(x) PORTB = (PORTB & ~(7)) | x
Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. It only takes a minute to sign up.Sign up to join this community