下载  >  开发技术  >  硬件开发  > Make_AVR_Programming

Make_AVR_Programming 评分:

從基礎入門到實務應用,軟硬兼備的好書 特色如下 : Program a range of AVR chips Extend and re-use other people’s code and circuits Interface with USB, I2C, and SPI peripheral devices Learn to access the full range of power and speed of the microcontroller Build projects including Cylon Eyes, a Square-Wave Organ, an AM Radio
Make AVR rogramming Elliot wiliams MAKERMEDIA SEBASTOPOL CA Make: AVR Programming by elliot williams Copyright C 2014 Elliot Williams. All rights reserved Printed in the United states of america Published by Maker Media, Inc, 1005 Gravenstein Highway North, Sebastopol, CA 95472 Maker Media books may be purchased for educational, business, or sales promotional use Online editions arealsoavailableformosttitles(http:/my.safaribooksonline.com).FormoreinformationcontactOreillY Mediascorporate/institutionalsalesdepartment:800-998-9938orcorporate@oreilly.com Editor: patrick di justo Indexer: Judy Mc conville Production editor: Kara ebrahim Cover Designer: Shawn Wallace Copyeditor: Kim Cofer Interior Designer: Monica Kamsvaag Proofreader: Amanda Kersey lustrator: Rebecca demarest February 2014: First Edition Revision History for the First Edition 2014-01-24: First release Seehttporeilly.com/catalog/errata.csp?isbn=9781449355784forreleasedetails The Make logo and maker Media logo are registered trademarks of Maker Media, Inc. Make: AVR Program ming and related trade dress are trademarks of Maker Media, Inc Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and Maker Media, Inc, was aware of a trademark claim, the designations have been printed in caps or initial caps While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein SBN:978-1-449-35578-4 [LSI Table of contents Preface.,,∴。Xi Part The basics 1. Introduction。.3 What Is a Microcontroller? The Big Picture............3 A Computer on a Chip ............ 3 But a very small Computer 4 What Can Microcontrollers do? Hardware: The Big Picture The Core: Processor, Memory, and 1/o ∴,8 Peripherals: Making Your Life Easier..............9 2. Programming AVRs....,......... 13 Programming the avr 13 14 The Software Toolchain 16 Linux set 18 Windows Setup........ 18 Mac Setup 18 Arduino setup.……… Make and makefi 19 AVR and the arduino 20 Arduino pros 20 Arduino cons 20 The Arduino: Hardware or Software? both! 23 The arduino is an avr 23 The Arduino Is an AVR Programmer 25 Other Hardware Programmers 28 Flash Programmers I Have Known and Loved 28 Getting Started: Blinking LEDs Hookup 30 ISP Headers AVRDUDE ,35 Configuring Your Makefile 38 Flash 40 Troubleshooting 3. Digital Output 43 blinkED Redux 44 The Structure of avr c code .45 Hardware Registers 46 blinkLED Summary....... 49 POV Toy 49 Building the circuit 50 Pretty Patterns: The POv Toy Code 54 Experiment! 56 4. Bit Twiddling 59 rking Through the Code: Cylon Eyes 60 Bit Twiddling and cylon eyes 61 Bit Shifting 62 Advanced Bit Twiddling: Above and Beyond Cylon Eyes 64 Setting Bits with OR 67 Toggling Bits with XOR 69 Clearing a Bit with AND and NOT 70 Showing o仟......... 71 Summary 75 S. Serial 1/0 Serial communication 77 Implementing Serial Communication on the AVR: Loopback Project 81 Setup: Configuring the AvR 81 Setup: Your Computer 83 Setup: USB-Serial Adapter ,83 Putting It All Together: Test Out Your Loopback........ 86 Troubleshooting Serial Connections ,,87 Configuring USART: The Nitty-Gritty Details 88 AVR Square-Wave organ 95 Making Music with Your Micro 96 Make: AVR Programming The Organ Library… 98 The Code ·鲁春音看看鲁春鲁 99 Extra goodies∴ 102 Summa 103 6. Digital Input∴105 Pushbuttons, Switches, Etc. 105 Configuring Input: DDRS, PORTS, and PINs...........108 Interpreting Button Presses 109 Changing State 112 Debouncing......... ,113 Debounce example 115 AVR Music Box 117 The Code 117 Boss Button 119 Desktop-side Scripting.. 120 Extensions 124 7. Analog-to-Digital Conversion I........125 ADC Hardware Light Meter 129 The Circuit∴ ..129 The code 135 ADC Initialization 137 Extensions 139 Loscope 翻看 140 The avr code 看· ,,,,141 The Desktop Code 43 Synergie 145 AVR Night Light and the Multiplexer 145 Multiplexing 145 Setting the Mux Bits 146 The Circuit ,148 The Code 148 ummary 150 Part Intermediate AVr 8. Hardware Interrupts......... 153 External Interrupts 101: Real-time Button Pressing Examples..155 External Interrupt 0 Example ,,156 Pin-Change Interrupt Example 161 Capacitive Sensor.......... ,164 The Sensor ,165 Table of contents The Code 168 Global, volatile Variable 170 Debugging the Ci 173 8. Introduction to the Timer/ Counter hardware 175 Timer/Counters: Why and How? 175 Test Your reaction time 178 Timer 0 for a Better 8-Bit Organ 182 AM Radio ..186 The circuit∴188 CPU Speed .,189 AM Radio: The Code ..190 Summary 196 10. Pulse-Width modulation 199 Bright and dim LEDs: PWM ,,,200 Brute-Force PWM demo 202 Timers PwM demo 204 Initializing Timers for PWM Mode 206 PWM on Any Pin........................ 208 PWM on Any Pin Demo..,,…,…,,209 Closing: Alternatives to PWM and a Timer Checklist 211 11. Driving Servo Motors e鲁e●.鲁。。●鲁。鲁●鲁。自鲁鲁 215 Servos 216 The secret life of servos ,,217 The Circuit ,,218 The code 219 Servo sundial 223 The build 224 Ready the lasers ..227 The Code 229 Servo sundial calibration,....236 12. Analog-to-Digital Conversion I 243 Voltage M 244 The Circuit 245 The Code 248 The Footstep Detect 252 The Circuit 253 leery 258 Exponentially Weighted Moving Averages 259 The Code 262 Make: AVR Programming Summary 266 Part l. Advanced AVR Topics 13. Advanced PwM Tricks 。。。269 Direct-Digital Synthesis 270 Making a Sine Wave 274 Next Steps: Mixing and Volume ,277 Mixing........,............277 Dynamic Volume Control ∴,280 Polling USART .283 ADSR Envelope 283 Auxiliary Files 284 14. Switches 287 Controlling big Loads: Switches.................288 Bipolar-Junction Transistors 290 MOSFETS∴ 291 Power mosfets 293 Relays 294 Triacs and SSrs Switches: Summary.……… 296 DC Motors 297 15. Advanced Motors ●鲁鲁。●e鲁e。。自。ee鲁自e鲁@● 305 Going in Reverse: H-Bridg 306 Code: Taking Your H-Bridge Out for a Spin 309 Experts-Only H-Bridge 312 PWM and the h-bridge 313 Drive Modes: Sign-Magnitud 314 Drive Modes: Locked Anti-phase 314 Drive Modes: Comparison ∴,315 Stepper Mot 318 Kinds of Stepper Motors....................319 Full Stepping and Half Stepping 320 Identification of Stepper Motor Wires 323 Too Many Wires 323 Dual H-Bridge Chips: The SN754410 325 The cod 327 Acceleration Control,.,....................331 Microstepping 334 18.sP 337 How SPl Works 338 Table of contents VIl Bit Trading Example 340 Shift Registers ∴.340 EEPROM External Memory...................343 External Memory ,344 SPI Demo Hookup .347 SPI Demo Code 348 SPI EEPROM Library Header ∴350 SPI EEPROM Library C Code.................. 352 initsPl,..........354 SPI trade Byte 355 Convenience functions............,.......356 Summary 357 17.2C... 359 How 12C Works .360 12C Demo Hookup 364 12C Demo Library......... ∴365 12C Thermometer demo ,369 SPI and 12C Data logger ,,371 Pointers in eeprom........ 375 The UART Serial menu ,376 The Loggers Event Loop...................377 18. Using Flash Program Memory ●鲁。。自。鲁自自 379 Using Flash Program Memory ∴.379 Memory Addresses.....................381 The Address-Of Operator ,382 Pointers ∴,385 Pointers in brief 385 Pointers as Arguments to Functions 388 Summary 392 Optional: Dereferencing Pointers 393 Talking Voltmeter∴.,,,,,…,,… 394 PROGMEM Data Structures and the header file 395 Sound Playback and Voltage Reading: The. c File 400 Generating the Audio Data 404 Differential Pulse-Code Modulation..............404 Encoding Two-bit DPCM 405 Encoding DPCM: wave2DPCM py 408 19. EEPROM 。。。。。413 Using EEPROM..,,,…,,…,, 414 Storing in Memory 414 Reading from Memory.…,,,,…,,,,,,.419 Saving and Loading EEPROm 422 viii Make: AVR Programming

...展开详情
2015-02-26 上传 大小:49MB
举报 收藏
分享

评论 下载该资源后可以进行评论 共1条

sk237656122 下载以后无法打开,不知道是何原因
2015-05-02
回复
Make: AVR Programming 原版PDF by Williams

Microcontroller projects are ubiquitous in the hobbyist/hacker/Maker world, and with good reason. Microcontrollers stand directly in the middle ground between the hardware world of buttons, motors, and lights and the software world of algorithms, connectivity, and infinite possibility. Microcontroll

立即下载
IAR_for_AVR

IAR_for_AVR

立即下载
test_5110_avr

test_5110_avr,AVR的5110的显示,函数可以直接调用。

立即下载
modbus_RTU_的_AVR_单片机_C程序

modbus_RTU_的_AVR_单片机_C程序

立即下载
IAR_FOR_AVR_基本教程

IAR_FOR_AVR_基本教程

立即下载
IAR_for_AVR_学习笔记

IAR_for_AVR_学习笔记 bool 数据类型在C++语言里是默认支持的。如果你在C 代码的头文件里包含st dbool.h, bool 数据类型也可以使用在C 语言里。也可以使用布尔值 false 和 true

立即下载
USB_AVR_Programmer

USB_AVR_Programmer for all type atmega 32,atmeaga8

立即下载
MHV_AVR_Tools_20121007

MHV_AVR_Tools_20121007

立即下载
GPRS_AVR AVR单片机控制GPRS发短信 LCD显示

GPRS_AVR AVR单片机控制GPRS发短信 LCD显示,同学以前做的一个小项目,现在我帮他分享给大家,嘿嘿。

立即下载
ADC_VR_AVR

AVR atmega adc winavr avrstudio

立即下载
frequency_test_avr

基于AVR单片机M128开发的频率计测量程序,希望大家一起学习AVR单片机

立即下载
IAR_FOR_AVR 基本教程

自己写的IAR_FOR_AVR 的IDE环境基本教程,介绍了在IAR环境下配置AVR单片机的教程

立即下载
ICC_AVR_V625

ICC_AVR_V625

立即下载
iar_avr_511 genkey

iar_avr_511 genkey,for iar avr 5.11 version

立即下载
mikroC_PRO_AVR_2008_Build.1.35

mikroC_PRO_AVR_2008_Build.1.35

立即下载
led02.rar__AVR单片机

led02.rar led02.rar led02.rar led02.rar

立即下载
IAR_AVR_C(IAR avr)编译器指南

IAR_AVR_C(IAR avr)编译器指南 就是编译器的的简化版中文帮助

立即下载
Proteus_AVR16_example

Proteus_AVR16_example对于AVR初学者很有帮助!

立即下载
AVR单片机开发工具ICC_AVR

AVR单片机开发工具,ICC_AVR,希望对正在学习AVR单片机,又苦于找开发工具的朋友有帮助。

立即下载
html+css+js制作的一个动态的新年贺卡

该代码是http://blog.csdn.net/qq_29656961/article/details/78155792博客里面的代码,代码里面有要用到的图片资源和音乐资源。

立即下载