CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Sleep() & Interrupts - SOLVED

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

Sleep() & Interrupts - SOLVED
PostPosted: Thu Nov 18, 2010 7:21 am     Reply with quote

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
Wayne_



Joined: 10 Oct 2007
Posts: 681

View user's profile Send private message

PostPosted: Thu Nov 18, 2010 8:07 am     Reply with quote

Looking at the data sheet:-

"10.2 USART Asynchronous Mode"

"Asynchronous mode is stopped during Sleep."
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Thu Nov 18, 2010 8:11 am     Reply with quote

hi Wayne_

i found this thread doing some further research:
http://www.ccsinfo.com/forum/viewtopic.php?t=36125&highlight=waking+rda

i believe your answer is closely linked to the topic discussed in the thread above...

.... any workarounds?

thanks for your help.
_________________
CCS PCM 5.078 & CCS PCH 5.093
Wayne_



Joined: 10 Oct 2007
Posts: 681

View user's profile Send private message

PostPosted: Thu Nov 18, 2010 8:33 am     Reply with quote

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.
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

SOLVED
PostPosted: Thu Nov 18, 2010 9:00 am     Reply with quote

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
bkamen



Joined: 07 Jan 2004
Posts: 1611
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Thu Nov 18, 2010 9:25 am     Reply with quote

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
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Thu Nov 18, 2010 1:51 pm     Reply with quote

sorry... that was my intention... i spaced out and put it on the wrong part..
_________________
CCS PCM 5.078 & CCS PCH 5.093
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group