Muutke küpsiste eelistusi

AVR Workshop: A Hands-On Introduction with 60 Projects [Pehme köide]

  • Formaat: Paperback / softback, 368 pages, kõrgus x laius: 234x177 mm
  • Ilmumisaeg: 25-Oct-2022
  • Kirjastus: No Starch Press,US
  • ISBN-10: 1718502583
  • ISBN-13: 9781718502581
Teised raamatud teemal:
  • Formaat: Paperback / softback, 368 pages, kõrgus x laius: 234x177 mm
  • Ilmumisaeg: 25-Oct-2022
  • Kirjastus: No Starch Press,US
  • ISBN-10: 1718502583
  • ISBN-13: 9781718502581
Teised raamatud teemal:
"AVR Workshop is a comprehensive introduction to working with the Microchip AVR 8-bit family of microcontrollers, which are used in Arduino and compatible boards. The book teaches both beginners and longtime electronics enthusiasts the basic C programming skills and hardware knowledge required to build over 55 projects with these popular and inexpensive microcontrollers"--

Build more than 55 hands-on, wide-ranging projects with the popular and versatile AVR family of microcontrollers.

AVR Workshop is a comprehensive introduction to working with the Microchip AVR 8-bit family of microcontrollers – made famous through their use in Arduino and other compatible boards. Whether you’re an absolute beginner or longtime electronics enthusiast, this book gives you the latest coding and hardware knowledge required to build over 55 projects. After the author guides you through the basic C programming skills you need to work directly with ATmega328P-PU and ATtiny85 microcontrollers, your operation will be up and running. You’ll go from building blinking LEDs and handling various types of user input, to creating real-time clocks, digital thermometers, and even controlling small motorized devices.
Acknowledgments xvii
Introduction xix
1 Getting Started
1(28)
The Possibilities Are Endless
2(2)
The Microchip AVR Microcontrollers
4(2)
Required Parts and Accessories
6(2)
Electronic Components
7(1)
Choosing an AVR Programmer
7(1)
Required Software
8(7)
MacOS 10.6 or Later
9(1)
Ubuntu Linux 20.04 LTS or Later
10(1)
Windows 7 Through 11
11(4)
Current, Voltage, and Power
15(1)
Electronic Components
15(14)
Resistors
16(3)
Light-Emitting Diodes
19(1)
Power Diodes
20(1)
Capacitors
21(2)
Integrated Circuits
23(1)
Solderless Breadboards
24(1)
Powering Your Projects
25(4)
2 First Steps
29(28)
Testing the Hardware and Toolchain
30(6)
Build the Circuit
30(3)
Connect and Run the Programmer
33(2)
What If It Didn't Work?
35(1)
Project 0 Blinking an Led
36(3)
Uploading Your First AVR Code
36(2)
What If It Didn't Work?
38(1)
Controlling Digital Outputs
39(2)
Hardware Registers
39(2)
Project 1 Experimenting with ATtiny85 Digital Outputs
41(2)
The Hardware
42(1)
The Code
42(1)
Using Schematic Diagrams
43(4)
Components in Schematics
44(1)
Wires in Schematics
45(1)
Dissecting a Schematic
46(1)
Project 2 Experimenting with ATmega328P-PU Digital Outputs
47(3)
The Hardware
47(2)
The Code
49(1)
Project 3 Bit-Shifting Digital Outputs
50(3)
Project 4 Experimenting with NOT
53(1)
Project 5 Experimenting with AND
54(1)
Project 6 Experimenting with OR
55(1)
Project 7 Experimenting with XOR
56(1)
3 Getting and Displaying Input
57(34)
Digital Inputs
58(1)
Introducing the Pushbutton
58(1)
Reading the Status of Digital Input Pins
59(1)
Project 8 Blinking an LED on Command
59(2)
The Hardware
59(1)
The Code
60(1)
Making Decisions in Code
61(2)
If Statements
61(1)
If ... else Statements
62(1)
Making Two or More Comparisons
62(1)
Switch ... case Statements
63(1)
Creating Your Own Functions
63(1)
Project 9 A Simple Custom Function
64(1)
Project 10 Custom Functions with Internal Variables
65(1)
Project 11 Custom Functions That Return Values
66(2)
Switch Bounce
68(1)
Protecting Your AVR from Fluctuating Voltages
69(1)
Pullup Resistors
69(1)
Pulldown Resistors
70(1)
Introducing Seven-Segment LED Displays
70(1)
Project 12 Building a Single-Digit Numerical Counter
71(3)
The Hardware
72(1)
The Code
72(2)
Analog Inputs
74(1)
Using ATtiny85 ADCs
75(1)
Project 13 Making a Single-Cell Battery Tester
76(3)
The Hardware
76(1)
The Code
77(2)
Using the ATmega328P-PU ADCs
79(1)
Introducing the Variable Resistor
80(2)
Project 14 Experimenting with an ATmega328P-PU ADC
82(2)
The Hardware
82(1)
The Code
83(1)
Doing Arithmetic with an AVR
84(1)
Using External Power
85(1)
The TMP36 Temperature Sensor
86(1)
Project 15 Creating a Digital Thermometer
87(4)
The Hardware
87(1)
The Code
88(3)
4 Communicating With the Outside World Using the Usart
91(24)
Introducing the USART
92(1)
Hardware and Software for USART Communication
93(2)
Project 16 Testing the USART
95(3)
The Hardware
95(1)
The Code
96(2)
Project 17 Sending Text with the USART
98(2)
Project 18 Sending Numbers with the USART
100(2)
Project 19 Creating a Temperature Data Logger
102(6)
The Hardware
102(2)
The Code
104(4)
Project 20 Receiving Data from Your Computer
108(3)
Project 21 Building a Four-Function Calculator
111(4)
5 Taking Control With Hardware Interrupts
115(22)
External Interrupts
116(2)
Setting Up Interrupts in Code
116(2)
Project 22 Experimenting with Rising Edge Interrupts
118(3)
The Hardware
118(1)
The Code
119(2)
Project 23 Experimenting with Falling Edge Interrupts
121(3)
The Hardware
121(1)
The Code
122(2)
Project 24 Experimenting with Two Interrupts
124(2)
The Hardware
124(1)
The Code
125(1)
Pin-Change Interrupts
126(3)
Project 25 Experimenting with Pin-Change Interrupts
129(2)
The Hardware
129(1)
The Code
130(1)
Project 26 Creating an Up/Down Counter Using Interrupts
131(4)
The Hardware
131(1)
The Code
132(3)
Final Notes on Interrupts
135(2)
6 Using Hardware Timers
137(16)
Introducing Timers
138(1)
Project 27 Experimenting with Timer Overflow and Interrupts
139(7)
The Hardware
139(1)
The Code
140(1)
Examining the Accuracy of the Internal Timer
141(1)
Project 28 Using a CTC Timer for Repetitive Actions
142(1)
Project 29 Using CTC Timers for Repetitive Actions with Longer Delays
143(4)
Addressing Registers with Bitwise Operations
147(3)
Addressing Individual Bits in a Register
147(2)
Addressing Multiple Bits in a Register
149(1)
Project 30 Experimenting with Overflow Timers Using Bitwise Operations
150(3)
7 Using Pulse-Width Modulation
153(16)
Pulse-Width Modulation and Duty Cycles
154(1)
Project 31 Demonstrating PWM with the ATtiny85
155(2)
The Hardware
155(1)
The Code
155(2)
Individual PWM Pin Control for the ATtiny85
157(2)
Project 32 Experimenting with Piezo and PWM
159(2)
The Hardware
159(1)
The Code
160(1)
Individual PWM Pin Control for the ATmega328P-PU
161(2)
The RGB LED
163(1)
Project 33 Experimenting with RGB LEDs and PWM
164(1)
The Hardware
164(5)
8 Controlling Motors With Mosfets
169(20)
The MOSFET
170(1)
Project 34 DC Motor Control with PWM and MOSFET
171(3)
The Hardware
171(1)
The Code
172(2)
Project 35 Temperature-Controlled Fan
174(4)
The Hardware
174(2)
The Code
176(2)
The L293D Motor Driver IC
178(2)
Project 36 DC Motor Control with L293D
180(3)
The Hardware
181(1)
The Code
181(2)
Project 37 Controlling a Two-Wheel-Drive Robot Vehicle
183(6)
The Hardware
184(1)
The Code
185(4)
9 Using the Internal Eeprom
189(16)
Storing Bytes in Eeprom
190(1)
Project 38 Experimenting with the ATtiny 85's Eeprom
191(1)
Storing Words
192(1)
Project 39 A Simple EEPROM Datalogger
193(5)
The Hardware
193(1)
The Code
194(4)
Storing Floating-Point Variables
198(1)
Project 40 Temperature Logger with EEPROM
199(6)
The Hardware
199(6)
10 Writing Your Own Avr Libraries
205(14)
Creating Your First Library
206(2)
Anatomy of a Library
207(1)
Installing the Library
208(1)
Project 41 Your First Library
208(2)
Creating a Library That Accepts Values to Perform a Function
210(2)
Project 42 Using the blinko2.c Library
212(1)
Creating a Library That Processes Data and Returns Values
212(3)
Project 43 Creating a Digital Thermometer with the thermometer.c Library
215(4)
11 Avr and the Spi Bus
219(30)
How Buses Work
220(3)
Pin Connections and Voltages
221(1)
Implementing the SPI Bus
222(1)
Sending Data
223(1)
Project 44 Using the 74HC595 Shift Register
223(6)
The Hardware
225(1)
The Code
226(3)
Project 45 Using Two 74HC595 Shift Registers
229(2)
The Hardware
229(1)
The Code
230(1)
Project 46 Using the MAX7219 LED Driver IC
231(6)
The Hardware
231(3)
The Code
234(3)
Project 47 Adding a Reset Button
237(2)
Multiple SPI Devices on the Same Bus
239(1)
Receiving Data from the SPI Bus
239(1)
Project 48 Using the MCP3008 ADC IC
240(9)
The Hardware
242(1)
The Code
243(6)
12 Avr and the I2C Bus
249(32)
Increasing AVR Speed
250(2)
Introducing the I2C Bus
252(4)
Pin Connections and Voltages
253(1)
Writing to I2C Devices
254(2)
Project 49 Using the MCP23017 16-Bit I/O Expander
256(6)
The Hardware
258(1)
The Code
259(3)
Reading Data from I2C Devices
262(1)
Project 50 Using an External IC EEPROM
263(7)
The Hardware
264(1)
The Code
265(5)
Project 51 Using the DS3231 Real-Time Clock
270(11)
The Hardware
272(1)
The Code
273(8)
13 Avr and Character Liquid Crystal Displays
281(32)
Introducing LCDs
282(6)
Send Commands to the LCD
285(1)
Initialize the LCD for Use
286(1)
Clear the LCD
286(1)
Set the Cursor
286(1)
Print to the LCD
287(1)
Project 52 Using a Character LCD with Your AVR
288(4)
The Hardware
288(1)
The Code
289(3)
Project 53 Building an AVR-Based LCD Digital Clock
292(8)
The Hardware
292(1)
The Code
293(7)
Displaying Floating-Point Numbers on the LCD
300(1)
Project 54 LCD Digital Thermometer with Min/Max Display
301(5)
The Hardware
301(1)
The Code
302(4)
Displaying Custom Characters on the LCD
306(3)
Write Data to CGRAM
308(1)
Send Custom Character Data to LCD
308(1)
Display Custom Characters on LCD
308(1)
Project 55 Displaying Custom LCD Characters
309(4)
14 Controlling Servos
313(20)
Setting Up Your Servo
314(3)
Connecting a Servo
315(1)
Controlling a Servo
315(2)
Project 56 Experimenting with Servos
317(3)
The Hardware
317(1)
The Code
318(2)
Project 57 Creating an Analog Thermometer
320(3)
The Hardware
320(2)
The Code
322(1)
Project 58 Controlling Two Servos
323(3)
The Hardware
323(1)
The Code
324(2)
Project 59 Building an Analog Clock with Servo Hands
326(7)
The Hardware
326(1)
The Code
327(6)
Epilogue 333(2)
Index 335
John Boxall has been an electronics enthusiast for over 30 years, spending much of that time in the retail, wholesale, and consulting fields. He also spent several years writing Arduino tutorials, designing projects, and reviewing kits and accessories at www.tronixstuff.com. Arduino Workshop (No Starch Press) was his first book.