Quote Originally Posted by mister_e View Post
Yes you can do something like that... but the assembler line @ sleep will send your PIC in sleep mode forever... or 'till an interrupt happen. PBP SLEEP will send your PIC in sleep mode for a x period of time and then wake up. It's really up to you. I prefer the @ SLEEP
Thanks you all.

So I can use something like:


ON INTERRUPT GOTO myinthandler

start:
@ sleep


myinthandler:
...

In this case my main program is only the @sleep instruction and once the int has been processed, it goes back to sleep until next interrupt, is that right?