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

Simulation of 12F629 and 12F675 issue

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



Joined: 13 Apr 2005
Posts: 7

View user's profile Send private message

Simulation of 12F629 and 12F675 issue
PostPosted: Wed Jun 22, 2005 8:13 am     Reply with quote

This message is for all users of the CCS compiler that are also using Proteus VSM to simulate / debug there designs. We found an issue with the CCS compiler and the simulation of the 629 and 675. The following is regarding this.

The problem is a result of an operation when you use the INTRC fuse. The compiler generates a call to the last memory location to retrieve a calibration constant.

In hardware microchip inserts a "RETLW cc" into the last location where cc is the calibration constant for the device.

Proteus VSM does not model this at present (mainly because MPLAB doesn't either!!). The MPLAB documentation merely says to remove the fuse setting for software simulation.

The solution in the short term is to restore it from C by adding a line like this to your CCS program :

#ROM 0x3ff = {0x3480}

Where 0x3ff is your last location (may be different according to variant) and the 80 is an example cc.

You can also have a look at the .asm file being generated by the compiler and see if it is accessing the last memory location to load this constant.

Proteus Virtual System Modeling (VSM) combines mixed mode circuit simulation, animated components and microprocessor models to facilitate co-simulation of the complete microcontroller based designs. For the first time ever, it is possible to develop and test such designs before a physical prototype is constructed. Because the simulation of the complete schematic takes place in the PC this saves a lot of time during the debugging phase. For more information on Proteus VSM please visit;

www.r4systems.com

We will post additional information on this as needed.
hobiadami



Joined: 17 Oct 2006
Posts: 35
Location: City of Concrete

View user's profile Send private message Visit poster's website ICQ Number

Hey Thanks.
PostPosted: Thu May 31, 2007 2:39 pm     Reply with quote

Don, thanks for the help. I was having the same problem with 12F675.
now tested your additional #ROM 0x3ff = {0x3480} line. It seems to solve the problem. Regards.
_________________
www.endtas.com
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