I am using MPLAB (now V5) and I often RUN the simulator
through many I2C and timing subroutines etc. to get to
my breakpoint. I noticed that the simulation runs 3-4 times
faster when I'm constantly moving the mouse. Now, I' m
paddling with the mouse like crazy and it IS faster. Why is
that? How can I fix it/maximize the speed?
Djula Djarmati wrote:
>
> I am using MPLAB (now V5) and I often RUN the simulator
> through many I2C and timing subroutines etc. to get to
> my breakpoint. I noticed that the simulation runs 3-4 times
> faster when I'm constantly moving the mouse. Now, I' m
> paddling with the mouse like crazy and it IS faster. Why is
> that? How can I fix it/maximize the speed?
>
> Djula
I too, have noticed this bizzare behaviour, in version 4.12.xx as
well. If I use the hotkeys to run/halt I HAVE to move the mouse to
get the command to take effect in less than a second. Go figure.
My guess would be that MPSIM has code that waits on a Winblows message
queue with an 'on event blah...' construct. Improperly coded,
this wait gets short circuited by ANY event, mouse, keyboard,
timer, etc. You're generating lots of 'events' so the background screen
updater functions are then not waiting for every step of the simulation,
and so you effectively simulate faster.
Yeah, it sucks that the simulation runs slower than it needs to.
Wouldn't it be nice if your 750Mhz PIII ran the 20Mhz PIC code 100 times
faster in simulation than the real processor did, rather than running
slower because of the screen updates and flawed coding?
> Djula Djarmati wrote:
> >
>
> Yeah, it sucks that the simulation runs slower than it needs to.
> Wouldn't it be nice if your 750Mhz PIII ran the 20Mhz PIC code 100 times
> faster in simulation than the real processor did, rather than running
> slower because of the screen updates and flawed coding?
Do you mean like it does in gpsim? Well, not 100 times unfortunately. But
depending on the simulation environment, gpsim can simulate a 20Mhz PIC on a 400
Mhz PII. I could only guess that it's twice as fast on a 750Mhz PIII.
Scott Newell wrote a program a while back to tackle this.
It's shareware, and definitely works.
To his readme.txt file I can add the following personal comment:-
<js comment 20.2.99>
The speedup program won't work if asynchronous pin stimulation is ever
invoked in the current
mplab session.
To fix - exit mplab & cycle back to the project again
Also.. It doesn't seem to operate if speedup is run before mplab
>Date: Mon, 24 Apr 2000 19:18:00 +0200
>From: Djula Djarmati <EraseMEjulianspam_OUTTakeThisOuTEUNET.YU>
>Subject:
>I am using MPLAB (now V5) and I often RUN the simulator
>through many I2C and timing subroutines etc. to get to
>my breakpoint. I noticed that the simulation runs 3-4 times
>faster when I'm constantly moving the mouse. Now, I' m
>paddling with the mouse like crazy and it IS faster. Why is
>that? How can I fix it/maximize the speed?
>
>Djula
best regards, John
e-mail from the desk of John Sanderson, JS Controls.
Snailmail: PO Box 1887, Boksburg 1460, Rep. of South Africa.
Tel/fax: Johannesburg 893 4154
Cellphone no: 082 469 0446
email: jsandspam_OUTpixie.co.za
Manufacturer & purveyor of laboratory force testing apparatus, and related
products and services.
Scott Newell wrote a program a while back to tackle this.
It's shareware, and definitely works.
To his readme.txt file I can add the following personal comment:-
<js comment 20.2.99>
The speedup program won't work if asynchronous pin stimulation is ever
invoked in the current
mplab session.
To fix - exit mplab & cycle back to the project again
Also.. It doesn't seem to operate if speedup is run before mplab
>Date: Mon, 24 Apr 2000 19:18:00 +0200
>From: Djula Djarmati <spamBeGonejulianspamBeGoneEUNET.YU>
>Subject:
>I am using MPLAB (now V5) and I often RUN the simulator
>through many I2C and timing subroutines etc. to get to
>my breakpoint. I noticed that the simulation runs 3-4 times
>faster when I'm constantly moving the mouse. Now, I' m
>paddling with the mouse like crazy and it IS faster. Why is
>that? How can I fix it/maximize the speed?
>
>Djula
best regards, John
e-mail from the desk of John Sanderson, JS Controls.
Snailmail: PO Box 1887, Boksburg 1460, Rep. of South Africa.
Tel/fax: Johannesburg 893 4154
Cellphone no: 082 469 0446
email: TakeThisOuTjsandEraseMEspam_OUTpixie.co.za
Manufacturer & purveyor of laboratory force testing apparatus, and related
products and services.