Delay simulating pulsout

hippy

Technical Support
Staff member
Probably because there will be some delay during PULSOUT on a real chip and if there was no delay in simulation you would never see the associated output pin flash. Taking the delay out would probably elicit complains of "PULSOUT does nothing in simulation".
 
I have to comment out a bunch of lines with pulsout when I want to simulate my program as fast as the simulator will go because all the waiting gets rather irritating.
I dont see why just pulsout has to have such a delay even when its set to 1 because no other commands delay except pause.
 

hippy

Technical Support
Staff member
To make simulation easier you can enclose the PULSOUT in #IFNDEF-#ENDIF commands, add the #DEFINE SIMULATING when simulating and removing or comment it out it for download. That can save having to make multiple edits to a program...

Code:
#Define SIMULATING
Do
  Toggle C.0
  #IfNDef SIMULATING
      PulsOut C.1, 1
  #EndIf
Loop
You can also alter the simulation speed through the View -> Options -> Simulation menu which may help
 
Thanks hippy that helps, I like to set the simulation delay in options to its lowest so the simulation goes nice and fast thats when the delay on 64 pulsout's when bit-banging SPI gets rather annoying.

I hope an option is added to simulate at actual speed or with no delays.
 
So I'm not the first to point that one out.

Ah ha! Look what I found!
HKEY_CURRENT_USER\Software\VB and VBA Program Settings\Programming Editor\Settings\SimulationDelay
Change that to 0 and it goes much faster and the pulsout delay gets smaller too but I'd still prefer less delay on that.
 
Last edited:
Top