Introduction to the Integrated Application of AVR Microcontrollers and CPLD/FPGA

Author: Huang Ren
Publisher:
Publish Date: 2004-08-01
Features: This book can serve as a training reference for the National Collegiate Electronic Design Contest and electronic technology activities, as well as a reference for electronic enthusiasts and university teachers and students engaged in digital circuit design. The book systematically discusses the communication and collaboration methods between microcontrollers and CPLD/FPGA, and comprehensively elaborates on the design ideas and specific implementations of integrated application systems such as high-precision frequency counters, digital-to-analog waveform generators, and simple logic analyzers. The several systems presented as examples in the book are representative contest topics from past editions of the National Collegiate Electronic Design Contest, making them highly instructive for students preparing to participate in electronic design contests. The book incorporates the author's experience and insights in designing systems, providing microcontroller programs and VHDL programs with detailed annotations, which offer good inspiration and reference value.
Chapter 1: AVR Microcontroller and Its Development Tools
Briefly introduces the concept of microcontrollers and common microcontrollers on the market along with their features; introduces several commonly used C compilers for AVR microcontrollers; introduces development tools such as AVR microcontroller simulation software, download software, and parameter calculators; and explains how to customize a personal integrated development environment for GCC.
Chapter 2: Introduction to AVR Microcontroller
Briefly introduces the structure of AVR ATmega16 and basic knowledge of GCC; introduces the use of a 16×2 character LCD and a 4×4 matrix keypad; concludes with a classic application example: a simple digital clock.
Chapter 3: Introduction to CPLD/FPGA and VHDL
Briefly introduces CPLD/FPGA and their development process in Max+PlusII; answers some common questions that beginners in VHDL often find confusing in a Q&A format; provides VHDL programs for common circuits, including "7-segment display," "synchronous shaping circuit," and "internal/external SRAM read/write circuit"; concludes with two system design examples: "traffic light controller" and "ping-pong game machine," leaving readers with a classic state machine exercise: "three-story elevator controller." These examples and exercises were created by students from the School of Information Engineering at Beijing University of Posts and Telecommunications while preparing for the Beijing Collegiate Electronic Design Contest. Practical experience has shown that these problems are very helpful for improving the development skills of beginners in CPLD/FPGA.
Chapter 4: Communication Between Microcontroller and FPGA
The core chapter of the book. The previous chapters lay the foundation for this chapter, while the later chapters interpret it (as examples). This chapter systematically elaborates on the communication between microcontroller and FPGA, categorized as follows:
① Microcontroller controls CPLD to activate corresponding functional modules;
② Microcontroller transmits command words or a small amount of data to CPLD;
③ CPLD transmits command words or a small amount of data to the microcontroller;
④ Microcontroller transmits a large amount of data to CPLD;
⑤ CPLD transmits a large amount of data to the microcontroller;
⑥ Combinations of the above scenarios.
Chapter 5: Simple Digital Frequency Counter
The topic originates from the 1997 National Collegiate Electronic Design Contest; introduces the principles of measuring frequency period, duty cycle, and pulse width; provides the design ideas, flowcharts, and source programs for the main modules.
Chapter 6: Waveform Generator
The topic originates from the 2001 National Collegiate Electronic Design Contest; introduces the principle of direct digital frequency synthesis (DDFS) and the method of using a C compiler in the PC (TurboC2.0) to assist in microcontroller system development; provides examples of the microcontroller transmitting a small amount of parameters and a large amount of data to FPGA; provides the design ideas, flowcharts, and source programs for the main modules.
Chapter 7: Simple Logic Analyzer
The topic originates from the D question of the 2003 National Collegiate Electronic Design Contest. This chapter appears in the form of a contest paper (this design is a contest entry that won the National First Prize and was nominated for the "Sony Cup"). Aspiring students participating in electronic design contests can learn from this paper how to write contest essays, and it can also serve as a valuable reference material for other electronic design enthusiasts.
Acknowledgments

📌 Related Posts