Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/29/05 15:07
Read: times


 
#92610 - Keil Simulator
Responding to: ???'s previous message
I dunno about other simulators, but the Keil simulator does not run the simulated code at its actual speed; in fact, on a modern PC, it probably executes the code a lot faster than the real target.

So, if your problem is due to your code in your target missing characters, you may not see that problem in the simulator!


Hmmm. I'm not sure I understand what you mean.

It is true that the uVision simulator runs faster than the actual chip in many cases. However, on a slow PC or if you open lots of windows, the simulation does slow down.

However, (and this is the part that people seem to misunderstand) the Keil simulator simulates stuff with exactly precise timing. So, even though the Keil simulator runs faster than the actual target, everything is accurately simulated. For example, if you transmit a character out the serial port, it does not get transmitted instantly. Once the character is written into SBUF, the 8051 copies that into a shifter that shifts out the bits (one at a time) based on timing defined for the serial port baud rate. uVision does this exactly the same way. If you send a character into the simulated serial port, it is shifted in in exactly the same fashion.

If your program serial port configuration specifies 1200 baud, then you will only receive 120 characters/second even under simulation. Now, we're not talking about of 120 character/second in real-time. We mean 120 characters/second in simulated time. Simulated-time = x * real-time. Real-time is the time you observe on a Cesium clock (or equivalent). So, if 1 second of simulated-time takes 1 minute or real-time to simulate, then that would be 120 characters/second of simulated time but 120 characters/minute of real-time.

Jon

List of 10 messages in thread
TopicAuthorDate
Downloading data serially            01/01/70 00:00      
   Not enough information            01/01/70 00:00      
      Re:Not enough data...            01/01/70 00:00      
         Hmm, still not much to work with            01/01/70 00:00      
         step by step            01/01/70 00:00      
   as I keep saying            01/01/70 00:00      
      Simulating            01/01/70 00:00      
         Keil Simulator            01/01/70 00:00      
      good, but..            01/01/70 00:00      
   It must be me            01/01/70 00:00      

Back to Subject List