Mike, why your suggestion is not the same?
Ioannis
Mike, why your suggestion is not the same?
Ioannis
Louis stated there was a STACK Underflow flag set in the PCON Register. I looked over his/her posted code and the only place I could find where a CALL/RETURN mis-match could occur was in the posted line of code. By specifying a "GOTO" there, the Stack would not be modified with a RETURN PC Address. I suggested a test to eliminate the possibility of the STACK Underflow condition being caused by that line of code.
The
is exactly the same asCode:then DoneRotEnc
orCode:then goto DoneRotEnc
Or not?Code:@ goto DoneRotEnc
Ioannis
not to mention that mine ,same code same chip does not reboot
Warning I'm not a teacher
Then maybe a bad supply voltage, bad decoupling capacitors, bad breadboard connections...
Ioannis
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 08:33.
Warning I'm not a teacher
Bookmarks