??? 06/24/06 09:57 Read: times |
#119002 - Consensus Responding to: ???'s previous message |
Arvind Shrivastava said:
none of you BEAUTIFULL MINDS have really tried to sort the probs ... only commenting and commenting and commenting Again, this is a discussion Forum - it is not a free service to fix your broken code! At least four different people have all said to you that your code is very poorly structured, and virtually impossible to follow - that's why nobody can fix it for you! Nobody can understand what it's trying to do - let alone why it doesn't do what you want it to do! You have been given plenty of suggestions on techniques and approaches to debug and improve your code - yet you don't seem to have listened to any of them. Given that the code is very poorly structured, and doesn't even work, perhaps now is the time to start again, from scratch, with a clean sheet of paper. As has already been suggested, start with a clear, complete, definition of your requirements - what exactly is it that you want the system to do. Then produce a design for how you intend to achieve it - draw block diagrams and flowcharts; use pseudo code; or any other techniques that you find helpful. Then - and only then - should you start writing code. A good design is particularly important for assembler, where it is very easy to get lost in all the detail - "you can't see the wood for the trees!" Again, it has been suggested that you start simple with just one LED and one switch. If, as suggested, you write your code with nice, small, well-defined functions (subroutines) in a well-structured manner, it will be easy to extend your 1-LED, 1-Switch implementation. It will also be far easier to debug. That's the beauty of Modular programming. Check out the 'Books' section for books on 8051 assembler programming: http://www.8052.com/book |