AN2616 Freescale Semiconductor / Motorola, AN2616 Datasheet - Page 43
AN2616
Manufacturer Part Number
AN2616
Description
Getting Started with HCS08 and CodeWarrior Using C
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
1.AN2616.pdf
(62 pages)
- Current page: 43 of 62
- Download datasheet (2Mb)
How device register
bit(s) are defined /
used
MOTOROLA
Summary:
This will bring up a window showing the section of code that defines the
variable:
As can be seen in the example above, the variable is actually a macro definition
to a structure element “Byte” of the variable _TPM2C0SC. The variable
_TPM2C0SC is, in fact, defined as being a structure of type TPMC0SCSTR
and at absolute address $0065, as shown in the figure above. The definition of
structure TPMC0SCSTR is:
From the example of TPM2C0SC, it can be seen that the way registers are
defined within CodeWarrior is:
A register, as defined in a data sheet (for example, TPM2C0SC), is a macro
that refers to a byte within a structure, and is mapped to the relevant address
for the device in question.
Metrowerks CodeWarrior header files for HCS08 use bit structures as opposed
to masks. All code will utilize the CodeWarrior structures.
The method used for defining register bits follows a similar method as used for
the actual registers, except that, in the case of register bits, it is necessary to
specify both the register name and the bit name as defined in the data sheet,
for example, MS0B and TPM2C0SC both need to be specified. The way in
which the bit name and register name are used is to concatenate their names
together with an underscore between; for example:
Getting Started with HCS08 and CodeWarrior Using C
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
CodeWarrior C and HCS08
AN2616
43
Related parts for AN2616
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
An Overview og the Phase Locked Loop
Manufacturer:
Philips
Datasheet:
Part Number:
Description:
AN OVERVIEW OF THE LPC FLASH INTERFACE
Manufacturer:
STMicroelectronics
Part Number:
Description:
An Evaluation System Interfacing the MPX2000 Series Pressure Sensors to a Microprocessor
Manufacturer:
Motorola / Freescale Semiconductor
Part Number:
Description:
An FM-IF system for DECT and other high speed GFSK applications
Manufacturer:
Philips Semiconductors / NXP Semiconductors
Part Number:
Description:
An 8 x 8 Discrete Cosine Transform on the StarCore SC140/SC1400 Cores
Manufacturer:
Freescale Semiconductor / Motorola
Part Number:
Description:
An Overview of the HCS12 ATD Module
Manufacturer:
Freescale Semiconductor / Motorola
Part Number:
Description:
An Introduction to the External Bus Interface on the HCS12X
Manufacturer:
Freescale Semiconductor / Motorola
Part Number:
Description:
An RF Data Link Using Tango3 and Romeo2 RF Modules
Manufacturer:
Freescale Semiconductor / Motorola
Part Number:
Description:
IC POWER SUPPLY MULT-OUT 44-HSOP
Manufacturer:
Freescale Semiconductor
Datasheet:
Part Number:
Description:
IC POWER SUPPLY MULT-OUT 54-SOIC
Manufacturer:
Freescale Semiconductor
Datasheet:
Part Number:
Description:
Low-Cost 16-Bit DSP with DDR Controller
Manufacturer:
Freescale Semiconductor / Motorola
Part Number:
Description:
Low-Cost 16-bit DSP with DDR Controller and 10/100 Mbps Ethernet MAC
Manufacturer:
Freescale Semiconductor / Motorola
Datasheet:
Part Number:
Description:
Low-Cost 16-bit DSP with DDR Controller and 10/100 Mbps Ethernet MAC
Manufacturer:
Freescale Semiconductor / Motorola
Datasheet:
Part Number:
Description:
Low-Cost 16-bit DSP with DDR Controller
Manufacturer:
Freescale Semiconductor / Motorola
Datasheet:
Part Number:
Description:
Functional Pin Difference Between the MSC8101 and MPC8260 Communications Processor Modules
Manufacturer:
Freescale Semiconductor / Motorola