Getting to Know the Processor
If you havenât worked with the processor on your board before, you should take some time to get familiar with it now. This shouldnât take very long if you do all of your programming in a high-level language such as C. You need to dig in and find out how particular peripherals of the processor work. Generally, to the user of a high-level language, most processors look and act pretty much the same. However, if youâll be doing any assembly language programming, you need to familiarize yourself with the processorâs register architecture and instruction set.
Everything you need to know about the processor can be found in the databooks provided by the manufacturer. If you donât have a databook or programmerâs guide for your processor already, you should obtain one immediately. If you are going to be a successful embedded systems programmer, you must be able to read databooks and get something out of them. Processor databooks are usually well writtenâas databooks goâso they are an ideal place to start. Begin by flipping through the databook and noting sections that are most relevant to the tasks at hand. Then go back and begin reading the processor overview section.
Things youâll want to learn about the processor from its databook are:
What address does the processor jump to after a reset?
What is the state of the processorâs registers and peripherals at reset?
What is the proper sequence to program a peripheralâs registers?
Where should the ...
Get Programming Embedded Systems, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.