This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

realtime timer simulation

What's the trick to make the C51 simulator increment timers in realtime?

Ive tried setting the xtal value appropriately, on the target panel.

(I just need the simulation's blink led freq to have the same period as the real target)

Peter

Parents
  • Peter,

    At least some of those peripherals aren't really handled by Keil's simulator at all. For instance, the PC is responsible for handling the timing on the serial ports, etc. Keil doesn't have to provide a timer to do this. I'm not familiar with a barrel shifter, but that may be a similar scenario.

    Also, trying to get good timing resolution within Windows generally means straying into the realm of API calls that will work differently (or sometimes not at all) on different machines, so I'm not surprised they don't support it.

    That being said, the comments about getting an ICE might not be a bad idea. There are some EXTREMELY inexpensive ICEs out there that will do this sort of thing. Of course, if your target board doesn't even exist yet, that could be a bit of a wrinkle. :)

Reply
  • Peter,

    At least some of those peripherals aren't really handled by Keil's simulator at all. For instance, the PC is responsible for handling the timing on the serial ports, etc. Keil doesn't have to provide a timer to do this. I'm not familiar with a barrel shifter, but that may be a similar scenario.

    Also, trying to get good timing resolution within Windows generally means straying into the realm of API calls that will work differently (or sometimes not at all) on different machines, so I'm not surprised they don't support it.

    That being said, the comments about getting an ICE might not be a bad idea. There are some EXTREMELY inexpensive ICEs out there that will do this sort of thing. Of course, if your target board doesn't even exist yet, that could be a bit of a wrinkle. :)

Children