??? 08/29/06 12:15 Read: times |
#123291 - make code that resembles the flowchart and you wil Responding to: ???'s previous message |
On the other hand, your code still looks for me messy and I believe if you try to put down first what you intended, either in the form of a flowchart, or other means (in plain words, perhaps); you will spot an error in the logic of what you do, rather than in the code* you wrote.
The problem with this 'code' is that it "requires tomato sauce". Flowchart the process, then start from scratch and make code that resembles the flowchart and you will almost immediately spot where the problem is. As a matter of fact it is very likely that the new code will work "out of the box". Trying to debug and fix spaghetti code will only result in an even messier result, I have, a few times, ended up with something messy as a result of trying to 'fix' an erroneous initial assumption and have finally learned that "when it looks messy, throw it away, use what you learned to redefine the approach and then start from scratch" yes, it is a hard decision, but, I guarantee you, it will pay off (of course, only if you take the time to make it 'clean) Erik |
Topic | Author | Date |
problem with delays | 01/01/70 00:00 | |
Omitted pull-ups at Port 0? | 01/01/70 00:00 | |
No, it's pulled high | 01/01/70 00:00 | |
You should see the connection... | 01/01/70 00:00 | |
could it be your approach? | 01/01/70 00:00 | |
p0 initialised as input port | 01/01/70 00:00 | |
post the WHOLE code | 01/01/70 00:00 | |
WHOLE code | 01/01/70 00:00 | |
Try this | 01/01/70 00:00 | |
WHOLE code | 01/01/70 00:00 | |
Assuming that the external pullups are not working | 01/01/70 00:00 | |
why is the delay not being excecuted? | 01/01/70 00:00 | |
HOW DO YOU KNOW | 01/01/70 00:00 | |
Through debugging | 01/01/70 00:00 | |
I know nothing about keil debugger | 01/01/70 00:00 | |
make code that resembles the flowchart and you wil | 01/01/70 00:00 | |
whole? | 01/01/70 00:00 | |
Ashwins stack handling is totally unsuited! | 01/01/70 00:00 | |
to generate tone of octave(8keys)with 89c51 | 01/01/70 00:00 | |
sandy please start a new thread![]() | 01/01/70 00:00 |