Quote Originally Posted by longpole001 View Post
...any way another question has come to light which i am not clear on the answer

i have routine that sets the sleep command
i have a interupt triggered routine to goto when it it wakes up ,
but where does the rotuine return to when its completed

it does not seem to return to the place after the sleep command ??
Pseudocode:
Code:
mainloop:
  Sleep                        ; go to sleep
  on interrupt do something    ; wake-up and jump to your ISR
  goto mainloop:               ; return here