The
is exactly the same asCode:then DoneRotEnc
orCode:then goto DoneRotEnc
Or not?Code:@ goto DoneRotEnc
Ioannis
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
Hi All,
Just had a chance to try Mike's suggestion, terminal result below, still no good.
@ RichardCode:Power-on: 00011001 - 00011101 Priming PCON: 00011001 - 00011111 I'm Alive RE_val 00001 RE_val 00002 RE_val 00003 RE_val 00004 RE_val 00005 RE_val 00006 RE_val 00007 RE_val 00008 RE_val 00009Power-on: 00011001 - 01011111 Priming PCON: 00011001 - 00011111 I'm Alive RE_val 00001
I take your point about using an Int for the REsw but this code is only a snippet of a much larger, intensive program and the normal scan of the switch may be delayed due other processes - hence my using an Int for the pushbutton. I have not run the full code with this problem, only what has been submitted for this very reason (isolation of where the problem lies). I have tried with and without the REsw bit, still no difference with the bug.
@ Ioannis
The test pcb I've been using all along (and a breadboard to confirm) runs very well when I switch to the 16F886, supply is from a well regulated 9v bench unit which then gets regulated on board to either 5v or 3v3 as needed. The RE and all peripheral components are hard soldered on the pcb.
AFAIK I'm running the latest version of DTInts having found that out the hard way a number of weeks ago, identified by Richard (thanks again mate).
Maybe it is time to give up on this and go with your preferred way of using a RE Richard... but I'd like to solve the mystery if possible else have that nagging doubt using 16F1788 chips with Ints.
Cheers,
Bill
your not trying to run chip at less than 5v ? decouple caps etc [i'm using none]
reset is pulled high ?
enc and sw pins are pulled high with suitable r
i cannot get mine to fail no matter hard i try , no caps, pwr off pk4 , dupont leads on a breadboard [you can't get worse conditions]
even using wpu is ok
i will go out on a limb and say
code cause 0%, isr cause 0% . other 100%
also when breadboarding all unused pins set as i/p is a good thing
Warning I'm not a teacher
Bookmarks