yep a 16f84. thanks for your help, i got portb.1 through a resister strait to a rectifier so I guess OPTION_REG.6 = 0 for a negative edge??
yep a 16f84. thanks for your help, i got portb.1 through a resister strait to a rectifier so I guess OPTION_REG.6 = 0 for a negative edge??
found the problem, it was the watchdog but now i can get the interupt to trigger properly.
it seems like once the interrupt is triggered it just keeps triggering? even if I strap it to ground while running? strange
Code:on interrupt goto firetriac intcon = %10010000 scan: fire = 0 if up = 1 then delay = delay + 100 if delay > maxdelay then delay = maxdelay endif lcdout 254,1, dec delay endif if down = 1 then delay = delay - 100 if delay < 100 then delay = 100 endif lcdout 254,1, dec delay endif goto scan disable firetriac: pauseus maxdelay - delay fire = 1 pauseus 10 fire = 0 intcon.0 = 0 resume enable
Must be INTCON.1=0
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
well... your first code was right
but i noticed the INTCON change between your 2 version, then i looked into the datasheet to confirm it could be the problem.. seems yes.
Out of curiosity, which version of the compiler are you using? The Watch-Dog reset sounds weird to me as the compiler should handle it for you... unless you ask to not doing it with a DEFINE.
I could also bet on a hardware problem... but i don't see any schematic... bah... since it's working now![]()
Last edited by mister_e; - 25th April 2008 at 15:46.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
2.46 it doesnt seem to do it anymore but when it did i unchecked the wdt box on ic prog
Bookmarks