Embedded C Programming
eBook - ePub

Embedded C Programming

Techniques and Applications of C and PIC MCUS

Mark Siegesmund

Compartir libro
  1. 424 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Embedded C Programming

Techniques and Applications of C and PIC MCUS

Mark Siegesmund

Detalles del libro
Vista previa del libro
Índice
Citas

Información del 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

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Embedded C Programming un PDF/ePUB en línea?
Sí, puedes acceder a Embedded C Programming de Mark Siegesmund en formato PDF o ePUB, así como a otros libros populares de Computer Science y Hardware. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Editorial
Newnes
Año
2014
ISBN
9780128014707
Categoría
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...

Índice