I have developed some C51 software and it works fine in the simulator, the only problem is that the simulator goes far too fast! Strings that are only supposed to come out of the serial port once per second, just pour out. Is there a way to lock the simulator to at least an approximation of real-time? If there isn't, can Keil build one into the next release?
The answer is yes. In the simulator, do a DIR on VTREGs and look at STIME. Read in the Debugger manual about 'Instantanous' or Baud rate simulation.
Actually, the STIME VTREG only affects the speed of the serial port. The simulator on a fast PC still runs a lot faster than an 8051. We are working on a real-time option for the simulator that slows the performance down to match a real device. However, this feature is not planned for a while. Not too many people want to slow down simulation. Jon
"Not too many people want to slow down simulation." But there's always one... ;-)
Already at least two
"Not too many people want to slow down simulation..." And three now ;-D
"And three now ;-D" But presumably only if it's free, Tursun? Make that four. Stefan
Maybe the simle agsi dll can resolve this problem. I'm beginner in adsi dll programming, but if the simulator will be interrupted for a small time after each instruction, the simulation is too will be slow... Roman
To do this in AGSI, you could create a timer that interrupts every 100ms. Then, use that to calibrate the simulation timing to real-world time. We have discussed this issue here many times and this feature will be added in a future release. Jon