Embedded C Programming
eBook - ePub

Embedded C Programming

Techniques and Applications of C and PIC MCUS

Mark Siegesmund

Condividi libro
  1. 424 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Embedded C Programming

Techniques and Applications of C and PIC MCUS

Mark Siegesmund

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

This book provides a hands-on introductory course on concepts of C programming using a PIC® microcontroller and CCS C compiler. Through a project-based approach, this book provides an easy to understand method of learning the correct and efficient practices to program a PIC® microcontroller in C language. Principles of C programming are introduced gradually, building on skill sets and knowledge. Early chapters emphasize the understanding of C language through experience and exercises, while the latter half of the book covers the PIC® microcontroller, its peripherals, and how to use those peripherals from within C in great detail.

This book demonstrates the programming methodology and tools used by most professionals in embedded design, and will enable you to apply your knowledge and programming skills for any real-life application. Providing a step-by-step guide to the subject matter, this book will encourage you to alter, expand, and customize code for use in your own projects.

  • A complete introduction to C programming using PIC microcontrollers, with a focus on real-world applications, programming methodology and tools
  • Each chapter includes C code project examples, tables, graphs, charts, references, photographs, schematic diagrams, flow charts and compiler compatibility notes to channel your knowledge into real-world examples
  • Online materials include presentation slides, extended tests, exercises, quizzes and answers, real-world case studies, videos and weblinks

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Embedded C Programming è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Embedded C Programming di Mark Siegesmund in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Hardware. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Editore
Newnes
Anno
2014
ISBN
9780128014707
Categoria
Hardware
Chapter 1

C Overview and Program Structure

Abstract

This chapter explains the structure of C programs as it pertains to embedded microcontrollers. A short example program is used to introduce the reader to each of the basic C elements.
Compilation units (sometimes called translation units), functions, statements, compound statements, expressions, and data declarations are all introduced. The unique C preprocessor concept is covered with some simple preprocessor directive samples. This chapter shows how constants, variables, operators, and function calls make up the basic components of an expression and how they are used together in the C programming language. The basics of functions calls, including passing and returning data, are included.
Examples and exercises are for the popular PIC™ microcontroller manufactured by Microchip.
Keywords
C program structure
Compilation unit
Translation unit
C comments
Functions
Statements
Expressions
Preprocessor

C Source Code

This is what C source code looks like:
image
This program may look very cryptic to you now. When you have finished reading this book and doing the experiments, this program and much more complex ones will no longer seem cryptic. As you read the next few chapters, you can refer to this program to see how the topics relate to this program. For now, let’s make some observations about the overall look of the program.

Comments

Comments help anyone (including you) who reads your code understand what it does. There are two styles.
image
Comments between
image
and
image
(can span multiple lines, but may not be nested)
image
Comments between
image
and end of line (one line only).
The compiler ignores all comments. Both styles are shown in the sample program.

Program Structure

C programs are made up of compilation units, sometimes called translation units. A compilation unit is a set of files that are compiled together by a compiler. For most examples in this book we will be using a single compilation unit. A compilation unit is made up of global data and functions. A function is a callable group of code that in some other languages is referred to as a procedure or subroutine. Functions are made up of lo...

Indice dei contenuti