I tried to re-use Richards code, but I have encoder on PORTB.3 and PORTB.4 and not using button. I've changed enc_a to portb.4
and enc_b to portb.3, but I guess I also have to modify re = porta&12 ? to what it set?
I tried to re-use Richards code, but I have encoder on PORTB.3 and PORTB.4 and not using button. I've changed enc_a to portb.4
and enc_b to portb.3, but I guess I also have to modify re = porta&12 ? to what it set?
its a simple binary mask used to select only the port pin data from the two pins of interestI've changed enc_a to portb.4 and enc_b to portb.3, but I guess I also have to modify re = porta&12 ? to what it set?
the mask value is 2 to power of enc_a.bit + 2 to power of enc_b.bit.
you also need to shift the data gathered into bits 0 and 1 for proper evaluation
Warning I'm not a teacher
Bookmarks