??? 10/22/10 08:29 Read: times |
#179265 - not executing on actual hardware while simulator is fine Responding to: ???'s previous message |
Adnan A said:
Why [any] code is not executing on actual hardware while [in any] simulator it is working fine. This is a Frequently Asked Question! Probably the most common reason is that you are misinterpreting the simulation results! For example, as already noted, expecting a standard 8051 ("quasi-bidirectional") port pin to source current to a LED is unlikely to work in real hardware. A simulator will show that a '1' is being written to the pin but, if you assume that means that such a LED would light in the real hardware, then you would be disappointed! There may also be real differences between operation in a simulator, and operation in real hardware because the simulator makes certain assumptions about the hardware and, if they do not actually hold in your particular hardware, then the results may differ. Obvious examples include: * The hardware is faulty * The hardware is not correctly designed * The hardware has timing constraints that are different to (or not observed at all by) the simulator. * etc In the particular case of the Keil simulator, it is just an Instruction Set simulator; it does not simulate the hardware operation and certinaly cannot simulate any external hardware! |