hehe i had this impression of 'already said before' or "DEJA VUE' depending french ore english version you want to have.
Now that we are 3 with the same version/results... i must be true![]()
hehe i had this impression of 'already said before' or "DEJA VUE' depending french ore english version you want to have.
Now that we are 3 with the same version/results... i must be true![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I did try disabling the brown out and got interesting results. I think I mentioned above that I have a button triggering an interrupt that flashes an LED. Well, with brown out disabled, the LED constantly flashes. I don't have to press the button. (At least it runs, but not how I'd hoped.) I should have mentioned that I'm using the internal oscillator. Honestly, I'm not sure what it is running at. I think it defaults to 4MHz.
Can you post your code?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
The idea is that the chip sleeps until it gets an interrupt. This all works fine with 6 volts. I'm not setting the brown out to disabled here because I have to do it via the programmer (believe me, I've tried it both ways). I also set the internal oscillator with the programmer. It only has a setting for internal with or without the clock, not a frequency.
Code:
Thanks!Code:'---------------------------------------------------------------- ' includes '---------------------------------------------------------------- Include "modedefs.bas" '---------------------------------------------------------------- ' definitions '---------------------------------------------------------------- '---------------------------------------------------------------- ' constants '---------------------------------------------------------------- '---------------------------------------------------------------- ' variables '---------------------------------------------------------------- i var byte '---------------------------------------------------------------- ' init '---------------------------------------------------------------- init: ' set all VARs to zero clear ' set configuration fuses @ DEVICE pic16F628A, WDT_OFF ' turn watchdog timer off ' set up interrupt handler INTCON = %10010000 OPTION_REG = 0 on interrupt goto handleInterrupt low 7 ' set portb/0 to input TRISB.0 = 1 '---------------------------------------------------------------- ' main '---------------------------------------------------------------- main: sleep 0 pause 1 ' blink an LED on pin RB7 for i = 0 to 3 high 7 pause 300 low 7 pause 300 next goto main '---------------------------------------------------------------- ' handleInterrupt '---------------------------------------------------------------- disable handleInterrupt: ' globally turn off interrupts INTCON.7 = 0 ' clear the interrupt triggered flag INTCON.1 = 0 resume enable END
-Tom
Bookmarks