DC2100A  1.2.0
Bi-Directional Cell Balancer Using the LTC3300-1 and the LTC6804-2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
24AA64.h
Go to the documentation of this file.
1 /*
2  Linear Technology DC2100A Demonstration Board.
3  Reference Application File for Interface to 24AA64 EEPROM through the LTC6804-2 Battery Monitor on the DC2100A PCB.
4  All datasheet references in this file refer to Microchip Technology Inc. document 21711J.pdf.
5 
6  @verbatim
7  The Microchip Technology Inc. 24AA64/24LC64
8  (24XX64*) is a 64 Kbit Electrically Erasable PROM.
9  The device is organized as a single block of 8K x 8-bit
10  memory with a 2-wire serial interface. Low-voltage
11  design permits operation down to 1.8V, with standby
12  and active currents of only 1 uA and 1 mA,
13  respectively. It has been developed for advanced, lowpower
14  applications such as personal communications
15  or data acquisition. The 24XX64 also has a page write
16  capability for up to 32 bytes of data. Functional address
17  lines allow up to eight devices on the same bus, for up
18  to 512 Kbits address space. The 24XX64 is available in
19  the standard 8-pin PDIP, surface mount SOIC, TSSOP
20  and MSOP packages.
21  @endverbatim
22 
23  http://www.linear.com/solutions/5126
24 
25  REVISION HISTORY
26  $Revision: 542 $
27  $Date: 2014-07-31 11:57:59 -0400 (Thu, 31 Jul 2014) $
28 
29  Copyright (c) 2013, Linear Technology Corp.(LTC)
30  All rights reserved.
31 
32  Redistribution and use in source and binary forms, with or without
33  modification, are permitted provided that the following conditions are met:
34 
35  1. Redistributions of source code must retain the above copyright notice, this
36  list of conditions and the following disclaimer.
37  2. Redistributions in binary form must reproduce the above copyright notice,
38  this list of conditions and the following disclaimer in the documentation
39  and/or other materials provided with the distribution.
40 
41  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
42  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
43  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
44  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
45  ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
46  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
47  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
48  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
49  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
50  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
51 
52  The views and conclusions contained in the software and documentation are those
53  of the authors and should not be interpreted as representing official policies,
54  either expressed or implied, of Linear Technology Corp.
55 
56 */
57 
58 /*! @file
59  @ingroup EEPROM
60  Reference Application File for Interface to 24AA64 EEPROM through the LTC6804-2 Battery Monitor on the DC2100A PCB.
61 */
62 
63 #ifndef __24AA64_H__
64 #define __24AA64_H__
65 
66 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
67 // Includes
68 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
69 #include "Typedefs.h"
70 #include "DC2100A.h"
71 
72 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
73 // Definitions
74 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
75 
76 //! @name 24AA64 EEPROM Properties
77 //! @{
78 //! EEPROM capacity and page size from datasheet Description on page 1
79 #define EEPROM_24AA64_SIZE 8192 //!< Number of bytes in the EEPROM
80 #define EEPROM_24AA64_PAGE_SIZE 32 //!< Number of bytes that can be operated on at a time.
81 //! @}
82 
83 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
84 // Global Data
85 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
86 
87 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
88 // Global Prototypes
89 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
90 
91 //! Writes a series of bytes to the 24AA64 EEPROM
92 //! @return void
93 void Eeprom_24AA64_Write(int8 board_num, //!< The logical address for the PCB containing this EEPROM.
94  int16 address, //!< The address in the EEPROM.
95  int8* data_ptr, //!< Pointer to the data to write.
96  int16 num_bytes //!< The number of bytes to write.
97  );
98 
99 //! Reads a series of bytes to the 24AA64 EEPROM
100 //! @return void
101 void Eeprom_24AA64_Read(int8 board_num, //!< The logical address for the PCB containing this EEPROM.
102  int16 address, //!< The address in the EEPROM.
103  int8* data_ptr, //!< Pointer where to store the read data.
104  int16 num_bytes //!< The number of bytes to read.
105  );
106 
107 //! Erases the full contents of the 24AA64 EEPROM
108 //! @return void
109 void Eeprom_24AA64_Erase(int8 board_num //!< The logical address for the PCB containing this EEPROM.
110  );
111 
112 #endif
void Eeprom_24AA64_Erase(int8 board_num)
Erases the full contents of the 24AA64 EEPROM.
Definition: 24AA64.c:168
void Eeprom_24AA64_Write(int8 board_num, int16 address, int8 *data_ptr, int16 num_bytes)
Writes a series of bytes to the 24AA64 EEPROM.
Definition: 24AA64.c:109
void Eeprom_24AA64_Read(int8 board_num, int16 address, int8 *data_ptr, int16 num_bytes)
Reads a series of bytes to the 24AA64 EEPROM.
Definition: 24AA64.c:141