gnupic@linuxhacker.org

gnupic@linuxhacker.org


Subject: Re: gpsim & clock frequency
From: Scott Dattalo
Date: Mon, 13 Jan 2003 07:24:14 -0800 (PST)

On Sun, 12 Jan 2003, Bryan Coe wrote:

> Hi folks,
> 
> I'm relatively new to PICs and gpsim and I hope this is a simple matter of me 
> screwing something up.  I can't seem to control the frequency of gpsim when 
> running, well, simulations.  No matter what I set the frequency to, the 
> program seems to execute at full speed, or at least the same speed it always 
> runs at.  Nothing I do seems to make a difference.
> 
> I'm using 0.20.14 under Gentoo linux.
> 
> Any advice?

You could try MPLAB :).

But seriously, Ralf addressed how the "frequency" command works. It sound 
like what you want is an "animate" feature where everything slows down so 
that you can watch it by eye. Other than what Ralf suggested (gui update 
rate) this feature doesn't exist. Although, a "sleep(x)" placed in the gui 
update call would probably fix this.

Something like :

gpsim> animate 50

can start the simulation and execute at a rate of 50 instructions per 
second. 

(Ralf, A call to sleep with an argument of 1000000/animate_rate in the 
gui_update call would do it).

Scott


gnupic@linuxhacker.org