The AD9838 is a low power DDS device capable of producing high performance sine and triangular outputs. It also has an on-board comparator that allows a square wave to be produced for clock generation. Consuming only 11 mW of power at 2.3 V the AD9838 is an ideal candidate for power-sensitive applications. Capability for phase modulation and frequency modulation is provided. The frequency registers are 28 bits; with a 16 MHz clock rate, resolution of 0.06 Hz can be achieved; with a 5 MHz clock rate, the AD9838 can be tuned to 0.02 Hz resolution. Frequency and phase modulation are configured by loading registers through the serial interface and toggling the registers using software or the FSELECT pin and PSELECT pin, respectively.
The goal of this project (Microcontroller No-OS) is to be able to provide reference projects for lower end processors, which can't run Linux, or aren't running a specific operating system, to help those customers using microcontrollers with ADI parts. Here you can find a generic driver which can be used as a base for any microcontroller platform and also specific drivers for Renesas platforms.
HW Platform(s):
The driver contains two parts:
The Communication Driver has a standard interface, so the AD9838 driver can be used exactly as it is provided.
There are three functions which are called by the AD9838 driver:
SPI driver architecture
The following functions are implemented in this version of AD9838 driver:
Function | Description |
---|---|
unsigned char AD9838_Init(void)) | Initializes the SPI communication peripheral and resets the part. |
void AD9838_Reset(void) | Sets the Reset bit of the AD9838. |
void AD9838_ClearReset(void) | Clears the Reset bit of the AD9838. |
void AD9838_SetRegisterValue(unsigned short regValue) | Writes the value to a register. |
void AD9838_SetFrequency(unsigned short reg, unsigned long val) | Writes to the frequency registers. |
void AD9838_SetPhase(unsigned short reg, unsigned short val) | Writes to the phase registers. |
void AD9838_Setup(unsigned short freq, unsigned short phase, unsigned short type, unsigned short commandType) | Selects the Frequency,Phase and Waveform type. |
This section contains a description of the steps required to run the AD9838 demonstration project on a Renesas RL78G13 platform.
An EVAL-AD9838SDZ board has to be interfaced with the Renesas Demonstration Kit (RDK) for RL78G13:
EVAL-AD9838SDZ test point FSYNC → YRDKRL78G13 J11 connector Pin 1 EVAL-AD9838SDZ test point SDATA → YRDKRL78G13 J11 connector Pin 2 EVAL-AD9838SDZ test point SCLK → YRDKRL78G13 J11 connector Pin 4 EVAL-AD9838SDZ test point FSEL1 → YRDKRL78G13 J11 connector Pin 10 EVAL-AD9838SDZ J2 connector connector DGND → YRDKRL78G13 J11 connector Pin 5 EVAL-AD9838SDZ J2 connector connector DVDD → YRDKRL78G13 J11 connector Pin 6 EVAL-AD9838SDZ J3 connector connector AGND → YRDKRL78G13 J11 connector Pin 5 EVAL-AD9838SDZ J3 connector connector AVDD → YRDKRL78G13 J11 connector Pin 6
With the Applilet3 for RL78G13 tool the following peripherals have to be configured:
Choose to generate the Transmit/receive function for the CSI10 and configure the interface with the following settings:
Configure TM00 as an interval timer:
Disable the watchdog timer:
The demo program sets up the AD9838 part to output sinusoidal, triangle and square waves. The frequency and the type of wave are displayed on the LCD.
This section presents the steps for developing a software application that will run on the Renesas Demo Kit for RL78G13 for controlling and monitoring the operation of the ADI part.
Two software applications have to be used: Applilet3 for RL78G13 (a tool that automatically generates device drivers for MCU peripheral functions) and IAR Embedded Workbench for Renesas RL78 (the integrated development environment).
This section contains a description of the steps required to run the AD9838 demonstration project on a Renesas RX62N platform.
An EVAL-AD9838SDZ board has to be interfaced with the Renesas Demonstration Kit (RDK) for RX62N:
EVAL-AD9838SDZ test point SDATA → YRDKRX62N J8 connector Pin 19 EVAL-AD9838SDZ test point SCLK → YRDKRX62N J8 connector Pin 20 EVAL-AD9838SDZ test point FSYNC → YRDKRX62N J8 connector Pin 15 EVAL-AD9838SDZ test point FSEL1 → YRDKRX62N JN1 connector Pin 17 EVAL-AD9838SDZ J3 connector Pin AVDD → YRDKRX62N J8 connector Pin 3 EVAL-AD9838SDZ J2 connector Pin DVDD → YRDKRX62N J8 connector Pin 3 EVAL-AD9838SDZ J3 connector Pin AGND → YRDKRX62N J8 connector Pin 4 EVAL-AD9838SDZ J2 connector Pin DGND → YRDKRX62N J8 connector Pin 4
The demo program sets up the AD9833 part to output sinusoidal, triangle and square waves. The frequency and the type of wave are displayed on the LCD.
This section presents the steps for developing a software application that will run on the Renesas Demo Kit for RX62N for controlling and monitoring the operation of the ADI part.
.
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
全部0条评论
快来发表一下你的评论吧 !