A New AVR Signal Generator for Implementing DDS

Publisher:数字驿站Latest update time:2011-09-21 Keywords:DDS Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

This is a new implementation of an AVR DDS signal generator V2.0, which has been published on scienceprog.com. Obviously, full credit to its original creators is due for the original schematic and firmware. Presented here is a different PCB, compact and single-sided with through-hole components for easy construction. The function generator has two BNC outputs: one for high speed [1 to 8 MHz] squared signal (BNC1) and another for DDS signal (BNC2). Offset and amplitude can be adjusted with two potentiometers: offset in the range of +5 V to -5 V (POT1) and amplitude in the range of 0 to 10 V (POT2). The up and down arrow buttons are used to change the type of function (sine, trig, etc.), while the left and right arrow buttons are used to change the frequency value. There is also a separate menu for changing the frequency step. When the middle button is pressed, the signal generation starts. Schematic

EAGLE schematic (only one status LED and on/off switch on the shelf)

PCB

[page]

EAGLE PCB (silk screen and bottom layer)

Parts List

power supply

For powering the function generator, a PC ATX power supply was used, with all voltages listed (+12 V, -12 V, +5 V). The wiring is shown in the image below taken from scienceprog.com.

Factory-made printed circuit boards and components

[page]

PCB production

Photo of assembled PCB

ATMEGA16 programmer programming with usbtiny

[page]
Changing the firmware

Since the orientation of the LCD characters is currently different from the original implementation (180 degrees), the following modifications were made in main.c: The left and right buttons were swapped:

#define LEFT 3 // PORTD

#define RIGHT1 // PORTD

The buttons TOP and BOTTOM are interchanged:

#define FALL 4 // PORTD

#define MAX 0 //PORTD

For recent versions of the AVR-GCC compiler, the following changes should be made (according to Jeff's comment at scienceprog.com):

Structure signal {

volatile uint8_t mode; //signal

unstable uint8_t FR1 //frequency [0..7]

volatile uint8_t FR2; //frequency [8..15]

volatile uint8_t FR3; //frequency [16..31]

volatile uint32_t frequency; //frequency value

oscillate uint8_t flag; //if 0 the generator is off, 1 is on

Volatile uint32_t ACC //Accumulator

volatile uint8_t ON;

volatile uint8_t HSfreq //High speed frequency [1 ... 4Mhz]

Volatile uint32_t deltafreq; //Frequency step value

} SG;

The ATMEGA16 fuses should be:

High = 0 × 59

LOW = 0xCF

This is interpreted as the following options being selected (all others being unchecked):

OCDEN

SPIEN

BOOTSZ1

BOOTSZ2

SUT1

SUT0

Photo equipment

[page]

Final lab setup

Keywords:DDS Reference address:A New AVR Signal Generator for Implementing DDS

Previous article:Experimental Loading Closed-Loop Control System Based on AVR Microcontroller
Next article:Application of AVR single chip microcomputer in wireless automatic target reporting system

Recommended ReadingLatest update time:2024-11-16 23:32

Engineer sharing: Power supply design for electromagnetic ultrasonic excitation based on DDS
introduction Electromagnetic ultrasound is a non-contact ultrasonic detection method that does not require any physical contact with the object being tested, does not require coupling agents, and can be applied to the detection conditions of the object being tested under high temperature, high speed, and rough surfac
[Power Management]
Engineer sharing: Power supply design for electromagnetic ultrasonic excitation based on DDS
Design and Application of Spectrum Analyzer Based on DDS
1 Introduction  Direct digital frequency synthesis (DDS) is a new type of frequency synthesis method in recent years. It has the advantages of fast frequency switching speed, high frequency resolution, and easy integration. Here, a spectrum analyzer based on DDS is designed. The spectrum analyzer is based on the het
[Test Measurement]
Design and Application of Spectrum Analyzer Based on DDS
Using DDS technology and AD8302 chip to realize the design of digital frequency characteristic tester
Traditional frequency characteristic testers are not only expensive, but also cannot obtain phase-frequency characteristics. They cannot save and print frequency characteristic diagrams, and cannot interface with computers, which brings a lot of inconvenience to users. This article uses DDS technology as the frequency
[Microcontroller]
Using DDS technology and AD8302 chip to realize the design of digital frequency characteristic tester
Handheld oscilloscope function meter based on microblaze
1. Project Overview 1.1 Introduction The oscilloscope has a history of more than 70 years since its birth in 1933. It is the main tool used by electronic circuit designers to observe waveforms, which allows designers to intuitively see the waveforms to be observed. Therefore, oscilloscopes have always played a v
[Test Measurement]
Handheld oscilloscope function meter based on microblaze
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号