View previous topic :: View next topic |
Author |
Message |
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
Sleep() & Interrupts - SOLVED |
Posted: Thu Nov 18, 2010 7:21 am |
|
|
Hi all,
Project: datalogger
PIC: 16f876A
RTC: DS1305
Memory: 25LC256
when my code puts the pic to sleep, after some time RTC Alarm wakes the pic, operation resumes, PIC does its thing and goes back to sleep.
my understanding is that when the pic is in sleep any interrupt will wake it up.
The RTC alarm is using INT_EXT and it works fine.
i want to be able to wake the PIC using the INT_RDA as well.
i sent characters to the pic while it was sleeping and nothing happend.
which to me it means that the pic is not waking up and that the character i send is not even triggering the INT.
is this normal?
Thank you for your help _________________ CCS PCM 5.078 & CCS PCH 5.093
Last edited by Gabriel on Thu Nov 18, 2010 1:51 pm; edited 1 time in total |
|
![](templates/subSilver/images/spacer.gif) |
Wayne_
Joined: 10 Oct 2007 Posts: 681
|
|
Posted: Thu Nov 18, 2010 8:07 am |
|
|
Looking at the data sheet:-
"10.2 USART Asynchronous Mode"
"Asynchronous mode is stopped during Sleep." |
|
![](templates/subSilver/images/spacer.gif) |
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
|
![](templates/subSilver/images/spacer.gif) |
Wayne_
Joined: 10 Oct 2007 Posts: 681
|
|
Posted: Thu Nov 18, 2010 8:33 am |
|
|
They are different chips, the 6722/8722 will wake up on transition off the RX signal, the 16f876A will not.
The 16f876A will however wakeup if you use synchronus mode because it can still clock in the data and will interrupt upon reception of the data.
Workarounds consit of, connect the RX input to an EXT_INT pin or use a different chip. |
|
![](templates/subSilver/images/spacer.gif) |
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
SOLVED |
Posted: Thu Nov 18, 2010 9:00 am |
|
|
Quote: | Workarounds consit of, connect the RX input to an EXT_INT pin or use a different chip. |
Yeah, thats what i thought...
Wayne_ Thank you very much for your help.
Gabriel _________________ CCS PCM 5.078 & CCS PCH 5.093 |
|
![](templates/subSilver/images/spacer.gif) |
bkamen
Joined: 07 Jan 2004 Posts: 1611 Location: Central Illinois, USA
|
|
Posted: Thu Nov 18, 2010 9:25 am |
|
|
consider putting 'SOLVED' in the subject of the first post so it shows up in the topic list.
cheers,
-ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
![](templates/subSilver/images/spacer.gif) |
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
|
Posted: Thu Nov 18, 2010 1:51 pm |
|
|
sorry... that was my intention... i spaced out and put it on the wrong part.. _________________ CCS PCM 5.078 & CCS PCH 5.093 |
|
![](templates/subSilver/images/spacer.gif) |
|