??? 05/04/04 19:37 Read: times |
#69845 - RE: need help with tutorial Responding to: ???'s previous message |
i'm learning the 8051 tutorial. i hope u guys can help me out . i copied this code from the tutorial section.i modified abit so that it will setb p2.2 after 1s. i tried to compile and run it on a 8052 simulator and found that the process stop at the JNB p2.2,$. it just wont setb p2.2 after a few seconds i waited.
any 1 know what's wrong with the code? The question is what the input value on P2.2 is? If you set P2.2 and then use JNB, it's going to check for the input value on that line. If the input value is 0 then the line is considered to be "zero" and your JNB is going to keep executing even though you set the line. Does the program work if you replace P2.2 with 00H? That is, bit 00h instead of P2.2? If it works using bit 00h and doesn't work with P2.2 then the problem is your input value on P2.2 is 0 rather than 1. Regards, Craig Steiner |
Topic | Author | Date |
need help with tutorial | 01/01/70 00:00 | |
RE: need help with tutorial | 01/01/70 00:00 | |
RE: need help with tutorial | 01/01/70 00:00 | |
RE: need help with tutorial | 01/01/70 00:00 | |
RE: need help with tutorial | 01/01/70 00:00 | |
RE: need help with tutorial | 01/01/70 00:00 | |
RE: need help with tutorial | 01/01/70 00:00 | |
RE: need help with tutorial | 01/01/70 00:00 | |
RE: need help with tutorial | 01/01/70 00:00 | |
RE: need help with tutorial | 01/01/70 00:00 | |
RE: need help with tutorial | 01/01/70 00:00 | |
Slip of the pen![]() | 01/01/70 00:00 |