| ??? 12/04/00 21:47 Read: times |
#6967 - RE: Please correct the following code |
Hi Daniel
I took the time to browse through your code some, After checking P3.0 the way you do, you call WAITS. This routine , among other things, starts to decrease R0, which hasn't been assigned a value yet, and thus gives an unpredictable delay. This is no disaster, but R0 should be assigned a value to give predictable results. All this is assuming the ";" at the beginning of some lines of your code means that you don't want them executed (: means it's a comment, but I'm sure you know). The same goes for R1. The routine should be returned from though, no problem with that. After returning from WAITS you call INITFORWARD. This routine moves #01 to P1. You should be able to see that happen. Really. If you don't, your simulator is not anything like an 8052 derivate. I'd do these three things to start with: 1: write the program MOV P1,#055h DEAD: SJMP DEAD and see if the simulated P1 port actually works. 2: Single step the program to see if initpause is ever reached (you've got a simulator, so that shouldn't be a problem). In other words: does your simulator see you are doing stuff on P3? 3: if I put this code into a real 8052, does still nothing happen on P1? Rule number one: never trust a simulator for I/O. |
| 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 |



