Re: Rotary encoder with DT interrupts
would seem that way , although his dt_ints may be altered.
only changes i made
latc.6 = 1 ' reversed polarity tty
serout2 PORTC.6,84,[13,10,"I'm Alive",13,10,10]
although code has a few weird things they don't cause the problems, if i use a nice clean optical re the code fails to count up or down as per reply 9
a filtered mechanical re also miscounts , no filter gives a semblance of functionality. i will keep to my code
OPTION_REG.6 = 0 ' INTEDG set to interrupt on falling edge. ?
' OPTION_REG.6 = 1 ' INTEDG set to interrupt on rising edge.
IOCBN = %01110000 ; REa portb.6, REb portb.5, REsw portb.4 neg edge trigger - falling edge only.
why set the sw to cause an interrupt
Last edited by richard; - 12th February 2021 at 07:33.
Warning I'm not a teacher
Bookmarks