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

code works on simulator but not when burnt on hardware

hello,
i am using p89v51rd2 and wrote a code that periodically takes the data from an ADC through a parallel port and transmits the same through serial port. The code works on simulator but does not work when burnt on hardware. How may i solve this.

  • the two major differences between simulating and real life is TIMING and, of course the hardware. If e.g. you ADC require 14 microseconds between reads, the simulator will accept reads as fast as you can make them.

  • You'll have to debug it in the real world, where you might need to use an oscilloscope or logic analyzer.

    The term "not working" is so very vague, what part of the process isn't working, and what is it doing. First step would to get the serial port working, that way you can output information about the internal state of the processor, and what your code is and isn't able to do.