Seminar Topics & Project Ideas On Computer Science Electronics Electrical Mechanical Engineering Civil MBA Medicine Nursing Science Physics Mathematics Chemistry ppt pdf doc presentation downloads and Abstract

Full Version: First Steps Embedded Systems
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
First Steps Embedded Systems

[attachment=37065]


Introduction


This book is intended to fill the need for an intermediate level overview of
programming microcontrollers using the C programming language. It is aimed
specifically at two groups of readers who have different, yet overlapping needs.
! The first group are familiar with C but require an examination of the general
nature of microcontrollers: what they are, how they behave and how best to use
the C language to program them.
" The second group are familiar with microcontrollers but are new to the C
programming language and wish to use C for microcontroller development
projects.
First Steps with Embedded Systems will be useful both as an introduction to
microcontroller programming for intermediate level post-secondary programs
and as a guide for developers coping with the growth and change of the
microcontroller industry.

Typographical Conventions

Bold is used to indicate key terms.
Italic is used for emphasis and to denote references to documents.
Courier is used for sample code and code excerpts.
Courier
Italic
is used to indicate place holders in user input or in output produced by the
software. For example, the filename START.ext has an italicised
extension which indicates that the file can have any valid extension.
_ _ the double underscore contains a small space to display both characters.
Do not type the space in the double underscore character in your code.
# is used within one section to refer to another section on a related topic.
NOTE
An important note will appear in this way.
0x is used to denote a hexadecimal number. For example: 0xFFF
0b is used to denote a binary number. For example: 0b010101
Introduction

Explaining the Microcontroller

Instead of presenting a detailed examination of a specific microcontroller or
microcontroller family, First Steps with Embedded Systems explains concepts which
are common to most 8 bit microcontrollers. This book will focus on several
specific parts for example purposes. These include Motorola’s MC68HC705C8,
National Semiconductor’s COP8SAA7 and Microchip’s PIC16C54 and
PIC16C74.
The industry provides a large array of speciality microcontroller configurations
with optional features and feature combinations. However, many 8 bit
microcontrollers have a common underlying architecture. This book examines
this common architecture and guides you through the issues you need to
understand in order to program a microcontroller. Learning common
microcontroller architecture has several important advantages:
$ You will not be overwhelmed by details
Microcontrollers have a set of common, general features. These general features
form an essential preliminary foundation for learning specific microcontroller
implementations. Variations, options and specific implementations offered by
various microcontrollers are also included for example purposes.
$ You will learn the basics of portability
One advantage of using C to program microcontrollers is program portability.
Each microcontroller has an individual instruction set and assembly language.
Modifying assembly language code so a program written for one
microcontroller will run on a different microcontroller is very time consuming
and effort intensive.
Writing C code that supports general microcontroller features helps to avoid
portability problems. Details relating to specific hardware implementations can
be placed in separate library functions and header files. Using C library
functions and header files ensures that application source code can be recompiled
for different microcontroller targets.
$ You can spend more time on algorithm design and less on
implementation
C is a high level language. You will be able to program your applications quickly
and easily using C. C’s breadth of expression is concise and powerful; therefore,
Book Contents

each line of code written in C can replace many lines of assembly language.
Debugging and maintaining code written in C is much easier than in assembly
language code.

Book Contents

Section 2, Microcontroller Overview, describes the standard microcontroller
and covers the basic components of a microcontroller.
Section 3, The Embedded Environment, describes basic microcontroller
concepts such as input, output, interrupts, timing and memory.
Section 4, Programming Fundamentals, includes brief explanations of basic
topics such as number systems, languages and development tools.
Section 5, First Look at a C Program, provides a sample C program and then
examines the basic components represented by the example.
Section 6, C Program Structure, covers the main components of a C program:
directives, identifiers and statements.
Section 7, Basic Data Types, covers the different data types and how to use
them with variables and functions.
Section 8, Operators and Expressions, covers arithmetic, assignment,
comparison and bit level C operators and expressions.
Section 9, Control Structures, covers conditional expressions and decision and
looping structures.

Section 10, Functions, covers defining, prototyping, calling and declaring C
functions. This section also examines function parameters.
Section 11, Complex Data Types, covers pointers, arrays, user defined types,
enumerated types, structures and bitfields.
Section 12, Storage and Data Type Modifiers, covers modifiers which specify
location, value, size, and sign of data types.
Section 13, The C Preprocessor, covers C preprocessor directives and related
issues such as file inclusion, target hardware definition, conditional compilation,
and inline assembly.
Section 14, Libraries, describes the standard embedded systems libraries.