If you think about it, the LED won't be able to respond that quickly, nor would your eyes be able to see this kind of phenomenon. Now look at your while loop - You have the uC turning on a port pin, and then turning it off very quickly, over and over again. To answer the second question, remember that you uC can execute instructions very fast - about 1/12 of the clock frequency. Examine this startup module carefully, but for the most part, the default settings in it will get you up and going.After you recompile your software, you can be sure the main() function will be found. When you include the STARTUP.A51 file in your project, the linker now has instructions for jumping to the main() function. The very first thing that happens after reset is the uC fetches it's first instruction from address 0x0000. To answer the first question, you must consider what happens at power on. When it actually executes main(), what will it be doing? How will the uC know where the main() program is located?Ģ. Several things must be considered when programming the uC you have chosen.ġ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |