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;
We will post additional information on this as needed.
hobiadami
Joined: 17 Oct 2006 Posts: 35 Location: City of Concrete
Hey Thanks.
Posted: Thu May 31, 2007 2:39 pm
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
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