| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

support_functions_LTC2984.h
Go to the documentation of this file.
1 /*!
2 LTC2984: Multi-Sensor High Accuracy Digital Temperature Measurement System.
3 @verbatim
4
5 support_functions_LTC2984.h:
6 This file contains all the support function prototypes used in the main program.
7 @endverbatim
8
9 http://www.linear.com/product/LTC2984
10
11 http://www.linear.com/product/LTC2984#demoboards
12
13
14 Copyright 2018(c) Analog Devices, Inc.
15
16 All rights reserved.
17
18 Redistribution and use in source and binary forms, with or without
19 modification, are permitted provided that the following conditions are met:
20 - Redistributions of source code must retain the above copyright
21 notice, this list of conditions and the following disclaimer.
22 - Redistributions in binary form must reproduce the above copyright
23 notice, this list of conditions and the following disclaimer in
24 the documentation and/or other materials provided with the
25 distribution.
26 - Neither the name of Analog Devices, Inc. nor the names of its
27 contributors may be used to endorse or promote products derived
28 from this software without specific prior written permission.
29 - The use of this software may or may not infringe the patent rights
30 of one or more patent holders. This license does not release you
31 from the requirement that you obtain separate licenses from these
32 patent holders to use this software.
33 - Use of the software either in source or binary form, must be run
34 on or directly connected to an Analog Devices Inc. component.
35
36 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
37 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
38 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
39 IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
40 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
41 LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
42 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
43 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
44 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
45 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
46 */
47
48
49
50 /*! @file
51 @ingroup LTC2984
52 Header for LTC2984: Multi-Sensor High Accuracy Digital Temperature Measurement System
53 */
54
55
56
57 void print_title();
58 void assign_channel(uint8_t chip_select, uint8_t channel_number, uint32_t channel_assignment_data);
59 void write_custom_table(uint8_t chip_select, struct table_coeffs coefficients[64], uint16_t start_address, uint8_t table_length);
60 void write_custom_steinhart_hart(uint8_t chip_select, uint32_t steinhart_hart_coeffs[6], uint16_t start_address);
61
62 void measure_channel(uint8_t chip_select, uint8_t channel_number, uint8_t channel_output);
63 void convert_channel(uint8_t chip_select, uint8_t channel_number);
64 void wait_for_process_to_finish(uint8_t chip_select);
65
66 void get_result(uint8_t chip_select, uint8_t channel_number, uint8_t channel_output);
67 void print_conversion_result(uint32_t raw_conversion_result, uint8_t channel_output);
68 void read_voltage_or_resistance_results(uint8_t chip_select, uint8_t channel_number);
69 void print_fault_data(uint8_t fault_byte);
70
71
72 void eeprom_transfer(uint8_t chip_select, uint8_t read_or_write);
73
74
75 uint32_t transfer_four_bytes(uint8_t chip_select, uint8_t read_or_write, uint16_t start_address, uint32_t input_data);
76 uint8_t transfer_byte(uint8_t chip_select, uint8_t read_or_write, uint16_t start_address, uint8_t input_data);
77
78 uint16_t get_start_address(uint16_t base_address, uint8_t channel_number);
79 bool is_number_in_array(uint8_t number, uint8_t *array, uint8_t array_length);
transfer_byte
uint8_t transfer_byte(uint8_t chip_select, uint8_t read_or_write, uint16_t start_address, uint8_t input_data)
Definition: support_functions_LTC2983.cpp:308
assign_channel
void assign_channel(uint8_t chip_select, uint8_t channel_number, uint32_t channel_assignment_data)
Definition: support_functions_LTC2983.cpp:90
print_conversion_result
void print_conversion_result(uint32_t raw_conversion_result, uint8_t channel_output)
Definition: support_functions_LTC2983.cpp:211
is_number_in_array
bool is_number_in_array(uint8_t number, uint8_t *array, uint8_t array_length)
Definition: support_functions_LTC2983.cpp:330
print_title
void print_title()
Prints the title block when program first starts.
Definition: support_functions_LTC2983.cpp:75
eeprom_transfer
void eeprom_transfer(uint8_t chip_select, uint8_t read_or_write)
Definition: support_functions_LTC2984.cpp:149
table_coeffs
LTC2983: Multi-Sensor High Accuracy Digital Temperature Measurement System.
Definition: table_coeffs_LTC2983.h:51
print_fault_data
void print_fault_data(uint8_t fault_byte)
Definition: support_functions_LTC2983.cpp:251
get_start_address
uint16_t get_start_address(uint16_t base_address, uint8_t channel_number)
Definition: support_functions_LTC2983.cpp:324
transfer_four_bytes
uint32_t transfer_four_bytes(uint8_t chip_select, uint8_t read_or_write, uint16_t start_address, uint32_t input_data)
Definition: support_functions_LTC2983.cpp:284
write_custom_table
void write_custom_table(uint8_t chip_select, struct table_coeffs coefficients[64], uint16_t start_address, uint8_t table_length)
Definition: support_functions_LTC2983.cpp:97
get_result
void get_result(uint8_t chip_select, uint8_t channel_number, uint8_t channel_output)
Definition: support_functions_LTC2983.cpp:183
measure_channel
void measure_channel(uint8_t chip_select, uint8_t channel_number, uint8_t channel_output)
Definition: support_functions_LTC2983.cpp:152
read_voltage_or_resistance_results
void read_voltage_or_resistance_results(uint8_t chip_select, uint8_t channel_number)
Definition: support_functions_LTC2983.cpp:237
wait_for_process_to_finish
void wait_for_process_to_finish(uint8_t chip_select)
Definition: support_functions_LTC2983.cpp:168
write_custom_steinhart_hart
void write_custom_steinhart_hart(uint8_t chip_select, uint32_t steinhart_hart_coeffs[6], uint16_t start_address)
Definition: support_functions_LTC2983.cpp:124
convert_channel
void convert_channel(uint8_t chip_select, uint8_t channel_number)
Definition: support_functions_LTC2983.cpp:159