Exact match. Not showing close matches.
'[PIC] 18F4321 wake from sleep on RX - strange issu'
Processor is the 18F4321
I've added a sleep instruction and wake on getting something hitting the RCREG (added the autowake on baudcon), and it does sleep, and it does wake up when I send it a character. Whats strange is that when I drop into a timing loop, it appears to hang UNLESS I break during debug, then start it again, it runs fine..does the delay, goes back to sleep.
Note: without the sleep and wake issue, the loop runs fine (its in the interupt section, just a seconds based counter...count for 5 seconds then go back to sleep).
Its not that the code isnt cycling after the wake, because I do a number of things before dropping into that loop, and I turn on an LED to show that I've entered it.
So in debug, single stepping, etc it appears to work fine, but in realtime, something is amiss....
What clock[s] are you using? If using timer1 OSC you might encounter
problems when debugging. I've come across some small issues with using
the ICD2 and sleep/wake-up-ISR on T1OSC overflow. I didn't have time to
figure out exactly if it was my problem or the ICD2's problem, but
switching to a normal programmer versus a debugger fixed the problem for
I've come to determine that the debugger isn't all that useful for me
once my project got to the stage where I could put feedback on the LCD
and "debug" it while it's running the way it will be in the end product.
If I need to debug some math operations I tend to do it in the MPSIM.
alan smith wrote:
I'll have to check to see if I tried running it true programmed mode vs debug "run". I know the timers all stop running while asleep, and thats ok, they will come back out and start running once it wakes up. Its a matter of it waking and actually running. I've done sleep before in the 16F913 without any problems, but I woke it on a change of PORTB, but an interupt is an interupt, once they are set up correctly.
--- On Sun, 8/17/08, Martin K <nnytech.net> wrote: martin
More... (looser matching)
- Last day of these posts
- In 2008
, 2009 only
- New search...