Phu Xuan University Library
Embedded Controllers Using C and Arduino

External

Embedded Controllers Using C and Arduino

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.

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