Embedded Controllers Using C and Arduino

by James M. Fiore

This text is designed to introduce and expand upon material related to the C programming language and embedded controllers, and specifically, the Arduino development system and associated Atmel ATmega microcontrollers. It is intended to fit the time constraints of a typical 3 to 4 credit hour course for electrical engineering technology and computer engineering technology programs, although it could also fit the needs of a hardware-oriented course in computer science.

Description from LibreTexts.

Publisher
Mohawk Valley Community College
Subjects
Engineering, Electrical Engineering
Licence
CC BY-NC-SA 4.0, as LibreTexts states it. Non-commercial use only.
Who can read
Tweens profiles and older, judged from its title and subjects

Contents

LibreTexts writes equations in TeX, and here they show as TeX; the PDF has them typeset.

  1. Front Matter
  2. TitlePage
  3. InfoPage
  4. A Note from the Author
  5. Table of Contents
  6. Introduction
  7. Licensing
  8. Content Licensing Report
  9. 1: Course Introduction
  10. 1.1: Overview
  11. 1.2: Frequently Asked Questions
  12. 2: C Memory Organization
  13. 2.1: Introduction
  14. 2.2: Guts 101
  15. 2.3: Memory Maps
  16. 2.4: Stacks
  17. 3: C Language Basics
  18. 3.1: Introduction
  19. 3.2: Variable Naming, Types and Declaration
  20. 3.3: Functions
  21. 3.4: Libraries
  22. 3.5: Some Simple Math
  23. 3.6: The Program Creation/Development Cycle
  24. 3.7: Summary
  25. 3.8: Exercises
  26. 4: C Basics II
  27. 4.1: Input and Output
  28. 4.2: Variable Sizes
  29. 4.3: More Math
  30. 4.4: Bitwise Operations
  31. 4.5: Setting, Clearing and Reading Register Bits
  32. 4.6: define
  33. 4.7: Keywords
  34. 4.8: Exercises
  35. 5: C Storage Types and Scope
  36. 5.1: Types
  37. 5.2: Scope
  38. 5.3: Exercises
  39. 6: C Arrays and Strings
  40. 6.1: Introduction
  41. 6.2: String Manipulation
  42. 6.3: Exercises
  43. 7: C Conditionals and Looping
  44. 7.1: Conditionals
  45. 7.2: Nesting
  46. 7.3: Looping
  47. 7.4: While or For?
  48. 7.5: Exercises
  49. 8: C Pointers and Addresses
  50. 8.1: Introduction
  51. 8.2: Using Addresses and Pointers
  52. 8.3: Pointer Dereferencing
  53. 8.4: Pointer Math
  54. 8.5: Pointers and Arrays
  55. 8.6: Exercises
  56. 9: C Look-up Tables
  57. 9.1: Introduction
  58. 9.2: “Yes, I’d Like a Table for 360, Please”
  59. 9.3: Waving Quickly
  60. 9.4: Error Correction via Table Translation
  61. 10: C Structures
  62. 10.1: Introduction
  63. 10.2: Pointers and Structures
  64. 10.3: Structures, Arrays, and So On
  65. 10.4: Exercises
  66. 11: C Linked Lists
  67. 11.1: Introduction
  68. 11.2: Linked List Example
  69. 11.3: Exercise
  70. 12: C Memory
  71. 12.1: Introduction
  72. 12.2: Free Memory Pool
  73. 12.3: Allocating Memory
  74. 12.4: Using Memory
  75. 12.5: Freeing Memory
  76. 12.6: Operating System Specific Routines
  77. 12.7: Exercises
  78. 13: C File IO
  79. 13.1: Introduction
  80. 14: C Command Line Args and More
  81. 14.1: Command Line Arguments
  82. 14.2: Conditional Compilation
  83. 14.3: Exercise
  84. 15: Embedded Programming
  85. 15.1: Introduction
  86. 15.2: Input/Output
  87. 15.3: Math
  88. 15.4: Memory and Hardware
  89. 15.5: Code Development
  90. 16: Hardware Architecture
  91. 16.1: Introduction
  92. 16.2: Atmel AVR Core
  93. 16.3: Memory
  94. 17: AVR ATmega 328P Overview
  95. 17.1: AVR ATmega 328P Overview
  96. 18: Bits and Pieces — include and define
  97. 18.1: Introduction
  98. 18.2: Universal Stuff, Common to All Controllers
  99. 18.3: Controller Specific Stuff
  100. 19: Bits and Pieces — Digital Output Circuitry
  101. 19.1: Introduction
  102. 19.2: Output Circuitry
  103. 20: Bits and Pieces — Digital Input Circuitry
  104. 20.1: Introduction
  105. 20.2: Input Circuitry
  106. 21: Bits and Pieces — pinMode()
  107. 21.1: pinMode()
  108. 22: Bits and Pieces — digitalWrite()
  109. 22.1: digitalWrite()
  110. 23: Bits and Pieces — delay()
  111. 23.1: delay()
  112. 24: Bits and Pieces — digitalRead()
  113. 24.1: Introduction
  114. 24.2: A Practical Example — Round-Robin Switch
  115. 24.3: Exercise
  116. 25: Bits and Pieces — Analog Input Circuitry
  117. 25.1: Introduction
  118. 25.2: ATmega ADC system
  119. 26: Bits and Pieces — analogRead()
  120. 26.1: Introduction
  121. 26.2: A Practical Example — Mapping a Sensor
  122. 26.3: Exercise
  123. 27: Bits and Pieces — analogWrite()
  124. 27.1: analogWrite()
  125. 28: Bits and Pieces — Timer/Counters
  126. 28.1: Introduction
  127. 28.2: Normal Mode
  128. 28.3: Fast PWM Mode
  129. 29: Bits and Pieces — Interrupts
  130. 29.1: Introduction
  131. 29.2: External Interrupts
  132. 29.3: Internal Interrupts — Blinking LED
  133. 29.4: Internal Interrupts — Hand Wrought PWM
  134. 29.5: Internal Interrupts — CTC Mode
  135. 30: Appendix A
  136. 30.1: ATmega 328P Register Map
  137. 31: Appendix B — Answers to Selected Problems
  138. 31.1: Chapter 3
  139. 31.2: Chapter 4
  140. 31.3: Chapter 7
  141. 31.4: Chapter 8
  142. 31.5: Chapter 10
  143. 31.6: Chapter 12
  144. Back Matter
  145. Index
  146. Index
  147. Glossary
  148. Detailed Licensing