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

? wakeup from sleep on I2C interrupt

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







? wakeup from sleep on I2C interrupt
PostPosted: Fri Jan 24, 2003 2:43 pm     Reply with quote

<font face="Courier New" size=-1>Hello,

I have a problem with some code for the 16F873 (configured with H/W I2C, slave mode) which is supposed to wakeup from sleep mode when a message on the I2C port arrives. I developed and tested all my code using the Microchip ICE2000 with sleep mode turned OFF, as the emulator stops communicating with MPLAB when the micro enters SLEEP.

Everything worked well when I commented out the line that causes the micro to enter sleep, but with that line in, it appears that the first of 5 short ( roughly 4 byte) messages I send to the PIC is not received.

I'm using PCM version 3.104. Has anyone got any suggestions?

I can post some code but I don't know if that is needed yet.

Thanks

Mark

</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 10975
PCM programmer



Joined: 06 Sep 2003
Posts: 20385

View user's profile Send private message

Re: ? wakeup from sleep on I2C interrupt
PostPosted: Fri Jan 24, 2003 3:30 pm     Reply with quote

:=I have a problem with some code for the 16F873 (configured with H/W I2C, slave mode) which is supposed to wakeup from sleep mode when a message on the I2C port arrives. I developed and tested all my code using the Microchip ICE2000 with sleep mode turned OFF, as the emulator stops communicating with MPLAB when the micro enters SLEEP.
:=
:=Everything worked well when I commented out the line that causes the micro to enter sleep, but with that line in, it appears that the first of 5 short ( roughly 4 byte) messages I send to the PIC is not received.
:=
:=I'm using PCM version 3.104. Has anyone got any suggestions?
----------------------------------------------------------

See Figure 12-11 of the 16F87x data sheet. It shows the timing
diagram for "Wake-up from Sleep through Interrupt". There is
a delay of 1024 Tosc (ie, 1024 clocks) before the PIC wakes up.
With a 4 MHz crystal, this would be 256 usec. Is this long
enough to account for your missing bytes ?

I assume you're now testing the circuit without the ICE.
___________________________
This message was ported from CCS's old forum
Original Post ID: 10976
Mark DSylva
Guest







Re: ? wakeup from sleep on I2C interrupt
PostPosted: Mon Jan 27, 2003 8:20 am     Reply with quote

:=----------------------------------------------------------
:=
:=See Figure 12-11 of the 16F87x data sheet. It shows the timing
:=diagram for "Wake-up from Sleep through Interrupt". There is
:=a delay of 1024 Tosc (ie, 1024 clocks) before the PIC wakes up.
:=With a 4 MHz crystal, this would be 256 usec. Is this long
:=enough to account for your missing bytes ?
:=
:=I assume you're now testing the circuit without the ICE.

Thanks, It's working now... I should have checked that the data sheet which I was using was the most recent, it was an advance version and this data was not in it. I'll have to make sure I have the latest data sheets next time.
And yes, I am not using the ICE now, but a FLASH part.

Mark
___________________________
This message was ported from CCS's old forum
Original Post ID: 11031
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