??? 12/23/05 15:48 Modified: 12/23/05 15:56 Read: times Msg Score: +3 +3 Informative |
#105830 - My Code doesn't work question!!! |
This is the most question I hate from people, I've been chased by so many students with 10s of pages of code they all ask the same horrible question, My code doesn't work
I tell them: 1. Read the datasheet so many times to understand your microcontroller. 2. Read manufacturer's application notes to see how new techniques beeing applied. 3. Start writting simple programs like turning leds on and off. learn how to debug your simple code.Then start building more complex programs gradually like timer interrupts and ADCs etc... 4. Write structured code ( made of a collection of small programs and test each little program on its own). 5. Comment your code as you explain to a beginner what your code does. 6. Make your own code library of already tested little modules to reuse in other projects or applications. for examples if you did LCD module you use it whenever you need to use LCD in a project, same goes for serial interface, switch debouncing etc.. this makes writting complex projects very quick. 7. Make sure your hardware is wired correctly, your power on reset circuit is done properly and your circuit has the required voltage regulator and decoupling caps close to each ic. 8. if anyone has more things to add on they are welcome. Hope this helps Mahmood |
Topic | Author | Date |
My Code doesn't work question!!! | 01/01/70 00:00 | |
more suggestions | 01/01/70 00:00 | |
debugging | 01/01/70 00:00 | |
give ouputs at various points of code | 01/01/70 00:00 | |
Tell it to the Teddy bear! | 01/01/70 00:00 | |
To work scientifically | 01/01/70 00:00 | |
Genius or hardworker | 01/01/70 00:00 | |
Yes | 01/01/70 00:00 | |
Of course | 01/01/70 00:00 | |
Small steps vs large jumps | 01/01/70 00:00 | |
Eh ? | 01/01/70 00:00 | |
There is! | 01/01/70 00:00 | |
ACO | 01/01/70 00:00 | |
true, and![]() | 01/01/70 00:00 |