| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

LTC6603.h
Go to the documentation of this file.
1 /*!
2 LTC6603: Dual, Matched, High Frequency Bandpass/Lowpass Filters
3
4 @verbatim
5
6 The LTC6603 is a dual, matched, programmable bandpass or lowpass filter
7 and differential driver. The selectivity of the LTC6603, combined with its
8 phase matching and dynamic range, make it ideal for filtering in RFID
9 systems. With two degree phase matching between channels, the LTC6603 can
10 be used in applications requiring highly matched filters, such as
11 transceiver I and Q channels. Gain programmability, and the fully
12 differential inputs and outputs, simplify implementation in most systems.
13
14 SPI DATA FORMAT (MSB First):
15
16 Byte #1 Byte #2
17
18 Data In : GAIN0 GAIN1 LPF0 LPF1 NOFUNC0 NOFUNC1 SHDN OUT GAIN0 GAIN1 LPF0 LPF1 NOFUNC0 NOFUNC1 SHDN OUT
19 |---- GAIN, BW CONTROL WORD FOR #2 ----| |---- GAIN, BW CONTROL WORD FOR #1 ----|
20
21 GAINx : Gain Control Bits
22 LPFx : Lowpass Cutoff Frequency Bits
23 NOFUNCx : Highpass Cutoff Frequency Bits
24 SHDN : Shutdown Bit
25 OUT : General Purpose Output Pin
26
27 @endverbatim
28
29
30 http://www.analog.com/en/products/amplifiers/adc-drivers/fully-differential-amplifiers/ltc6603.html
31
32 http://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/dc1304a-b.html
33
34
35
36 Copyright 2018(c) Analog Devices, Inc.
37
38 All rights reserved.
39
40 Redistribution and use in source and binary forms, with or without
41 modification, are permitted provided that the following conditions are met:
42 - Redistributions of source code must retain the above copyright
43 notice, this list of conditions and the following disclaimer.
44 - Redistributions in binary form must reproduce the above copyright
45 notice, this list of conditions and the following disclaimer in
46 the documentation and/or other materials provided with the
47 distribution.
48 - Neither the name of Analog Devices, Inc. nor the names of its
49 contributors may be used to endorse or promote products derived
50 from this software without specific prior written permission.
51 - The use of this software may or may not infringe the patent rights
52 of one or more patent holders. This license does not release you
53 from the requirement that you obtain separate licenses from these
54 patent holders to use this software.
55 - Use of the software either in source or binary form, must be run
56 on or directly connected to an Analog Devices Inc. component.
57
58 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
59 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
60 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
61 IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
62 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
63 LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
64 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
65 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
66 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
67 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
68
69 The views and conclusions contained in the software and documentation are those
70 of the authors and should not be interpreted as representing official policies,
71 either expressed or implied, of Linear Technology Corp.
72
73 The Linear Technology Linduino is not affiliated with the official Arduino team.
74 However, the Linduino is only possible because of the Arduino team's commitment
75 to the open-source community. Please, visit http://www.arduino.cc and
76 http://store.arduino.cc , and consider a purchase that will help fund their
77 ongoing work.
78 */
79
80 /*! @file
81 @ingroup LTC6603
82 Header for LTC6603: Dual Matched, High Frequency Bandpass/Lowpass Filters
83 */
84
85 #ifndef LTC6603_H
86 #define LTC6603_H
87
88 #include <SPI.h>
89
90 //! Define external frequency range
91 #define LTC6603_FREQ_MIN 12 //!<12 MHz
92 #define LTC6603_FREQ_MAX 80 //!<80 Mhz
93
94 //! Define the SPI CS pin
95 #ifndef LTC6603_CS
96 #define LTC6603_CS QUIKEVAL_CS
97 #endif
98
99 //! @name LTC6603 gain configuration bits.
100 //! @{
101 //! Refer to Table 1 in Data Sheet
102 #define LTC6603_GAIN_0dB 0x00
103 #define LTC6603_GAIN_6dB 0x80
104 #define LTC6603_GAIN_12dB 0x40
105 #define LTC6603_GAIN_24dB 0xC0
106 #define LTC6603_GAIN_MASK 0x3F
107 //! @}
108
109
110 //! @name LTC6603 lowpass cutoff frequency configuration bits.
111 //! @{
112 //! Refer to Table 2 and 3 for Bandwidth
113 #define LTC6603_LPF0 0x00
114 #define LTC6603_LPF1 0x20
115 #define LTC6603_LPF2 0x10
116 #define LTC6603_LPF3 0x30
117 #define LTC6603_LPF_MASK 0xCF
118 //! @}
119
120
121 //! @name LTC6603 Highpass cutoff frequency configuration bits.
122 //! @{
123 //! Refer to Table 2 and 3 for Bandwidth
124 #define LTC6603_NOFUNC0 0x00
125 #define LTC6603_NOFUNC1 0x08
126 #define LTC6603_NOFUNC2 0x04
127 #define LTC6603_NOFUNC3 0x0C
128 #define LTC6603_NOFUNC_MASK 0xF3
129 //! @}
130
131
132 //! @name LTC6603 shutdown/powerup and GPO configuration bits.
133 #define LTC6603_SHDN 0x02 //!< Shuts down LTC6603
134 #define LTC6603_PRUP 0x00 //!< Turns on LTC6603
135 #define LTC6603_ONOFF_MASK 0xFD
136 #define LTC6603_GPO_HIGH 0x01 //!< Sets the general purpose
137 #define LTC6603_GPO_LOW 0x00 //!<
138 #define LTC6603_GPO_MASK 0xFE
139
140
141 //! Sends Data to the LTC6603
142 //! @return void
143 void LTC6603_write(uint8_t cs, //!< Chip Select pin
144 uint8_t *tx, //!< Byte array to be transmitted
145 uint8_t length //!< Length of array
146 );
147
148 #endif
LTC6603_write
void LTC6603_write(uint8_t cs, uint8_t *tx, uint8_t length)
Sends Data to the LTC6603.
Definition: LTC6603.cpp:89