Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4937

fastest way to flip a bit in I/O port, atmega328, using C?

$
0
0
Hello i'm trying to toggle a bit on my arduino CPU, the port B bit 0, i'm programming in C, and i wanna find an instruction that will take less than 100ns to execute.
so far what i have is:
"PORTB = 0" and "PORTB = 1"
both of these instructions are executing in about 120ns, according to my rough measurement.
anyone know a faster way to do this operation?

thanx, mike

Viewing all articles
Browse latest Browse all 4937

Latest Images

Trending Articles



Latest Images