hi
when simulating pic micro projects within proteus im having issues with warning messages regards excessive cpu load stating simulation not running in real time and this is evident as the programs only seem to run a little at the beginning then just sit there, my cpu load reads around 68%, i have tried 2 other computers the most powerfully of which is 3.4GHz with 16Gb of ram but still the same message, is there anything i can do to get my projects running at the correct speed thus show simulation, im using version 8.12 sp2 thanks in advance
bob
EXCESSIVE CPU LOAD
Re: EXCESSIVE CPU LOAD
Fist thing first, when your simulation is "not running in real time" the relative simulation time keeps consistent with the real time, albeit on an expanded time scale.
Yours is too generic question, I'm afraid. The simulation efficiency depends by many factors, but in general, you need to remove as much as possible all analogue nodes which are driven with relatively fast impulsive signals.
Proteus implements two different simulator engines: DSIM & SPICE3F5.
The former (obviously enough) is a event driven digital simulator which can process several millions of digital events per second; with a modern PC you can easily run in real time a pure digital microcontroller based circuit working with several MHz of clock frequency.
The latter is the analogue simulator. Any currents in the mesh, any voltages at any node take hundreds of thousands of tries before to converge. As a result you may have your CPU resources heavily loaded even with few KHz PWM frequency control. There are a number of bottle necks when you try a simulation of a mixed modes, digital plus analogue circuits.
This is just a non-exhaustive list :
1. motor control using PWM technique,
2. 7-segments displays multiplexing based
3. pull-up or pull-down resistors driven a several kHz clock (as I2C pull-up resistors)
4. diodes matrix for keyboard operations.
If a more detailed answer is needed, then we need to see at a typical project where you got the problem.
Also I suggest you searching in the forum by using the key sentence 'running in real time'. There are several pages covering this topic.
Yours is too generic question, I'm afraid. The simulation efficiency depends by many factors, but in general, you need to remove as much as possible all analogue nodes which are driven with relatively fast impulsive signals.
Proteus implements two different simulator engines: DSIM & SPICE3F5.
The former (obviously enough) is a event driven digital simulator which can process several millions of digital events per second; with a modern PC you can easily run in real time a pure digital microcontroller based circuit working with several MHz of clock frequency.
The latter is the analogue simulator. Any currents in the mesh, any voltages at any node take hundreds of thousands of tries before to converge. As a result you may have your CPU resources heavily loaded even with few KHz PWM frequency control. There are a number of bottle necks when you try a simulation of a mixed modes, digital plus analogue circuits.
This is just a non-exhaustive list :
1. motor control using PWM technique,
2. 7-segments displays multiplexing based
3. pull-up or pull-down resistors driven a several kHz clock (as I2C pull-up resistors)
4. diodes matrix for keyboard operations.
If a more detailed answer is needed, then we need to see at a typical project where you got the problem.
Also I suggest you searching in the forum by using the key sentence 'running in real time'. There are several pages covering this topic.
Kind regards,
Ettore Arena - Labcenter Electronics.
Ettore Arena - Labcenter Electronics.
Re: EXCESSIVE CPU LOAD
Even 10 years ago they promised support for multithreading in the simulation, but things are still there ...