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
What's the trick to make the C51 simulator increment timers in realtime? There is none, and there shouldn't be. The simulator has its own simulated time --- synchronizing that to wall-clock time would be impossible on slow machines, and wasteful on fast ones. (I just need the simulation's blink led freq to have the same period as the real target) And what good is that supposed to do you?
I'm (politely) amazed at the two responses. If I paraphase the responses: the original requirement was non sensical. Use a real board, and jtag debugger, Peter. Let me be more precise about my working scenario, which I simplified and recast in the original post to use only a few words. I have (borrowed) an IP stack on an 8051. It has a 24hz signal derived from a timer, which acts as a timeout for a polling loop on the serial port. The same signal is a timebase for other exception handlers in the TCP stack. In the simulator, I have succesfully redirected the IP listeners's abstract serial port to the PC COM1. Another instance of the simulator is acting as IP client, initiating a TCP connection, connected to COM2. A null modem anbd suitable handshake is emulated between the two COM ports, using some fancy windows driver software. At some point, later on, a real client board will talk unto a simulated server Things work fine, except that the 24Hz timebase is not in realtime. I cannot test so far (in the simulator) the reality, which seemed a really obvious thing to want to do! Now to my incredulity. If the simulator handles core timing so that the peripherals are accurate in realtime (e.g. the baud rates, the smartcard barrel shifter in ETU, etc), why not the core 8051 timers!? If its expense and waste issue, Dont worry! My machine is idle 12 hours a day as it is. I can happily waste a pentimum's ghz of core bandwidth emulating an 8Mhz/12 8051 timer.
I can happily waste a pentimum's ghz of core bandwidth emulating an 8Mhz/12 8051 timer a couplew of comments: 1) it may be possible to real time simulate ann 8MHz/12 '51 chip, but would you not want tghe same for a 100MHz/1 2) the simulator simulate it does not emulate if you need to emulate, buy an ICE or switch to "chips with built in ICE" (SILabs, some late derivatives from Philips and ST, maybe more). Erik
View all questions in Keil forum