Searching \ for '[PIC] 18F4321 wake from sleep on RX - strange issu' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: piclist.com/techref/microchip/ios.htm?key=rx
Search entire site for: '18F4321 wake from sleep on RX - strange issu'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] 18F4321 wake from sleep on RX - strange issu'
2008\08\15@113644 by alan smith

picon face
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....



     

2008\08\17@102350 by Martin K

face
flavicon
face
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
me.
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.
-
Martin

alan smith wrote:
{Quote hidden}

2008\08\18@172239 by alan smith

picon face
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 <spam_OUTmartinTakeThisOuTspamnnytech.net> wrote:

{Quote hidden}

> --

More... (looser matching)
- Last day of these posts
- In 2008 , 2009 only
- Today
- New search...