We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have two simple code examples: ; Example 1 ORG 0 MOV A,#0xff MOV P0,A TOP: MOV P1,P0 SJMP TOP END ---------------------- ; Example 2 ORG 0 TOP: MOV A,#0xff MOV P0,A MOV P1,P0 SJMP TOP END ---------------------- Both examples attempt to do the same thing. When clicking on pins of P0 the value is sent to P1. When I single step (F11) through the programs the perform in an identical manner. When I run the programs (F5), example 2 ends up with a mismatch between P0 pins and P1 values. What could cause such a mismatch?
Same problem happened at work on a new Dell system (sorry, don't have exact specs) running NT and in the lab on new Gateway systems. I've seen it happen on every PC I've tried-- about 18 so far. Hmmm. I've tried this on 3 machines and they all work correctly. So, maybe we have a mismatch in how we're testing this. How exactly do you set the pins of P0 during simulation? Here's what I do. 1. In uVision2 - Project Options - Debug, make sure Use Simulator is selected. 2. Click Start/Stop Debug Session on the Toolbar. 3. Open the Port 0 and Port 1 dialogs from the Peripherals menu. 4. Make sure Periodic Window Update (from the View menu) is checked. 5. Click RUN. 6. Click on any of the Pins checkboxes in the Parallel Port 0 dialog (not on the P0 checkboxes)). The corresponding pin and bit in P1 changes to match. No amount of clicking or double-clicking or seems to cause any problems. I am using the latest release (V7.07a) which includes uVision2 V2.40 and DP51 DLL Version 2.40. I also tried this with an older version 2.36 and everything worked OK there, too. Jon
I'm following the same steps as you are yet I still can get a mismatch. I did, however, just notice something interesting... the mismatch appears to be with the displayed pins check boxes and not with the pins value. For example, all the P0 pins are checked but the value indicates 0xBF and P1 has a value of 0xBF with the bit D6 cleared. I grabbed a screen shot of this but I'm not sure how to post it.