| ??? 12/04/00 16:52 Read: times |
#6952 - RE: Please correct the following code |
Good point Jose,
But it does more than that, and maybe Daniel didn't mean to do that in the first place... Suppose some input device is connected to p3.4, let's say a pushbutton. In order to be able to read the button, p3.4 must be high, so the button may make it '0'. If you force p3.4 to '0', for instance by doing MOV P3,#01 and read p3.4, you'll always see a '0'. Now look at the first three lines of code, and suppose the button was pushed (p3.4 was '0') at the moment the first instruction was executed. This '0' would be forced back on P3 by the third instruction, rendering your button unreadable. Probably Jose's suggestion to use JB is better (athough I don't know what Daniel has connected to it). Also, Daniel, it would be more valuable to know HOW your stepper motor was connected to your processor and WHAT you intend to do with port 3 than mentioning the version of Windows your PC is running. Leaving the ";" lines out and more comments would also be helpful. |
| Topic | Author | Date |
| Please correct the following code | 01/01/70 00:00 | |
| RE: Please correct the following code | 01/01/70 00:00 | |
| RE: Please correct the following code | 01/01/70 00:00 | |
| RE: Please correct the following code | 01/01/70 00:00 | |
| RE: Please correct the following code | 01/01/70 00:00 | |
| RE: Please correct the following code | 01/01/70 00:00 | |
| RE: Please correct the following code | 01/01/70 00:00 | |
| RE: Please correct the following code | 01/01/70 00:00 | |
| RE: Please correct the following code | 01/01/70 00:00 | |
| RE: Please correct the following code | 01/01/70 00:00 | |
Add more routines to my program. | 01/01/70 00:00 |



