
54 Chapter 5: Getting to Know the Hardware
more than a collection of software routines that control the operation of the
peripheral and isolate the application software from the details of that particular
hardware device. I’ll have a lot more to say about device drivers in Chapter 7,
Peripherals.
Initialize the Hardware
The final step in getting to know your new hardware is to write some initializa-
tion software. This is your best opportunity to develop a close working relation-
ship with the hardware—especially if you will be developing the remainder of the
software in a high-level language. During hardware initialization it will be impossi-
ble to avoid using assembly language. However, after completing this step, you
will be ready to begin writing small programs in C or C++.
*
If you are one of the first software engineers to work with a new
board—especially a prototype—the hardware might not work as
advertised. All processor-based boards require some amount of soft-
ware testing to confirm the correctness of the hardware design and
the proper functioning of the various peripherals. This puts you in
an awkward position when something is not working properly. How
do you know if the hardware or your software is to blame? If you
happen to be good with hardware or have access to a simulator, you
might be able to construct some experiments to answer this ques-
tion. Otherwise, you should probably