Page 226 - Programming Microcontrollers in C
P. 226
Chapter 5
Programming Large 8-Bit Systems
This chapter on the programming of large 8-bit systems will make
use of the MC68HC11 microcontroller. It is absolutely necessary
that any programmer understand the device when writing code for a
microcontroller application. If you are not familiar with the
MC68HC11 family, then read the M68HC11 Reference Manual and
the M68HC11 E Series Technical Data Manual on the accompanying
CD-ROM to get the needed background to be able to continue the
work in this chapter.
Header File
The CD-ROM contains the C header file HC11E9.H. This file should
be included with any program that is going to be used on the
MC68HC11E9 or the MC68HC711E9. An abbreviated version of
this header file is listed below. The header file has about 400 lines of
source code, and most of that code is repeats of the portions of code
shown in the following listing.
#ifndef HC11e9
#define HC11e9
unsigned int Register_Set = 0x1000;
typedef struct {
unsigned char bit0 : 1;
unsigned char bit1 : 1;
unsigned char bit2 : 1;
unsigned char bit3 : 1;
211