| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

LTC6602.h
Go to the documentation of this file.
1 /*!
2 LTC6602: Dual, Matched, High Frequency Bandpass/Lowpass Filters
3
4 @verbatim
5
6 The LTC6602 is a dual, matched, programmable bandpass or lowpass filter
7 and differential driver. The selectivity of the LTC6602, 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 LTC6602 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 HPF0 HPF1 SHDN OUT GAIN0 GAIN1 LPF0 LPF1 HPF0 HPF1 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 HPFx : Highpass Cutoff Frequency Bits
24 SHDN : Shutdown Bit
25 OUT : General Purpose Output Pin
26
27 @endverbatim
28
29 http://www.linear.com/product/LTC6602
30
31 http://www.linear.com/product/LTC6602#demoboards
32
33
34 Copyright 2018(c) Analog Devices, Inc.
35
36 All rights reserved.
37
38 Redistribution and use in source and binary forms, with or without
39 modification, are permitted provided that the following conditions are met:
40 - Redistributions of source code must retain the above copyright
41 notice, this list of conditions and the following disclaimer.
42 - Redistributions in binary form must reproduce the above copyright
43 notice, this list of conditions and the following disclaimer in
44 the documentation and/or other materials provided with the
45 distribution.
46 - Neither the name of Analog Devices, Inc. nor the names of its
47 contributors may be used to endorse or promote products derived
48 from this software without specific prior written permission.
49 - The use of this software may or may not infringe the patent rights
50 of one or more patent holders. This license does not release you
51 from the requirement that you obtain separate licenses from these
52 patent holders to use this software.
53 - Use of the software either in source or binary form, must be run
54 on or directly connected to an Analog Devices Inc. component.
55
56 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
57 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
58 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
59 IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
60 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
61 LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
62 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
63 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
64 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
65 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
66 */
67
68 /*! @file
69 @ingroup LTC6602
70 Header for LTC6602: Dual Matched, High Frequency Bandpass/Lowpass Filters
71 */
72
73 #ifndef LTC6602_H
74 #define LTC6602_H
75
76 #include <SPI.h>
77
78 //! Define the SPI CS pin
79 #ifndef LTC6602_CS
80 #define LTC6602_CS QUIKEVAL_CS
81 #endif
82
83 //! @name LTC6602 gain configuration bits.
84 //! @{
85 //! Refer to Table 1 in Data Sheet
86 #define LTC6602_GAIN_0dB 0x00
87 #define LTC6602_GAIN_12dB 0x80
88 #define LTC6602_GAIN_24dB 0x40
89 #define LTC6602_GAIN_30dB 0xC0
90 #define LTC6602_GAIN_MASK 0x3F
91 //! @}
92
93
94 //! @name LTC6602 lowpass cutoff frequency configuration bits.
95 //! @{
96 //! Refer to Table 2 and 3 for Bandwidth
97 #define LTC6602_LPF0 0x00
98 #define LTC6602_LPF1 0x20
99 #define LTC6602_LPF2 0x10
100 #define LTC6602_LPF3 0x30
101 #define LTC6602_LPF_MASK 0xCF
102 //! @}
103
104
105 //! @name LTC6602 Highpass cutoff frequency configuration bits.
106 //! @{
107 //! Refer to Table 2 and 3 for Bandwidth
108 #define LTC6602_HPF0 0x00
109 #define LTC6602_HPF1 0x08
110 #define LTC6602_HPF2 0x04
111 #define LTC6602_HPF3 0x0C
112 #define LTC6602_HPF_MASK 0xF3
113 //! @}
114
115
116 //! @name LTC6602 shutdown/powerup and GPO configuration bits.
117 #define LTC6602_SHDN 0x02 //!< Shuts down LTC6602
118 #define LTC6602_PRUP 0x00 //!< Turns on LTC6602
119 #define LTC6602_ONOFF_MASK 0xFD
120 #define LTC6602_GPO_HIGH 0x01 //!< Sets the general purpose
121 #define LTC6602_GPO_LOW 0x00 //!<
122 #define LTC6602_GPO_MASK 0xFE
123
124
125 //! Sends Data to the LTC6602
126 //! @return void
127 void LTC6602_write(uint8_t cs, //!< Chip Select pin
128 uint8_t *tx, //!< Byte array to be transmitted
129 uint8_t length //!< Length of array
130 );
131
132 #endif // LTC6602_H
LTC6602_write
void LTC6602_write(uint8_t cs, uint8_t *tx, uint8_t length)
Sends Data to the LTC6602.
Definition: LTC6602.cpp:72