Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

# ad6620.h

Go to the documentation of this file.

    00001 /*! \file ad6620.h \brief Analog Devices AD6620 Digital Receiver Driver. */
    00002 //*****************************************************************************
    00003 //
    00004 // File Name    : 'ad6620.h'
    00005 // Title        : Analog Devices AD6620 Digital Receiver Driver
    00006 // Author       : Pascal Stang - Copyright (C) 2004
    00007 // Created      : 2004.07.08
    00008 // Revised      : 2004.07.12
    00009 // Version      : 0.1
    00010 // Target MCU   : ARM processors
    00011 // Editor Tabs  : 4
    00012 //
    00013 // NOTE: This code is currently below version 1.0, and therefore is considered
    00014 // to be lacking in some functionality or documentation, or may not be fully
    00015 // tested.  Nonetheless, you can expect most functions to work.
    00016 //
    00017 // This code is distributed under the GNU Public License
    00018 //      which can be found at http://www.gnu.org/licenses/gpl.txt
    00019 //
    00020 //*****************************************************************************
    00021
    00022 #ifndef AD6620_H
    00023 #define AD6620_H
    00024
    00025 #include "global.h"
    00026
    00027 // defines
    00028
    00029 // hardware
    00030 #define AD6620_REFCLK_FREQ      50000000l
    00031 /*#define AD6620_IO_UPDATE      P04
    00032 #define AD6620_RESET            P05
    00033 */
    00034
    00035 // base address
    00036 #define AD6620_REG_BASE         0x81000200
    00037
    00038 // external interface registers
    00039 #define AD6620_REG_DR0          0x00
    00040 #define AD6620_REG_DR1          0x01
    00041 #define AD6620_REG_DR2          0x02
    00042 #define AD6620_REG_DR3          0x03
    00043 #define AD6620_REG_DR4          0x04
    00044 #define AD6620_REG_LAR          0x06
    00045 #define AD6620_REG_AMR          0x07
    00046
    00047 // internal registers and RAM
    00048 #define AD6620_REG_RCF_COEFF    0x000
    00049 #define AD6620_REG_RCF_DATA     0x100
    00050 #define AD6620_REG_MODE_CTRL    0x300
    00051 #define AD6620_REG_NCO_CTRL     0x301
    00052 #define AD6620_REG_NCO_SYNC     0x302
    00053 #define AD6620_REG_NCO_FREQ     0x303
    00054 #define AD6620_REG_NCO_PHASE    0x304
    00055
    00056 #define AD6620_REG_CIC2_SCALE   0x305
    00057 #define AD6620_REG_CIC2_DECIM   0x306
    00058
    00059 #define AD6620_REG_CIC5_SCALE   0x307
    00060 #define AD6620_REG_CIC5_DECIM   0x308
    00061
    00062 #define AD6620_REG_RCF_CTRL     0x309
    00063 #define AD6620_REG_RCF_DECIM    0x30A
    00064 #define AD6620_REG_RCFADDR_OFS  0x30B
    00065 #define AD6620_REG_RCF_TAPS     0x30C
    00066
    00067 #define AD6620_REG_RESERVED     0x30D
    00068
    00069 // register values
    00070 #define AD6620_NCO_BYPASS       0x01
    00071 #define AD6620_NCO_PHASE_DITHER 0x02
    00072 #define AD6620_NCO_AMPL_DITHER  0x04
    00073
    00074 void ad6620Init(void);
    00075
    00076 u32 ad6620ReadReg(u16 reg);
    00077 void ad6620WriteReg(u16 reg, u32 data);
    00078 void ad6620SetNCOMode(u08 mode);
    00079 void ad6620SetNCOFreq(u32 freqHz);
    00080 void ad6620SetNCOPhase(u16 phase);
    00081 void ad6620LoadRCFilter(int start, int taps, s32* coeffs);
    00082
    00083 void ad6620ShowRegisters(void);
    00084
    00085
    00086 #endif