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

can wake-up/corrupt project

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







can wake-up/corrupt project
PostPosted: Sat Jun 02, 2007 6:10 pm     Reply with quote

Hey,
I have a CAN device that wakes on bus activity. When I open the project and do compile and program to the proto it works fine. Any subsequent compile,program sequence and it works but won't wake on bus activity.
when i close the project and then re-open it and do a compile, program sequence the proto again works correctly.
Any thoughts?
I thought maybe I had a corrupted project but rebuiding in a new project didn't change anything.

Using PIC18F4680; PCH 4.036(downloaded 2 days ago)
MPLAB 7.60

Thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Jun 02, 2007 6:40 pm     Reply with quote

What was your previous compiler version ? Check if your problem
is caused by the change in the behavior of the "address of" operator
starting with vs. 4.021. Read this thread and the links in it.
http://www.ccsinfo.com/forum/viewtopic.php?t=30623
Guest








PostPosted: Sat Jun 02, 2007 8:13 pm     Reply with quote

No, I already went through that some versions ago.
What causes a corrupt project anyway?

What I really can't get is that it works the first time but not after that.

usually its good or no good. not in between.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Jun 03, 2007 12:55 am     Reply with quote

1. Startup MPLAB. Compile the file. Program it into the PIC.

2. Re-compile. Click the Verify button in the ICD2 toolbar in MPLAB.


This will tell you if the code is different. If it verifies OK, then you
can start looking for the problem elsewhere.
Guest








PostPosted: Sun Jun 03, 2007 5:35 am     Reply with quote

great suggestion. But that wasn't the issue. I removed the #use fast_io statments for the ports and it all works now. I can only guess that the TRIS seting for CANR(RB3) is not retained when the device sleeps. Upon the next period of bus activity the CANR pin is not an input and it never generates the interrupt to wake up the PIC. I will have to investigate further when I have some time.

Thanks for your help
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