its a simple binary mask used to select only the port pin data from the two pins of interest
the mask value is 2 to power of enc_a.bit + 2 to power of enc_b.bit.
you also need to shift the...
Type: Posts; User: richard; Keyword(s):
its a simple binary mask used to select only the port pin data from the two pins of interest
the mask value is 2 to power of enc_a.bit + 2 to power of enc_b.bit.
you also need to shift the...
tried it on Arduino mega
@100uS it worked
@200uS its patchy
@400uS or longer its crap
conclusion , not much use but quaint
it looks like a cruel hoax to me, maybe you need to sign up to get the working version.
if the encoder is static [on detent] after 12 polls state=0xffff
you then need 12 polls in a row where the...
pbp uses 4 of them before your code even starts
now see what happens when
num_digits con 5 is changed
try 4 up to 9 or beyond
also try changing
msd_limit con 5
moved enc to porta 234 on 16f648a, reduced nesting by two levels
now works
'****************************************************************
'* Name : LCD_TEST.BAS ...
I don't use lcd's or pic16's much but here is a trap
inline math for lcdout on a pic16 turns to crap,you need to do the math first then print result
tmp2 =digit[tmp1]+$30
I have the identical rotary encoder module and use no caps at all on it,
I have used a pic18f458 @8mhz , a pic18f25k22 @64mhz they both work perfectly.
I don't have a pic16 chip with the correct...
oops
and moved it to portc too to match your setup
I originally had encoder on pins 4,5 . and missed fixing that line when I moved re pins to 5,6
it only sets re initial state so after first move its not important , the first move could be in error...
if you do it more algorithmically the size can be reduced dramatically ,it becomes scalable digit wise
more functions can easily be added and the mcu can be employed to perform a real task like...