hey, first post here!
Trying to use 328p to take digital input from three pins and reproduce on three other. The trio of input pins are on the same register and the trio of output pins are on another so that makes things quite easy. Without going into the details, let say it's a multilevel learning experience...
#define F_CPU 16000000UL #include <avr/io.h> int main(void) { DDRD = DDRD | 0B00011100;//sets pins PD2, PD3, PD4 as output while (1) { PORTD = (PINB & 56) >> 1; } }
So all is fine and works "ok"... BUT... Every couple cycles I get 500ns longer pulse.
The input wave looks just fine so it's not a trigger problem on the scope. I can probably take picture of the scope if that can help.
I'm running out of keywords to put in google but ISR seems pretty good. Issue with this is that I thought my one line code did not call for interrupt...
Any keywords accepted! Feel free to state the obvious