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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
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!



List of 49 messages in thread
TopicAuthorDate
p89lpc936 keil programming help required.            01/01/70 00:00      
   magic code?            01/01/70 00:00      
      mov 0A5H,#0FFH            01/01/70 00:00      
   a glaring difference            01/01/70 00:00      
      a glaring difference            01/01/70 00:00      
         what happens if            01/01/70 00:00      
            what happens if            01/01/70 00:00      
               BiDir or PushPull            01/01/70 00:00      
               I leave it to you            01/01/70 00:00      
                  magic code?            01/01/70 00:00      
                  I leave it to you            01/01/70 00:00      
                     1) formatted, 2)commented, 3) correct            01/01/70 00:00      
                        1) formatted, 2)commented, 3) correct            01/01/70 00:00      
                           it is STILL two different things            01/01/70 00:00      
                              Apples and Orange Juice            01/01/70 00:00      
                                 Please focus on the problem i have            01/01/70 00:00      
                                    Software delay loop in C is a no-no            01/01/70 00:00      
                                       Software delay loop in C is a no-no            01/01/70 00:00      
                                          Reduce problem into smaller problems            01/01/70 00:00      
                                             Reduce problem into smaller problems            01/01/70 00:00      
                                             Simulator vs real hardware            01/01/70 00:00      
                                             Current limits            01/01/70 00:00      
                                             Per Westermark's previous message            01/01/70 00:00      
                                                Delay speed            01/01/70 00:00      
                                                   Elaborate            01/01/70 00:00      
                                                      tried 5 for the '51 and Keil won            01/01/70 00:00      
                                    the problem you have is ...            01/01/70 00:00      
                                       the problem you have is ...            01/01/70 00:00      
                                          do you have LEDs connected to the simulator?            01/01/70 00:00      
                                          not executing on actual hardware while simulator is fine            01/01/70 00:00      
                                    Oh So Focused            01/01/70 00:00      
   Double-post            01/01/70 00:00      
   Are you using the limited version of KEIL? the for loop....            01/01/70 00:00      
      valid C            01/01/70 00:00      
         Thats the point            01/01/70 00:00      
            nope            01/01/70 00:00      
               I wouldnt trust it            01/01/70 00:00      
                  if you do not trust it ....            01/01/70 00:00      
               And if you trust it so much why doesnt it work?            01/01/70 00:00      
                  And if you trust it so much why doesnt it work?            01/01/70 00:00      
                     trust, yes, but knowledge also required            01/01/70 00:00      
                  wait call + assumptions about two-complement, ...            01/01/70 00:00      
                     The C Standard            01/01/70 00:00      
                        who is "you"?            01/01/70 00:00      
            Yes, you can!            01/01/70 00:00      
      Quite common loop design for bit operations            01/01/70 00:00      
      for( expression-1; expression-2; expression-3 ) [ed]            01/01/70 00:00      
         erratum            01/01/70 00:00      
            Corrigendum            01/01/70 00:00      

Back to Subject List