Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
DS2450.h
00001 /* DS2450 specific values (see datasheet www.maxim-ic.com/datasheet/index.mvp/id/2921) */ 00002 #ifndef _DS2450_ 00003 #define _DS2450_ 00004 #define DS2450_ID 0x20 00005 #define DS2450_READ_MEMORY 0xAA 00006 #define DS2450_WRITE_MEMORY 0x55 00007 #define DS2450_CONVERT 0x3C 00008 00009 #define DS2450_SP_SIZE 13 00010 #define DS2450_PAGE0 0x00 00011 #define DS2450_PAGE1 0x08 00012 #define DS2450_PAGE2 0x10 00013 #define DS2450_PAGE3 0x18 00014 00015 #define DS2450_ADCA 0x00 //channel A 00016 #define DS2450_ADCB 0x02 //channel B 00017 #define DS2450_ADCC 0x04 //channel C 00018 #define DS2450_ADCD 0x06 //channel D 00019 00020 #define DS2450_IR_2V5 0x00 //input voltage range 2.55V 00021 #define DS2450_IR_5V1 0x01 //input voltage range 5.1V 00022 #define DS2450_AFH 0x20 //flag alarm value higher 00023 #define DS2450_AFL 0x10 //flag alarm value lower 00024 #define DS2450_AEH_ENABLE 0x08 //alarm value higher enable 00025 #define DS2450_AEL_ENABLE 0x04 //alarm value lower enable 00026 00027 #define DS2450_DISABLE_OUT 0x00 //disable ouput 00028 #define DS2450_ENABLE_OUT 0x80//enable ouput 00029 00030 #define DS2450_16_BIT 0x00 //ADC 16bits enable ouput 00031 #define DS2450_15_BIT 0x0F //ADC 15bits enable ouput 00032 #define DS2450_12_BIT 0x0C //ADC 12bits enable ouput 00033 #define DS2450_8_BIT 0x08 //ADC 8bits enable ouput 00034 #define DS2450_1_BIT 0x01 //ADC 1bits enable ouput 00035 uint8_t DS2450_read_page(uint8_t id[], uint8_t adresse, uint8_t *val); 00036 uint8_t DS2450_read_page(uint8_t n,uint8_t id[], uint8_t adresse, uint8_t *val); 00037 uint8_t DS2450_convert(uint8_t id[], uint8_t input_select_mask,uint8_t read_out_control); 00038 uint8_t DS2450_convert(uint8_t n,uint8_t id[], uint8_t input_select_mask,uint8_t read_out_control); 00039 uint8_t DS2450_read_ADC(uint8_t id[], uint16_t adc[]); 00040 uint8_t DS2450_read_ADC(uint8_t n,uint8_t id[], uint16_t adc[]); 00041 uint8_t DS2450_start_and_read_ADC(uint8_t id[], uint16_t adc[]); 00042 uint8_t DS2450_start_and_read_ADC(uint8_t n,uint8_t id[], uint16_t adc[]); 00043 uint8_t DS2450_configure_channel_ADC(uint8_t id[],uint8_t channel,uint8_t conflsb,uint8_t confmsb); 00044 uint8_t DS2450_configure_channel_ADC(uint8_t n,uint8_t id[],uint8_t channel,uint8_t conflsb,uint8_t confmsb); 00045 uint8_t DS2450_configure_page(uint8_t id[], uint8_t adresse,uint8_t configpage[]); 00046 uint8_t DS2450_configure_page(uint8_t n,uint8_t id[], uint8_t adresse,uint8_t configpage[]); 00047 #endif
Generated on Mon Jul 18 2022 20:45:44 by
1.7.2