Thanks Bruce ,
with a little playing around got that to work the way i need it to. The only thing to do now then is that this program has 2 "sleep" modes .
1 that sleeps for 1 second which using code Bruce helped with works fine, but i had the other sleep mode which runns for around 8 hrs using a PBP "Sleep 28800" i.e sleep for 28800 seconds = 8 hrs . Obviously i am trying to save as much power during this sleep as possible, so rather than use the PBP sleep command is there a more efficent way of doing this long sleep using ASM Sleep, do i have to set my watchdog prescaler for as big as it goes and count how many times it wakes up ? i belive the largest prescale time i can set is 65536 which would equate to 2.11 seconds , dosent seem logical to have it wake up every 2 seconds advance a counter then sleep again..
Am i better off just using the PBP sleep ? or am i missing something ?