Tony Matthews wrote: > I want to work out my test code in picsim2. .... If it (the code) > works on the sim will it work on the 16c84 hdw? Tony: It's only guaranteed to work if: 1. The simulator accurately simulates the PIC... Many simulators have bugs. MPSIM is accurate; is "picsim2" really the name of a PIC simulator, or is that just the way you refer to MPSIM? 2. Your PIC's power supply is clean and within the Microchip specs, the MCLR line is held high, the oscillator is correctly-designed and appropriate for the oscillator configuration you've chosen. 3. The watchdog-timer-enable bit(s) are set to match the simulated watchdog in your simulator. 4. The signals on your PIC's input pins are exactly as those you've simulated. 5. You've followed good engineering practice in designing and laying out the circuitry surrounding the PIC, and it's not in an environment (very high electromagnetic or static-discharge or whatever) that'll cause the PIC to malfunction. 6. Etc... In short, the simulator is really only guaranteed (and then, only if it's as accurate as MPSIM) to properly simulate program LOGIC; it won't simulate anything that has to do with electricity. > Setting an output port makes the pin "high" correct? Correct. > Reading an input port bit held "high" externally returns a 1 > correct? Correct. -Andy === Andrew Warren - fastfwd@ix.netcom.com === === Fast Forward Engineering - Vista, California === === === === Did the information in this post help you? Consider === === contributing to the PICLIST Fund. Details are at: === === http://www.geocities.com/SiliconValley/2499/fund.html ===