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 CCS Technical Support

CAN simulation in proteus using CCS compiler

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



Joined: 31 Oct 2011
Posts: 1

View user's profile Send private message

CAN simulation in proteus using CCS compiler
PostPosted: Mon Oct 31, 2011 9:34 pm     Reply with quote

Hi
I am trying to simulate can in proteus. I am using PIC18F4680. When i simulate code in proteus can_init() function gives message " read can controller register CANSTAT returns last value stored. The program is stuck over here and further statements are not executed. Any suggestions would be welcome
temtronic



Joined: 01 Jul 2010
Posts: 9229
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Nov 01, 2011 5:17 am     Reply with quote

You'll have to show us your code, at least the smallest, compilable program that has the fault. Also supply the compiler version. Be aware that Proteus is full of bugs, errors and bad DRCs so the real problem could be Proteus and not your code. It is always best to use real hardware.
Ttelmah



Joined: 11 Mar 2010
Posts: 19519

View user's profile Send private message

PostPosted: Tue Nov 01, 2011 10:18 am     Reply with quote

Looking at the error message, I'd say Proteus problem.
It seems to be saying that 'CANSTAT' returns the last value stored. However CANSTAT, is a read only register, so can't even have a 'last value stored'.
CCS read this in the init, when they switch the mode of the can peripheral and wait for the peripheral to say in CANSTAT, that it has switched to that mode.

Best Wishes
future



Joined: 14 May 2004
Posts: 330

View user's profile Send private message

PostPosted: Tue Nov 01, 2011 5:14 pm     Reply with quote

As far as I know, CAN is not implemented in Isis.
Ttelmah



Joined: 11 Mar 2010
Posts: 19519

View user's profile Send private message

PostPosted: Wed Nov 02, 2011 2:54 am     Reply with quote

That would certainly explain it!.....

Best Wishes
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