Robert Rolf email (remove spam text)
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?
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?
See also: www.piclist.com/techref/microchip/languages.htm?key=mplab
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the