Problem with comparison.
/Modules/Sensors/SHT25V01A/SW/PIC16F887/SHT25.c
0,0 → 1,91
void SHT25_soft_reset()
{
i2c_start(); // Start condition
i2c_write(0x80); // Device address
i2c_write(0xFE); // Device command
i2c_stop(); // Stop condition
}
 
unsigned int8 SHT25_setup(unsigned int8 setup_reg ) // writes to status register and returns its value
{
unsigned int8 reg;
 
i2c_start(); // Start condition
i2c_write(SHT25_ADDR); // Device address
i2c_write(0xE7); // Device command
 
i2c_start(); // Start condition
i2c_write(SHT25_ADDR+1); // Device address
reg=i2c_read(0); // Read status actual status register
 
reg = (reg & 0x3A) | setup_reg;
 
i2c_start(); // Start condition
i2c_write(SHT25_ADDR); // Device address
i2c_write(0xE6); // Write to status register
i2c_write(reg); // Device command
i2c_stop(); // Stop condition
 
delay_ms(10);
 
i2c_start(); // Start condition
i2c_write(SHT25_ADDR); // Device address
i2c_write(0xE7); // Device command
 
i2c_start(); // Start condition
i2c_write(SHT25_ADDR+1); // Device address
reg=i2c_read(0); // Read status actual status register
 
return (reg);
}
 
 
float SHT25_get_temp()
{
unsigned int8 MSB, LSB, Check;
unsigned int16 data;
 
i2c_start();
I2C_Write(SHT25_ADDR);
I2C_write(0xE3);
i2c_stop();
delay_ms(100);
i2c_start();
I2C_Write(SHT25_ADDR+1);
MSB=i2c_read(1);
LSB=i2c_read(1);
Check=i2c_read(0);
i2c_stop();
LSB = LSB >> 2; // trow out status bits
 
data = (((unsigned int16) MSB << 8) + (LSB << 4));
return(-46.85 + 175.72*((float)data/0xFFFF));
}
 
float SHT25_get_hum()
{
unsigned int8 MSB, LSB, Check;
unsigned int16 data;
 
i2c_start(); //RH
I2C_Write(SHT25_ADDR);
I2C_write(0xE5);
 
delay_ms(100);
 
i2c_start();
I2C_Write(SHT25_ADDR+1);
MSB=i2c_read(1);
LSB=i2c_read(1);
Check=i2c_read(0);
i2c_stop();
 
LSB = LSB >> 2; // trow out status bits
 
data = (((unsigned int16) MSB << 8) + (LSB << 4) );
return( -6.0 + 125.0*((float)data/0xFFFF));
}
 
/Modules/Sensors/SHT25V01A/SW/PIC16F887/SHT25.h
0,0 → 1,13
 
#define SHT25_HEATER_ON 0x04
#define SHT25_HEATER_OFF 0x00
#define SHT25_OTP_reload_off 0x02
#define SHT25_RH12_T14 0x00
#define SHT25_RH8_T12 0x01
#define SHT25_RH10_T13 0x80
#define SHT25_RH11_T11 0x81
 
#define SHT25_ADDR 0x80
 
#include "SHT25.c"
 
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.bak
0,0 → 1,39
#include "main.h"
#include "SHT25.h"
 
 
void main()
{
unsigned int8 i=0, sht_config;
 
setup_adc_ports(NO_ANALOGS|VSS_VDD);
setup_adc(ADC_CLOCK_DIV_2);
setup_spi(SPI_SS_DISABLED);
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_ccp1(CCP_OFF);
setup_comparator(NC_NC_NC_NC);
 
SHT25_soft_reset();
printf("SHT25 humidity and temperature sensor example \r\n",);
delay_ms (500);
 
while(TRUE)
{
if (i<10) sht_config = SHT25_RH12_T14 | SHT25_HEATER_OFF; // loop alters on chip heater on and off to check correct function
else
{
sht_config = SHT25_RH12_T14 | SHT25_HEATER_ON;
if (i > 20) i = 0;
}
printf("setup: %X %X \r\n",SHT25_setup(sht_config),sht_config);
delay_ms (500);
printf("Temp: %f \r\n",SHT25_get_temp());
delay_ms (500);
printf("Hum: %f \r\n",SHT25_get_hum());
delay_ms (1000);
i++;
}
}
 
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.c
0,0 → 1,42
/*
SHT25 sensor demo firmware
*/
 
#include "main.h"
#include "SHT25.h"
 
void main()
{
unsigned int8 i=0, sht_config;
 
setup_adc_ports(NO_ANALOGS|VSS_VDD);
setup_adc(ADC_CLOCK_DIV_2);
setup_spi(SPI_SS_DISABLED);
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_ccp1(CCP_OFF);
setup_comparator(NC_NC_NC_NC);
 
SHT25_soft_reset();
printf("SHT25 humidity and temperature sensor example \r\n",);
delay_ms (500);
 
while(TRUE)
{
if (i<10) sht_config = SHT25_RH12_T14 | SHT25_HEATER_OFF; // loop alters on chip heater on and off to check correct function
else
{
sht_config = SHT25_RH12_T14 | SHT25_HEATER_ON;
if (i > 20) i = 0;
}
printf("setup: %X %X \r\n",SHT25_setup(sht_config),sht_config);
delay_ms (500);
printf("Temp: %f \r\n",SHT25_get_temp());
delay_ms (500);
printf("Hum: %f \r\n",SHT25_get_hum());
delay_ms (1000);
i++;
}
}
 
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.cof
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.err
0,0 → 1,2
Memory usage: ROM=29% RAM=3% - 10%
0 Errors, 0 Warnings.
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.esym
0,0 → 1,457
D G "__PCM__" 0 44 ""4.106""
D G "__DEVICE__" 0 44 "887"
D G "__DATE__" 0 44 ""14-IV-13""
D G "__TIME__" 0 44 ""13:00:06"" "SHT25 sensor demo firmware"
d G "PIN_A0" 2 20 "40"
d G "PIN_A1" 2 21 "41"
d G "PIN_A2" 2 22 "42"
d G "PIN_A3" 2 23 "43"
d G "PIN_A4" 2 24 "44"
d G "PIN_A5" 2 25 "45"
d G "PIN_A6" 2 26 "46"
d G "PIN_A7" 2 27 "47"
d G "PIN_B0" 2 29 "48"
d G "PIN_B1" 2 30 "49"
d G "PIN_B2" 2 31 "50"
d G "PIN_B3" 2 32 "51"
d G "PIN_B4" 2 33 "52"
d G "PIN_B5" 2 34 "53"
d G "PIN_B6" 2 35 "54"
d G "PIN_B7" 2 36 "55"
d G "PIN_C0" 2 38 "56"
d G "PIN_C1" 2 39 "57"
d G "PIN_C2" 2 40 "58"
d G "PIN_C3" 2 41 "59"
d G "PIN_C4" 2 42 "60"
d G "PIN_C5" 2 43 "61"
d G "PIN_C6" 2 44 "62"
d G "PIN_C7" 2 45 "63"
d G "PIN_D0" 2 47 "64"
d G "PIN_D1" 2 48 "65"
d G "PIN_D2" 2 49 "66"
d G "PIN_D3" 2 50 "67"
d G "PIN_D4" 2 51 "68"
d G "PIN_D5" 2 52 "69"
d G "PIN_D6" 2 53 "70"
d G "PIN_D7" 2 54 "71"
d G "PIN_E0" 2 56 "72"
d G "PIN_E1" 2 57 "73"
d G "PIN_E2" 2 58 "74"
d G "PIN_E3" 2 59 "75"
d G "FALSE" 2 62 "0"
d G "TRUE" 2 63 "1"
d G "BYTE" 2 65 "int8"
d G "BOOLEAN" 2 66 "int1"
d G "getc" 2 68 "getch"
d G "fgetc" 2 69 "getch"
d G "getchar" 2 70 "getch"
d G "putc" 2 71 "putchar"
d G "fputc" 2 72 "putchar"
d G "fgets" 2 73 "gets"
d G "fputs" 2 74 "puts"
d G "WDT_FROM_SLEEP" 2 79 "3"
d G "WDT_TIMEOUT" 2 80 "11"
d G "MCLR_FROM_SLEEP" 2 81 "19"
d G "MCLR_FROM_RUN" 2 82 "27"
d G "NORMAL_POWER_UP" 2 83 "25"
d G "BROWNOUT_RESTART" 2 84 "26"
d G "T0_INTERNAL" 2 91 "0"
d G "T0_EXT_L_TO_H" 2 92 "32"
d G "T0_EXT_H_TO_L" 2 93 "48"
d G "T0_DIV_1" 2 95 "8"
d G "T0_DIV_2" 2 96 "0"
d G "T0_DIV_4" 2 97 "1"
d G "T0_DIV_8" 2 98 "2"
d G "T0_DIV_16" 2 99 "3"
d G "T0_DIV_32" 2 100 "4"
d G "T0_DIV_64" 2 101 "5"
d G "T0_DIV_128" 2 102 "6"
d G "T0_DIV_256" 2 103 "7"
d G "T0_8_BIT" 2 106 "0"
d G "RTCC_INTERNAL" 2 108 "0" "The following are provided for compatibility"
d G "RTCC_EXT_L_TO_H" 2 109 "32" "with older compiler versions"
d G "RTCC_EXT_H_TO_L" 2 110 "48"
d G "RTCC_DIV_1" 2 111 "8"
d G "RTCC_DIV_2" 2 112 "0"
d G "RTCC_DIV_4" 2 113 "1"
d G "RTCC_DIV_8" 2 114 "2"
d G "RTCC_DIV_16" 2 115 "3"
d G "RTCC_DIV_32" 2 116 "4"
d G "RTCC_DIV_64" 2 117 "5"
d G "RTCC_DIV_128" 2 118 "6"
d G "RTCC_DIV_256" 2 119 "7"
d G "RTCC_8_BIT" 2 120 "0"
d G "WDT_18MS" 2 132 "8"
d G "WDT_36MS" 2 133 "9"
d G "WDT_72MS" 2 134 "10"
d G "WDT_144MS" 2 135 "11"
d G "WDT_288MS" 2 136 "12"
d G "WDT_576MS" 2 137 "13"
d G "WDT_1152MS" 2 138 "14"
d G "WDT_2304MS" 2 139 "15"
d G "WDT_ON" 2 143 "0x4100"
d G "WDT_OFF" 2 144 "0"
d G "WDT_DIV_16" 2 145 "0x100"
d G "WDT_DIV_8" 2 146 "0x300"
d G "WDT_DIV_4" 2 147 "0x500"
d G "WDT_DIV_2" 2 148 "0x700"
d G "WDT_TIMES_1" 2 149 "0x900" "Default"
d G "WDT_TIMES_2" 2 150 "0xB00"
d G "WDT_TIMES_4" 2 151 "0xD00"
d G "WDT_TIMES_8" 2 152 "0xF00"
d G "WDT_TIMES_16" 2 153 "0x1100"
d G "WDT_TIMES_32" 2 154 "0x1300"
d G "WDT_TIMES_64" 2 155 "0x1500"
d G "WDT_TIMES_128" 2 156 "0x1700"
d G "T1_DISABLED" 2 162 "0"
d G "T1_INTERNAL" 2 163 "5"
d G "T1_EXTERNAL" 2 164 "7"
d G "T1_EXTERNAL_SYNC" 2 165 "3"
d G "T1_CLK_OUT" 2 167 "8"
d G "T1_DIV_BY_1" 2 169 "0"
d G "T1_DIV_BY_2" 2 170 "0x10"
d G "T1_DIV_BY_4" 2 171 "0x20"
d G "T1_DIV_BY_8" 2 172 "0x30"
d G "T1_GATE" 2 174 "0x40"
d G "T1_GATE_INVERTED" 2 175 "0xC0"
d G "T2_DISABLED" 2 180 "0"
d G "T2_DIV_BY_1" 2 181 "4"
d G "T2_DIV_BY_4" 2 182 "5"
d G "T2_DIV_BY_16" 2 183 "6"
d G "CCP_OFF" 2 189 "0"
d G "CCP_CAPTURE_FE" 2 190 "4"
d G "CCP_CAPTURE_RE" 2 191 "5"
d G "CCP_CAPTURE_DIV_4" 2 192 "6"
d G "CCP_CAPTURE_DIV_16" 2 193 "7"
d G "CCP_COMPARE_SET_ON_MATCH" 2 194 "8"
d G "CCP_COMPARE_CLR_ON_MATCH" 2 195 "9"
d G "CCP_COMPARE_INT" 2 196 "0xA"
d G "CCP_COMPARE_RESET_TIMER" 2 197 "0xB"
d G "CCP_PWM" 2 198 "0xC"
d G "CCP_PWM_PLUS_1" 2 199 "0x1c"
d G "CCP_PWM_PLUS_2" 2 200 "0x2c"
d G "CCP_PWM_PLUS_3" 2 201 "0x3c"
d G "CCP_PWM_H_H" 2 206 "0x0c"
d G "CCP_PWM_H_L" 2 207 "0x0d"
d G "CCP_PWM_L_H" 2 208 "0x0e"
d G "CCP_PWM_L_L" 2 209 "0x0f"
d G "CCP_PWM_FULL_BRIDGE" 2 211 "0x40"
d G "CCP_PWM_FULL_BRIDGE_REV" 2 212 "0xC0"
d G "CCP_PWM_HALF_BRIDGE" 2 213 "0x80"
d G "CCP_SHUTDOWN_ON_COMP1" 2 215 "0x100000"
d G "CCP_SHUTDOWN_ON_COMP2" 2 216 "0x200000"
d G "CCP_SHUTDOWN_ON_COMP" 2 217 "0x300000"
d G "CCP_SHUTDOWN_ON_INT0" 2 218 "0x400000"
d G "CCP_SHUTDOWN_ON_COMP1_INT0" 2 219 "0x500000"
d G "CCP_SHUTDOWN_ON_COMP2_INT0" 2 220 "0x600000"
d G "CCP_SHUTDOWN_ON_COMP_INT0" 2 221 "0x700000"
d G "CCP_SHUTDOWN_AC_L" 2 223 "0x000000"
d G "CCP_SHUTDOWN_AC_H" 2 224 "0x040000"
d G "CCP_SHUTDOWN_AC_F" 2 225 "0x080000"
d G "CCP_SHUTDOWN_BD_L" 2 227 "0x000000"
d G "CCP_SHUTDOWN_BD_H" 2 228 "0x010000"
d G "CCP_SHUTDOWN_BD_F" 2 229 "0x020000"
d G "CCP_SHUTDOWN_RESTART" 2 231 "0x80000000"
d G "CCP_PULSE_STEERING_A" 2 233 "0x01000000"
d G "CCP_PULSE_STEERING_B" 2 234 "0x02000000"
d G "CCP_PULSE_STEERING_C" 2 235 "0x04000000"
d G "CCP_PULSE_STEERING_D" 2 236 "0x08000000"
d G "CCP_PULSE_STEERING_SYNC" 2 237 "0x10000000"
d G "SPI_MASTER" 2 245 "0x20"
d G "SPI_SLAVE" 2 246 "0x24"
d G "SPI_L_TO_H" 2 247 "0"
d G "SPI_H_TO_L" 2 248 "0x10"
d G "SPI_CLK_DIV_4" 2 249 "0"
d G "SPI_CLK_DIV_16" 2 250 "1"
d G "SPI_CLK_DIV_64" 2 251 "2"
d G "SPI_CLK_T2" 2 252 "3"
d G "SPI_SS_DISABLED" 2 253 "1"
d G "SPI_SAMPLE_AT_END" 2 255 "0x8000"
d G "SPI_XMIT_L_TO_H" 2 256 "0x4000"
d G "UART_ADDRESS" 2 262 "2"
d G "UART_DATA" 2 263 "4"
d G "UART_AUTODETECT" 2 264 "8"
d G "UART_AUTODETECT_NOWAIT" 2 265 "9"
d G "UART_WAKEUP_ON_RDA" 2 266 "10"
d G "UART_SEND_BREAK" 2 267 "13"
d G "NC_NC_NC_NC" 2 273 "0x00"
d G "NC_NC" 2 274 "0x00"
d G "CP1_A0_A3" 2 277 "0x00090080"
d G "CP1_A1_A3" 2 278 "0x000A0081"
d G "CP1_B3_A3" 2 279 "0x00880082"
d G "CP1_B1_A3" 2 280 "0x00280083"
d G "CP1_A0_VREF" 2 281 "0x00010084"
d G "CP1_A1_VREF" 2 282 "0x00020085"
d G "CP1_B3_VREF" 2 283 "0x00800086"
d G "CP1_B1_VREF" 2 284 "0x00200087"
d G "CP1_OUT_ON_A4" 2 286 "0x00000020"
d G "CP1_INVERT" 2 287 "0x00000010"
d G "CP1_ABSOLUTE_VREF" 2 288 "0x20000000"
d G "CP2_A0_A2" 2 291 "0x00058000"
d G "CP2_A1_A2" 2 292 "0x00068100"
d G "CP2_B3_A2" 2 293 "0x00848200"
d G "CP2_B1_A2" 2 294 "0x00248300"
d G "CP2_A0_VREF" 2 295 "0x00018400"
d G "CP2_A1_VREF" 2 296 "0x00028500"
d G "CP2_B3_VREF" 2 297 "0x00808600"
d G "CP2_B1_VREF" 2 298 "0x00208700"
d G "CP2_OUT_ON_A5" 2 300 "0x00002000"
d G "CP2_INVERT" 2 301 "0x00001000"
d G "CP2_ABSOLUTE_VREF" 2 302 "0x10000000"
d G "CP2_T1_SYNC" 2 305 "0x01000000"
d G "CP2_T1_GATE" 2 306 "0x02000000"
d G "VREF_LOW" 2 315 "0xa0"
d G "VREF_HIGH" 2 316 "0x80"
d G "OSC_31KHZ" 2 322 "1"
d G "OSC_125KHZ" 2 323 "0x11"
d G "OSC_250KHZ" 2 324 "0x21"
d G "OSC_500KHZ" 2 325 "0x31"
d G "OSC_1MHZ" 2 326 "0x41"
d G "OSC_2MHZ" 2 327 "0x51"
d G "OSC_4MHZ" 2 328 "0x61"
d G "OSC_8MHZ" 2 329 "0x71"
d G "OSC_INTRC" 2 330 "1"
d G "OSC_NORMAL" 2 331 "0"
d G "OSC_STATE_STABLE" 2 333 "4"
d G "OSC_31KHZ_STABLE" 2 334 "2"
d G "ADC_OFF" 2 342 "0" "ADC Off"
d G "ADC_CLOCK_DIV_2" 2 343 "0x100"
d G "ADC_CLOCK_DIV_8" 2 344 "0x40"
d G "ADC_CLOCK_DIV_32" 2 345 "0x80"
d G "ADC_CLOCK_INTERNAL" 2 346 "0xc0" "Internal 2-6us"
d G "sAN0" 2 350 "1" "| A0"
d G "sAN1" 2 351 "2" "| A1"
d G "sAN2" 2 352 "4" "| A2"
d G "sAN3" 2 353 "8" "| A3"
d G "sAN4" 2 354 "16" "| A5"
d G "sAN5" 2 355 "32" "| E0"
d G "sAN6" 2 356 "64" "| E1"
d G "sAN7" 2 357 "128" "| E2"
d G "sAN8" 2 358 "0x10000" "| B2"
d G "sAN9" 2 359 "0x20000" "| B3"
d G "sAN10" 2 360 "0x40000" "| B1"
d G "sAN11" 2 361 "0x80000" "| B4"
d G "sAN12" 2 362 "0x100000" "| B0"
d G "sAN13" 2 363 "0x200000" "| B5"
d G "NO_ANALOGS" 2 364 "0" "None"
d G "ALL_ANALOG" 2 365 "0x1F00FF" "A0 A1 A2 A3 A5 E0 E1 E2 B0 B1 B2 B3 B4 B5"
d G "VSS_VDD" 2 368 "0x0000" "| Range 0-Vdd"
d G "VSS_VREF" 2 369 "0x1000" "| Range 0-Vref"
d G "VREF_VREF" 2 370 "0x3000" "| Range Vref-Vref"
d G "VREF_VDD" 2 371 "0x2000" "| Range Vref-Vdd"
d G "ADC_START_AND_READ" 2 375 "7" "This is the default if nothing is specified"
d G "ADC_START_ONLY" 2 376 "1"
d G "ADC_READ_ONLY" 2 377 "6"
d G "L_TO_H" 2 389 "0x40"
d G "H_TO_L" 2 390 "0"
d G "GLOBAL" 2 392 "0x0BC0"
d G "INT_RTCC" 2 393 "0x000B20"
d G "INT_RB" 2 394 "0x01FF0B08"
d G "INT_EXT_L2H" 2 395 "0x50000B10"
d G "INT_EXT_H2L" 2 396 "0x60000B10"
d G "INT_EXT" 2 397 "0x000B10"
d G "INT_AD" 2 398 "0x008C40"
d G "INT_TBE" 2 399 "0x008C10"
d G "INT_RDA" 2 400 "0x008C20"
d G "INT_TIMER1" 2 401 "0x008C01"
d G "INT_TIMER2" 2 402 "0x008C02"
d G "INT_CCP1" 2 403 "0x008C04"
d G "INT_CCP2" 2 404 "0x008D01"
d G "INT_SSP" 2 405 "0x008C08"
d G "INT_BUSCOL" 2 406 "0x008D08"
d G "INT_EEPROM" 2 407 "0x008D10"
d G "INT_TIMER0" 2 408 "0x000B20"
d G "INT_OSC_FAIL" 2 409 "0x008D80"
d G "INT_COMP" 2 410 "0x008D20"
d G "INT_COMP2" 2 411 "0x008D40"
d G "INT_ULPWU" 2 412 "0x008D04"
d G "INT_RB0" 2 413 "0x0010B08"
d G "INT_RB1" 2 414 "0x0020B08"
d G "INT_RB2" 2 415 "0x0040B08"
d G "INT_RB3" 2 416 "0x0080B08"
d G "INT_RB4" 2 417 "0x0100B08"
d G "INT_RB5" 2 418 "0x0200B08"
d G "INT_RB6" 2 419 "0x0400B08"
d G "INT_RB7" 2 420 "0x0800B08"
D G "SHT25_HEATER_ON" 3 2 "0x04"
D G "SHT25_HEATER_OFF" 3 3 "0x00"
D G "SHT25_OTP_reload_off" 3 4 "0x02"
D G "SHT25_RH12_T14" 3 5 "0x00"
D G "SHT25_RH8_T12" 3 6 "0x01"
D G "SHT25_RH10_T13" 3 7 "0x80"
D G "SHT25_RH11_T11" 3 8 "0x81"
D G "SHT25_ADDR" 3 10 "0x80"
F G "SHT25_soft_reset" 4 1 "void()"
C L "SHT25_soft_reset" 4 3 1 "FUNCTION"
C L "SHT25_soft_reset" 4 3 1 "FUNCTION"
C L "SHT25_soft_reset" 4 3 1 "FUNCTION"
C L "SHT25_soft_reset" 4 3 1 "FUNCTION"
F G "SHT25_setup" 4 9 "int8(int8 setup_reg)"
V L "setup_reg" 4 9 "int8" "writes to status register and returns its value"
V L "reg" 4 11 "int8"
C L "SHT25_setup" 4 3 1 "FUNCTION"
C L "SHT25_setup" 4 3 1 "FUNCTION"
C L "SHT25_setup" 4 3 1 "FUNCTION"
C L "SHT25_setup" 4 3 1 "FUNCTION"
C L "SHT25_setup" 4 3 1 "FUNCTION"
C L "SHT25_setup" 4 3 1 "FUNCTION"
C L "SHT25_setup" 4 3 1 "FUNCTION"
C L "SHT25_setup" 4 3 1 "FUNCTION"
C L "SHT25_setup" 4 3 1 "FUNCTION"
C L "SHT25_setup" 4 3 1 "FUNCTION"
C L "SHT25_setup" 4 3 1 "FUNCTION"
C L "SHT25_setup" 4 3 1 "FUNCTION"
C L "SHT25_setup" 4 3 1 "FUNCTION"
C L "SHT25_setup" 4 3 1 "FUNCTION"
C L "SHT25_setup" 4 3 1 "FUNCTION"
C L "SHT25_setup" 4 3 1 "FUNCTION"
C L "SHT25_setup" 4 3 1 "FUNCTION"
F G "SHT25_get_temp" 4 43 "float()"
V L "MSB" 4 45 "int8"
V L "LSB" 4 45 "int8"
V L "Check" 4 45 "int8"
V L "data" 4 46 "int16"
C L "SHT25_get_temp" 4 3 1 "FUNCTION"
F G "SHT25_get_hum" 4 68 "float()"
V L "MSB" 4 70 "int8"
V L "LSB" 4 70 "int8"
V L "Check" 4 70 "int8"
V L "data" 4 71 "int16"
C L "SHT25_get_hum" 4 3 1 "FUNCTION"
C L "SHT25_get_hum" 4 3 1 "FUNCTION"
F G "MAIN" 0 8 "void()"
V L "i" 0 10 "int8"
V L "sht_config" 0 10 "int8"
C L "MAIN" 0 27 1 "FUNCTION"
F B "reset_cpu" 0 0
F B "abs" 1 0
F B "sleep_ulpwu" 1 0
F B "sleep" 0 0
F B "delay_cycles" 1 0
F B "read_bank" 2 0
F B "write_bank" 3 0
F B "shift_left" 2 2
F B "shift_right" 2 2
F B "rotate_left" 2 0
F B "rotate_right" 2 0
F B "_mul" 2 0
F B "memset" 3 0
F B "isamoung" 2 0
F B "isamong" 2 0
F B "bit_set" 2 0
F B "bit_clear" 2 0
F B "bit_test" 2 0
F B "toupper" 1 0
F B "tolower" 1 0
F B "swap" 1 0
F B "printf" 1 255
F B "fprintf" 1 255
F B "sprintf" 1 255
F B "make8" 2 0
F B "make16" 2 0
F B "make32" 1 255
F B "label_address" 1 1
F B "goto_address" 1 0
F B "_va_arg" 1 0
F B "offsetofbit" 2 2
F B "enable_interrupts" 1 0
F B "disable_interrupts" 1 0
F B "interrupt_active" 1 0
F B "clear_interrupt" 1 0
F B "jump_to_isr" 1 0
F B "ext_int_edge" 1 2
F B "read_eeprom" 1 0
F B "write_eeprom" 2 0
F B "read_program_eeprom" 1 0
F B "write_program_eeprom" 2 0
F B "write_program_memory" 4 0
F B "write_program_memory8" 4 0
F B "read_program_memory" 4 0
F B "read_program_memory8" 4 0
F B "erase_program_eeprom" 1 0
F B "strcpy" 2 0
F B "memcpy" 3 0
F B "strstr100" 2 0
F B "output_high" 1 0
F B "output_low" 1 0
F B "input" 1 0
F B "input_state" 1 0
F B "output_float" 1 0
F B "output_drive" 1 0
F B "output_bit" 1 1
F B "output_toggle" 1 0
F B "output_a" 1 0
F B "output_b" 1 0
F B "output_c" 1 0
F B "output_d" 1 0
F B "output_e" 1 0
F B "input_a" 0 0
F B "input_b" 0 0
F B "input_c" 0 0
F B "input_d" 0 0
F B "input_e" 0 0
F B "set_tris_a" 1 0
F B "set_tris_b" 1 0
F B "set_tris_c" 1 0
F B "set_tris_d" 1 0
F B "set_tris_e" 1 0
F B "get_tris_a" 0 0
F B "get_tris_b" 0 0
F B "get_tris_c" 0 0
F B "get_tris_d" 0 0
F B "get_tris_e" 0 0
F B "input_change_a" 0 0
F B "input_change_b" 0 0
F B "input_change_c" 0 0
F B "input_change_d" 0 0
F B "input_change_e" 0 0
F B "port_b_pullups" 1 0
F B "setup_counters" 2 0
F B "setup_wdt" 1 0
F B "restart_cause" 0 0
F B "restart_wdt" 0 0
F B "get_rtcc" 0 0
F B "set_rtcc" 1 0
F B "get_timer0" 0 0
F B "set_timer0" 1 0
F B "setup_comparator" 1 0
F B "setup_port_a" 1 0
F B "setup_adc_ports" 1 0
F B "setup_adc" 1 0
F B "set_adc_channel" 1 0
F B "read_adc" 0 1
F B "adc_done" 0 0
F B "setup_timer_0" 1 0
F B "setup_vref" 1 0
F B "setup_timer_1" 1 0
F B "get_timer1" 0 0
F B "set_timer1" 1 0
F B "setup_timer_2" 3 0
F B "get_timer2" 0 0
F B "set_timer2" 1 0
F B "setup_ccp1" 1 2
F B "set_pwm1_duty" 1 0
F B "setup_ccp2" 1 0
F B "set_pwm2_duty" 1 0
F B "setup_oscillator" 1 2
F B "setup_spi" 1 0
F B "spi_read" 0 1
F B "spi_write" 1 0
F B "spi_data_is_in" 0 0
F B "setup_spi2" 1 0
F B "spi_read2" 0 1
F B "spi_write2" 1 0
F B "spi_data_is_in2" 0 0
F B "brownout_enable" 1 0
F B "delay_ms" 1 0
F B "delay_us" 1 0
F B "i2c_read" 0 2
F B "i2c_write" 1 2
F B "i2c_start" 0 2
F B "i2c_stop" 0 1
F B "i2c_isr_state" 0 1
F B "putchar" 1 2
F B "puts" 1 2
F B "getch" 0 1
F B "gets" 1 3
F B "kbhit" 0 1
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.hex
0,0 → 1,301
:1000000008308A0000280000532454193510E83ABB
:10001000ED34E434F43CA0306E32203AE536F03270
:10002000F230F43AF232A0396537F3377210653C9A
:10003000E136703665100D050000F332F43A701D9C
:10004000A0125810252CA0060A00D4326D383A10A0
:100050002533A0060A00C83A6D1DA01266100D05D2
:1000600000000830F80000008711A0112008831656
:10007000870000008312A80D0712031C45282016D4
:10008000200883168700492883122012200883162F
:10009000870000008312A0152008831687008312B2
:1000A000871D5028F80B332800008711A011200865
:1000B000831687000000831220162008831687000D
:1000C000000000008312A015200883168700831209
:1000D000871D6828F8010000071A78148711A011FD
:1000E0002008831687008312071220122008831627
:1000F000870083120800201620088316870000005E
:100100008312A015200883168700000083120712AF
:100110002012200883168700000083128711A01187
:1001200020088316870080308312A8003120FE301B
:10013000A8003120201220088316870000008312B7
:10014000A0152008831687008312871DA5280000AC
:10015000A9280000201620088316870000008312BB
:100160008A150A12662883168613831286130830AE
:10017000F800BA280000F817CB28F813B40C0318BD
:100180008617031C86137817CB287813F80BBE2824
:10019000C928000086173F308400840BCD2800005A
:1001A000F81BBD28781BC5280800831603178C1779
:1001B0000C140000000083120C087F390319192960
:1001C0000313A30003170D080313A40003170F085C
:1001D0000313A5002308B400B320240803178D00DF
:1001E0000313250803178F0083168C170C140000C7
:1001F000000083120C0D0E0D7F390319192903130A
:10020000A30003170D080313A40003170F0803131B
:10021000A5002308B400B320240803178D0003139E
:10022000250803178F008D0A03198F0A0313D52899
:10023000031703138A150A126F28283084008313CA
:100240000008031930290230F800F701F70B2629BE
:10025000F80B25299730F700F70B2C29800B232961
:1002600008000830A9007708AA0020162008831685
:10027000870000008312A0152008831687008312D0
:10028000871D4029071A0314071E0310F80D0000EC
:10029000A01120088316870083128711A90B352926
:1002A00020162008831687000000831207122A08F0
:1002B00003195F292012200883168700831200008B
:1002C000A0152008831687008312871D652900006A
:1002D0008711A011200883168700000083120712DF
:1002E0002012200883168700831208002016200899
:1002F0008316870000008312A0152008831687004C
:1003000000008312071220122008831687000000C5
:1003100083128711A0112008831687008030831272
:10032000A8003120E730A8003120201620088316CD
:10033000870000008312A0152008831687000000A4
:100340008312871DA1290712201220088316870017
:10035000000083128711A0112008831687008130C6
:100360008312A8003120F70131217808A400240865
:100370003A392304A40020162008831687000000C1
:100380008312A01520088316870000008312871DA2
:10039000C729071220122008831687000000831245
:1003A0008711A01120088316870080308312A800CF
:1003B0003120E630A80031202408A8003120201286
:1003C00020088316870000008312A01520088316DA
:1003D00087008312871DEA290000EE2900002016FD
:1003E00020088316870000000A308312A8001D2110
:1003F000201620088316870000008312A01520080D
:10040000831687000000831207122012200883162B
:100410008700000083128711A0112008831687002F
:1004200080308312A8003120E730A8003120201648
:1004300020088316870000008312A0152008831669
:10044000870000008312871D232A0712201220082C
:1004500083168700000083128711A01120088316DD
:10046000870081308312A8003120F70131217808FC
:10047000A4002408F8008A150A1289288316031795
:100480008C170C140000000003186D2A83120C084E
:100490007F390313A80003170D080313A9000317DE
:1004A0000F080313AA002808B400B3202908031773
:1004B0008D0003132A0803178F0083168C170C1462
:1004C0000000000083120313A70B672A6A2A831611
:1004D00003176D2A8C2A8316031783120C0D0E0D39
:1004E0007F390313A80003170D080313A90003178E
:1004F0000F080313AA002808B400B3202908031723
:100500008D0003132A0803178F008D0A03198F0A21
:1005100003100313A70B3E2A0800A51B9F2A0F30C8
:10052000F700240EF7050A30770203189A2A3030B4
:10053000F7079C2A2508F7077708B400B3200F3087
:10054000A4050A3024020318A72A3030A92AA513CB
:100550002508A4072408B400B32008008E30F70053
:100560002908F8002808F900FA01F808031DC22A32
:100570007908F800F9010830F702F808031DC22ACB
:10058000F701CA2A0310F81BC92AF90DF80DF70361
:10059000C22AF81308002C080319902BB800300861
:1005A0000319902BB802031CDA2A7F30B80703180E
:1005B000902BE02A8130B802031C902B0319902B5A
:1005C0003808F700F801F901FA01B7012D08B60063
:1005D000B6172E08B5002F08B4001930B80033083C
:1005E000B4020318032B0130B5020318032BB60223
:1005F0000318032BB7020318032BB70AB60AB50A70
:100600003308B407352B3208B50203181E2B01300E
:10061000B60203181E2BB70203181E2BB70AB60A20
:100620003208B5073308B407031C352BB50A031D80
:10063000352BB60A031D352BB70A352B3108803808
:10064000B6020318342B0130B7020318342BB70A53
:1006500031088038B6073208B507031C122BB60ADA
:10066000031D122BB70A122B7A14B80B382B432B0D
:100670000310B40DB50DB60DB70D0310FA0DF90D3D
:10068000F80DB90DEF2A391C4B2B0310F80CF90C9F
:10069000FA0CB90C4E2BF7030319902BB91B772BCF
:1006A0000310B40DB50DB60DB70D3308B402031821
:1006B000632B0130B5020318632BB6020318632BBA
:1006C000B702031C862B3208B50203186E2B0130CB
:1006D000B60203186E2BB702031C862B3108803834
:1006E000B6020318772B0130B702031C862BFA0AD7
:1006F000031D862BF90A031D862BF80A031D862B82
:10070000F70A0319902BF80CF90CFA0C2D08B80015
:100710003108B806B81F8E2BF817942BF813942BBA
:10072000F701F801F901FA01080034080319052C52
:10073000BC0038080319052CBC070318A62B7F3012
:10074000BC02031C052C0319052CAA2B8130BC0705
:100750000318052C3C08F700F801F901FA013508E7
:10076000C000C0173608BF003708BE001830BC00F4
:10077000BD013E1CD32B3B08FA07031CC52BF90A0D
:10078000031DC52BF80A0319BD173A08F907031C06
:10079000CC2BF80A0319BD173908B600B61736086E
:1007A000F8070318BD17BD0DF80CF90CFA0CC00CB6
:1007B000BF0CBE0C0310BC0BB82B0130F70703189D
:1007C000052CF81BEA2BC00DFA0DF90DF80DF703F7
:1007D0000319052CC01FFB2BFA0A031DFB2BF90A7A
:1007E000031DFB2BF80A031DFB2BF80CF90CFA0C6C
:1007F000F70A0319052C3508BD003908BD06BD1FD1
:10080000032CF817092CF813092CF701F801F9014A
:10081000FA01080080308318AD06B201B30129083F
:10082000B1002D08B10628080319FA2CB000F70012
:100830002C080319032DB00203199F2C031C5D2CF7
:100840002D08B600B6172E08B5002F08B400B30166
:100850000310B60CB50CB40CB30CB00B272CB11FA5
:10086000342C3214172D3210301032162B308400F5
:1008700083132C2D3212B11B472C301C522CB60C7A
:10088000B50CB40CB30CF70A0319122D522CB61B7D
:10089000552C0310B30DB40DB50DB60DF7030319A8
:1008A000122D472C3217BF2C32132908B100B11F6B
:1008B0005B2CB6170B2DB6130B2D2C08B000F700D0
:1008C0002808B0022908B600B6172A08B5002B0878
:1008D000B400B3010310B60CB50CB40CB30CB00BE0
:1008E000692CB11F762CB214172DB2103010B2162D
:1008F0002F30840083132C2DB212B11B892C301C95
:10090000942CB60CB50CB40CB30CF70A0319122DC9
:10091000942CB61B972C0310B30DB40DB50DB60D6A
:10092000F7030319122D892CB217BF2CB2132D080F
:10093000B100B11F9D2CB6170B2DB6130B2D2D0832
:10094000B600B6172E08B5002F08B400B11FAC2CA6
:10095000B6133215172D3211B30130102B3084002D
:1009600083132C2DB11BD52C2908B100301CBF2CB2
:10097000B60CB50CB40CB30CF70A0319122DB31F47
:10098000D02CB40A031DD02CB50A031DD02CB60AF6
:10099000031DD02CB60CB50CB40CF70A0319122D9C
:1009A000321B542CB21B962CF42C8030B606B61F8A
:1009B000DD2C172D2D08B100EA2C2908B100B6084E
:1009C000031DEA2CB508031DEA2CB408031DEA2C0C
:1009D000F7010B2DB61BF42C0310B30DB40DB50DA0
:1009E000B60DF70BEA2C122DB11FF82CB6170B2DF4
:1009F000B6130B2D2C08F7002D08B6002E08B500F5
:100A00002F08B4000B2D2808F7002908B6002A0883
:100A1000B5002B08B4003608F8003508F900340892
:100A2000FA004A2DF701F801F901FA014A2DB30144
:100A3000B409B509B609B309B30A031D252DB40AD3
:100A4000031D252DB50A0319B60A3218332CB21826
:100A5000752C3219AB2CDA2C0008B407031C362D88
:100A6000B50A031D362DB60A031930148403000895
:100A7000B507031C3E2DB60A031930148403000881
:100A8000801F803AB60703183014321A3A2CB21A73
:100A90007C2CB22C0800201620088316870000004A
:100AA0008312A01520088316870000008312871D7B
:100AB000572D07122012200883168700000083128A
:100AC0008711A01120088316870080308312A800A8
:100AD0003120E330A800312020122008831687003F
:100AE00000008312A0152008831687008312871D3B
:100AF000772D00007B2D000020162008831687002C
:100B0000000064308312A8001D21201620088316DF
:100B1000870000008312A0152008831687000000BC
:100B20008312071220122008831687000000831208
:100B30008711A01120088316870081308312A80036
:100B400031200130F70031217808A3000130F7008F
:100B500031217808A400F70131217808A50020127E
:100B600020088316870000008312A0152008831632
:100B700087008312871DBA2D0000BE2D00002016AD
:100B800020088316870000008312A40CA40C3F30B9
:100B9000A405A9012308A800A900A801240EF700B4
:100BA000F030F70577082807A6002908A7000318E2
:100BB000A70A2708A9002608A800AE227708A800DF
:100BC0007808A9007908AA007A08AB00AF00790874
:100BD000AE007808AD007708AC00B301FF30B2007A
:100BE0007F30B1008E30B000CB225230B700B83029
:100BF000B6002F30B5008630B4007A08BB00790803
:100C0000BA007808B9007708B800952383106630D9
:100C1000AB00AA00BB30A9008430A8007A08AF005E
:100C20007908AE007808AD007708AC000A248A1570
:100C30000A12C528F701F801F901FA01BC01BD014A
:100C4000BE01BF013B083A04390438040319582E89
:100C50002030C0000310B40DB50DB60DB70DBC0D9E
:100C6000BD0DBE0DBF0D3B083F02031D412E3A08CE
:100C70003E02031D412E39083D02031D412E380856
:100C80003C02031C522E3808BC023908031C390FE1
:100C9000BD023A08031C3A0FBE023B08031C3B0F7F
:100CA000BF020314F70DF80DF90DFA0DC00B2A2E33
:100CB0003C308400831308000408AC002B08AE000D
:100CC00003197B2E2A08B7002908B6002808B500AA
:100CD0002708B400BB01BA012030B9008230B80047
:100CE00095237A08AA007908A9007808A80077084F
:100CF000A700AE0B622E2A08B7002908B600280804
:100D0000B5002708B4003408B63CB400FA01350831
:100D1000B800B5170310B50CB60CB70CFA0CF90CEB
:100D2000F80CF70CB40B8A2EB81FA12EF709F8099E
:100D3000F909FA09F70A0319F80A0319F90A031954
:100D4000FA0A7A08AA007908A9007808A8007708A2
:100D5000A700AA1FB82EAC03AC16A709A809A909B9
:100D6000AA09A70A0319A80A0319A90A0319AA0AB2
:100D70003B30B3009A30B200CA30B100B0010A3043
:100D8000AE002B080319AC0A2A08B7002908B600E0
:100D90002808B5002708B4003308BB003208BA00A1
:100DA0003108B9003008B8001A260008A700840AE4
:100DB0000008A800840A0008A900840A0008AA0004
:100DC000FD308407F708031DF82E2B0A2E020319A5
:100DD000F82E2C080319FA2E0F392E020319F22EC1
:100DE00003182A2FAC1B2A2F2C1BFA2E2030262F5B
:100DF0002030AC05AC1E082FAC122B08031DAC0331
:100E00007708AC002D30B400B3202C08F700AC01FB
:100E10002B082E02031D162F7708AC002E30B400CD
:100E2000B3202C08F7002030AC0500303030AC1E69
:100E3000262FAC122B08031DAC037708AC002D3015
:100E4000B400B3202C08F700AC013030F707770866
:100E5000B400B3203308B7003208B6003108B5003B
:100E60003008B400BB01BA01B9010A30B8001A2633
:100E70007A08B3007908B2007808B1007708B000AA
:100E8000AE0BC42E08002016200883168700000031
:100E90008312A01520088316870000008312071212
:100EA0002012200883168700000083128711A011EA
:100EB00020088316870080308312A8003120E53097
:100EC000A80031206430A8001D21201620088316B8
:100ED000870000008312A0152008831687000000F9
:100EE0008312871D712F0712201220088316870096
:100EF000000083128711A01120088316870081301B
:100F00008312A80031200130F70031217808A300B6
:100F10000130F70031217808A400F7013121780869
:100F2000A500201220088316870000008312A01558
:100F30002008831687008312871D9C2F0000A02F96
:100F40000000201620088316870000008312A40CDE
:100F5000A40C3F30A405A9012308A800A900A801FA
:100F6000240EF700F030F70577082807A6002908B7
:100F7000A7000318A70A2708A9002608A800AE2280
:100F80007708A8007808A9007908AA007A08AB00B9
:100F9000AF007908AE007808AD007708AC00B30167
:100FA000FF30B2007F30B1008E30B000CB22B701ED
:100FB000B6017A30B5008530B4007A08BB007908F4
:100FC000BA007808B9007708B80095238310AB0100
:100FD000AA01C030A9008130A8007A08AF007908C2
:100FE000AE007808AD007708AC000A248A150A1212
:020FF0000329D3
:10100000840183131F308305713083168F000F080E
:10101000861383128617831603170908C0398900BF
:1010200003131F129F1200300317880083128701D9
:1010300088018901FF300313A000A1018316031763
:101040000908C039890003131F129F1200300317CB
:101050008800831203131F139F1383169F13831299
:101060001F149412A01220088316870083122016E2
:101070002008831687008312A0112008831687009A
:101080000130831294000030831694000108C739A0
:1010900008388100831290010030F800920000307F
:1010A000831692008312201520088316870083126E
:1010B000970183169B019C0101309D008312031749
:1010C0008701880189018A1103137B288A1504305E
:1010D00003178D0000308F008A110313D5288A155D
:1010E0000230A300FA30A8008A111D218A15A30B33
:1010F00072282108093C031C7F28A201852804309E
:10110000A2002108143C031CA1012208A3008A119B
:1011100076298A157808A3001D3003178D0000304A
:101120008F00031007300313A7008A113E228A158F
:101130002308A4003730A5008A118D228A1520309B
:10114000B4008A11B3208A152208A4003730A50004
:101150008A118D228A152030B4008A11B3208A1595
:101160000D30B4008A11B3208A150A30B4008A11F8
:10117000B3208A150230A300FA30A8008A111D217D
:101180008A15A30BBC288A114B2D8A157708A3005A
:101190007808A4007908A5007A08A600253003176E
:1011A0008D0000308F00031006300313A7008A1152
:1011B0003E228A15893084002608AA002508A90045
:1011C0002408A8002308A7000230AB008A115C267F
:1011D0008A152030B4008A11B3208A150D30B4006E
:1011E0008A11B3208A150A30B4008A11B3208A15F7
:1011F0000230A300FA30A8008A111D218A15A30B22
:10120000FA288A11432F8A157708A3007808A400CA
:101210007908A5007A08A6002B3003178D0000304E
:101220008F00031005300313A7008A113E228A1590
:10123000893084002608AA002508A9002408A800EF
:101240002308A7000230AB008A115C268A152030E3
:10125000B4008A11B3208A150D30B4008A11B3206E
:101260008A150A30B4008A11B3208A150430A3000D
:10127000FA30A8008A111D218A15A30B3829A10A6A
:041280007928630066
:04400E00F42CFF3F50
:00000001FF
;PIC16F887
;CRC=7EA8 CREATED="14-IV-13 13:00"
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.lst
0,0 → 1,1367
CCS PCM C Compiler, Version 4.106, 47914 14-IV-13 13:00
 
Filename: D:\MLAB\Modules\Sensors\SHT25V01A\SW\PIC16F887\main.lst
 
ROM used: 2363 words (29%)
Largest free fragment is 2048
RAM used: 12 (3%) at main() level
38 (10%) worst case
Stack: 2 locations
 
*
0000: MOVLW 08
0001: MOVWF 0A
0002: GOTO 000
0003: NOP
.................... /*
.................... SHT25 sensor demo firmware
.................... */
....................
.................... #include "main.h"
.................... #include <16F887.h>
.................... //////// Standard Header file for the PIC16F887 device ////////////////
.................... #device PIC16F887
.................... #list
....................
.................... #device adc=8
....................
.................... #FUSES NOWDT //No Watch Dog Timer
.................... #FUSES INTRC_IO //Internal RC Osc
.................... #FUSES NOPUT //No Power Up Timer
.................... #FUSES MCLR //Master Clear pin enabled
.................... #FUSES NOPROTECT //Code not protected from reading
.................... #FUSES NOCPD //No EE protection
.................... #FUSES NOBROWNOUT //No brownout reset
.................... #FUSES IESO //Internal External Switch Over mode enabled
.................... #FUSES FCMEN //Fail-safe clock monitor enabled
.................... #FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
.................... #FUSES NODEBUG //No Debug mode for ICD
.................... #FUSES NOWRT //Program memory not write protected
.................... #FUSES BORV40 //Brownout reset at 4.0V
....................
.................... #use delay(clock=8000000)
*
011D: MOVLW 28
011E: MOVWF 04
011F: BCF 03.7
0120: MOVF 00,W
0121: BTFSC 03.2
0122: GOTO 130
0123: MOVLW 02
0124: MOVWF 78
0125: CLRF 77
0126: DECFSZ 77,F
0127: GOTO 126
0128: DECFSZ 78,F
0129: GOTO 125
012A: MOVLW 97
012B: MOVWF 77
012C: DECFSZ 77,F
012D: GOTO 12C
012E: DECFSZ 00,F
012F: GOTO 123
0130: RETURN
....................
.................... #use i2c(master, sda=PIN_C4, scl=PIN_C3)
*
0031: MOVLW 08
0032: MOVWF 78
0033: NOP
0034: BCF 07.3
0035: BCF 20.3
0036: MOVF 20,W
0037: BSF 03.5
0038: MOVWF 07
0039: NOP
003A: BCF 03.5
003B: RLF 28,F
003C: BCF 07.4
003D: BTFSS 03.0
003E: GOTO 045
003F: BSF 20.4
0040: MOVF 20,W
0041: BSF 03.5
0042: MOVWF 07
0043: GOTO 049
0044: BCF 03.5
0045: BCF 20.4
0046: MOVF 20,W
0047: BSF 03.5
0048: MOVWF 07
0049: NOP
004A: BCF 03.5
004B: BSF 20.3
004C: MOVF 20,W
004D: BSF 03.5
004E: MOVWF 07
004F: BCF 03.5
0050: BTFSS 07.3
0051: GOTO 050
0052: DECFSZ 78,F
0053: GOTO 033
0054: NOP
0055: BCF 07.3
0056: BCF 20.3
0057: MOVF 20,W
0058: BSF 03.5
0059: MOVWF 07
005A: NOP
005B: BCF 03.5
005C: BSF 20.4
005D: MOVF 20,W
005E: BSF 03.5
005F: MOVWF 07
0060: NOP
0061: NOP
0062: BCF 03.5
0063: BSF 20.3
0064: MOVF 20,W
0065: BSF 03.5
0066: MOVWF 07
0067: BCF 03.5
0068: BTFSS 07.3
0069: GOTO 068
006A: CLRF 78
006B: NOP
006C: BTFSC 07.4
006D: BSF 78.0
006E: BCF 07.3
006F: BCF 20.3
0070: MOVF 20,W
0071: BSF 03.5
0072: MOVWF 07
0073: BCF 03.5
0074: BCF 07.4
0075: BCF 20.4
0076: MOVF 20,W
0077: BSF 03.5
0078: MOVWF 07
0079: BCF 03.5
007A: RETURN
*
0131: MOVLW 08
0132: MOVWF 29
0133: MOVF 77,W
0134: MOVWF 2A
0135: BSF 20.4
0136: MOVF 20,W
0137: BSF 03.5
0138: MOVWF 07
0139: NOP
013A: BCF 03.5
013B: BSF 20.3
013C: MOVF 20,W
013D: BSF 03.5
013E: MOVWF 07
013F: BCF 03.5
0140: BTFSS 07.3
0141: GOTO 140
0142: BTFSC 07.4
0143: BSF 03.0
0144: BTFSS 07.4
0145: BCF 03.0
0146: RLF 78,F
0147: NOP
0148: BCF 20.3
0149: MOVF 20,W
014A: BSF 03.5
014B: MOVWF 07
014C: BCF 03.5
014D: BCF 07.3
014E: DECFSZ 29,F
014F: GOTO 135
0150: BSF 20.4
0151: MOVF 20,W
0152: BSF 03.5
0153: MOVWF 07
0154: NOP
0155: BCF 03.5
0156: BCF 07.4
0157: MOVF 2A,W
0158: BTFSC 03.2
0159: GOTO 15F
015A: BCF 20.4
015B: MOVF 20,W
015C: BSF 03.5
015D: MOVWF 07
015E: BCF 03.5
015F: NOP
0160: BSF 20.3
0161: MOVF 20,W
0162: BSF 03.5
0163: MOVWF 07
0164: BCF 03.5
0165: BTFSS 07.3
0166: GOTO 165
0167: NOP
0168: BCF 07.3
0169: BCF 20.3
016A: MOVF 20,W
016B: BSF 03.5
016C: MOVWF 07
016D: NOP
016E: BCF 03.5
016F: BCF 07.4
0170: BCF 20.4
0171: MOVF 20,W
0172: BSF 03.5
0173: MOVWF 07
0174: BCF 03.5
0175: RETURN
.................... #use rs232(baud=9600,parity=N,xmit=PIN_B7,rcv=PIN_B6,bits=8) //rcv TXD xmit RXD
*
00B3: BSF 03.5
00B4: BCF 06.7
00B5: BCF 03.5
00B6: BCF 06.7
00B7: MOVLW 08
00B8: MOVWF 78
00B9: GOTO 0BA
00BA: NOP
00BB: BSF 78.7
00BC: GOTO 0CB
00BD: BCF 78.7
00BE: RRF 34,F
00BF: BTFSC 03.0
00C0: BSF 06.7
00C1: BTFSS 03.0
00C2: BCF 06.7
00C3: BSF 78.6
00C4: GOTO 0CB
00C5: BCF 78.6
00C6: DECFSZ 78,F
00C7: GOTO 0BE
00C8: GOTO 0C9
00C9: NOP
00CA: BSF 06.7
00CB: MOVLW 3F
00CC: MOVWF 04
00CD: DECFSZ 04,F
00CE: GOTO 0CD
00CF: NOP
00D0: BTFSC 78.7
00D1: GOTO 0BD
00D2: BTFSC 78.6
00D3: GOTO 0C5
00D4: RETURN
....................
....................
.................... #include "SHT25.h"
....................
.................... #define SHT25_HEATER_ON 0x04
.................... #define SHT25_HEATER_OFF 0x00
.................... #define SHT25_OTP_reload_off 0x02
.................... #define SHT25_RH12_T14 0x00
.................... #define SHT25_RH8_T12 0x01
.................... #define SHT25_RH10_T13 0x80
.................... #define SHT25_RH11_T11 0x81
....................
.................... #define SHT25_ADDR 0x80
....................
.................... #include "SHT25.c"
.................... void SHT25_soft_reset()
.................... {
.................... i2c_start(); // Start condition
*
007B: BSF 20.4
007C: MOVF 20,W
007D: BSF 03.5
007E: MOVWF 07
007F: NOP
0080: BCF 03.5
0081: BSF 20.3
0082: MOVF 20,W
0083: BSF 03.5
0084: MOVWF 07
0085: NOP
0086: BCF 03.5
0087: BCF 07.4
0088: BCF 20.4
0089: MOVF 20,W
008A: BSF 03.5
008B: MOVWF 07
008C: NOP
008D: BCF 03.5
008E: BCF 07.3
008F: BCF 20.3
0090: MOVF 20,W
0091: BSF 03.5
0092: MOVWF 07
.................... i2c_write(0x80); // Device address
0093: MOVLW 80
0094: BCF 03.5
0095: MOVWF 28
0096: CALL 031
.................... i2c_write(0xFE); // Device command
0097: MOVLW FE
0098: MOVWF 28
0099: CALL 031
.................... i2c_stop(); // Stop condition
009A: BCF 20.4
009B: MOVF 20,W
009C: BSF 03.5
009D: MOVWF 07
009E: NOP
009F: BCF 03.5
00A0: BSF 20.3
00A1: MOVF 20,W
00A2: BSF 03.5
00A3: MOVWF 07
00A4: BCF 03.5
00A5: BTFSS 07.3
00A6: GOTO 0A5
00A7: NOP
00A8: GOTO 0A9
00A9: NOP
00AA: BSF 20.4
00AB: MOVF 20,W
00AC: BSF 03.5
00AD: MOVWF 07
00AE: NOP
.................... }
00AF: BCF 03.5
00B0: BSF 0A.3
00B1: BCF 0A.4
00B2: GOTO 066 (RETURN)
....................
.................... unsigned int8 SHT25_setup(unsigned int8 setup_reg ) // writes to status register and returns its value
.................... {
.................... unsigned int8 reg;
....................
.................... i2c_start(); // Start condition
*
0176: BSF 20.4
0177: MOVF 20,W
0178: BSF 03.5
0179: MOVWF 07
017A: NOP
017B: BCF 03.5
017C: BSF 20.3
017D: MOVF 20,W
017E: BSF 03.5
017F: MOVWF 07
0180: NOP
0181: BCF 03.5
0182: BCF 07.4
0183: BCF 20.4
0184: MOVF 20,W
0185: BSF 03.5
0186: MOVWF 07
0187: NOP
0188: BCF 03.5
0189: BCF 07.3
018A: BCF 20.3
018B: MOVF 20,W
018C: BSF 03.5
018D: MOVWF 07
.................... i2c_write(SHT25_ADDR); // Device address
018E: MOVLW 80
018F: BCF 03.5
0190: MOVWF 28
0191: CALL 031
.................... i2c_write(0xE7); // Device command
0192: MOVLW E7
0193: MOVWF 28
0194: CALL 031
....................
.................... i2c_start(); // Start condition
0195: BSF 20.4
0196: MOVF 20,W
0197: BSF 03.5
0198: MOVWF 07
0199: NOP
019A: BCF 03.5
019B: BSF 20.3
019C: MOVF 20,W
019D: BSF 03.5
019E: MOVWF 07
019F: NOP
01A0: BCF 03.5
01A1: BTFSS 07.3
01A2: GOTO 1A1
01A3: BCF 07.4
01A4: BCF 20.4
01A5: MOVF 20,W
01A6: BSF 03.5
01A7: MOVWF 07
01A8: NOP
01A9: BCF 03.5
01AA: BCF 07.3
01AB: BCF 20.3
01AC: MOVF 20,W
01AD: BSF 03.5
01AE: MOVWF 07
.................... i2c_write(SHT25_ADDR+1); // Device address
01AF: MOVLW 81
01B0: BCF 03.5
01B1: MOVWF 28
01B2: CALL 031
.................... reg=i2c_read(0); // Read status actual status register
01B3: CLRF 77
01B4: CALL 131
01B5: MOVF 78,W
01B6: MOVWF 24
....................
.................... reg = (reg & 0x3A) | setup_reg;
01B7: MOVF 24,W
01B8: ANDLW 3A
01B9: IORWF 23,W
01BA: MOVWF 24
....................
.................... i2c_start(); // Start condition
01BB: BSF 20.4
01BC: MOVF 20,W
01BD: BSF 03.5
01BE: MOVWF 07
01BF: NOP
01C0: BCF 03.5
01C1: BSF 20.3
01C2: MOVF 20,W
01C3: BSF 03.5
01C4: MOVWF 07
01C5: NOP
01C6: BCF 03.5
01C7: BTFSS 07.3
01C8: GOTO 1C7
01C9: BCF 07.4
01CA: BCF 20.4
01CB: MOVF 20,W
01CC: BSF 03.5
01CD: MOVWF 07
01CE: NOP
01CF: BCF 03.5
01D0: BCF 07.3
01D1: BCF 20.3
01D2: MOVF 20,W
01D3: BSF 03.5
01D4: MOVWF 07
.................... i2c_write(SHT25_ADDR); // Device address
01D5: MOVLW 80
01D6: BCF 03.5
01D7: MOVWF 28
01D8: CALL 031
.................... i2c_write(0xE6); // Write to status register
01D9: MOVLW E6
01DA: MOVWF 28
01DB: CALL 031
.................... i2c_write(reg); // Device command
01DC: MOVF 24,W
01DD: MOVWF 28
01DE: CALL 031
.................... i2c_stop(); // Stop condition
01DF: BCF 20.4
01E0: MOVF 20,W
01E1: BSF 03.5
01E2: MOVWF 07
01E3: NOP
01E4: BCF 03.5
01E5: BSF 20.3
01E6: MOVF 20,W
01E7: BSF 03.5
01E8: MOVWF 07
01E9: BCF 03.5
01EA: BTFSS 07.3
01EB: GOTO 1EA
01EC: NOP
01ED: GOTO 1EE
01EE: NOP
01EF: BSF 20.4
01F0: MOVF 20,W
01F1: BSF 03.5
01F2: MOVWF 07
01F3: NOP
....................
.................... delay_ms(10);
01F4: MOVLW 0A
01F5: BCF 03.5
01F6: MOVWF 28
01F7: CALL 11D
....................
.................... i2c_start(); // Start condition
01F8: BSF 20.4
01F9: MOVF 20,W
01FA: BSF 03.5
01FB: MOVWF 07
01FC: NOP
01FD: BCF 03.5
01FE: BSF 20.3
01FF: MOVF 20,W
0200: BSF 03.5
0201: MOVWF 07
0202: NOP
0203: BCF 03.5
0204: BCF 07.4
0205: BCF 20.4
0206: MOVF 20,W
0207: BSF 03.5
0208: MOVWF 07
0209: NOP
020A: BCF 03.5
020B: BCF 07.3
020C: BCF 20.3
020D: MOVF 20,W
020E: BSF 03.5
020F: MOVWF 07
.................... i2c_write(SHT25_ADDR); // Device address
0210: MOVLW 80
0211: BCF 03.5
0212: MOVWF 28
0213: CALL 031
.................... i2c_write(0xE7); // Device command
0214: MOVLW E7
0215: MOVWF 28
0216: CALL 031
....................
.................... i2c_start(); // Start condition
0217: BSF 20.4
0218: MOVF 20,W
0219: BSF 03.5
021A: MOVWF 07
021B: NOP
021C: BCF 03.5
021D: BSF 20.3
021E: MOVF 20,W
021F: BSF 03.5
0220: MOVWF 07
0221: NOP
0222: BCF 03.5
0223: BTFSS 07.3
0224: GOTO 223
0225: BCF 07.4
0226: BCF 20.4
0227: MOVF 20,W
0228: BSF 03.5
0229: MOVWF 07
022A: NOP
022B: BCF 03.5
022C: BCF 07.3
022D: BCF 20.3
022E: MOVF 20,W
022F: BSF 03.5
0230: MOVWF 07
.................... i2c_write(SHT25_ADDR+1); // Device address
0231: MOVLW 81
0232: BCF 03.5
0233: MOVWF 28
0234: CALL 031
.................... reg=i2c_read(0); // Read status actual status register
0235: CLRF 77
0236: CALL 131
0237: MOVF 78,W
0238: MOVWF 24
....................
.................... return (reg);
0239: MOVF 24,W
023A: MOVWF 78
.................... }
023B: BSF 0A.3
023C: BCF 0A.4
023D: GOTO 089 (RETURN)
....................
....................
.................... float SHT25_get_temp()
.................... {
.................... unsigned int8 MSB, LSB, Check;
.................... unsigned int16 data;
....................
.................... i2c_start();
*
054B: BSF 20.4
054C: MOVF 20,W
054D: BSF 03.5
054E: MOVWF 07
054F: NOP
0550: BCF 03.5
0551: BSF 20.3
0552: MOVF 20,W
0553: BSF 03.5
0554: MOVWF 07
0555: NOP
0556: BCF 03.5
0557: BTFSS 07.3
0558: GOTO 557
0559: BCF 07.4
055A: BCF 20.4
055B: MOVF 20,W
055C: BSF 03.5
055D: MOVWF 07
055E: NOP
055F: BCF 03.5
0560: BCF 07.3
0561: BCF 20.3
0562: MOVF 20,W
0563: BSF 03.5
0564: MOVWF 07
.................... I2C_Write(SHT25_ADDR);
0565: MOVLW 80
0566: BCF 03.5
0567: MOVWF 28
0568: CALL 031
.................... I2C_write(0xE3);
0569: MOVLW E3
056A: MOVWF 28
056B: CALL 031
.................... i2c_stop();
056C: BCF 20.4
056D: MOVF 20,W
056E: BSF 03.5
056F: MOVWF 07
0570: NOP
0571: BCF 03.5
0572: BSF 20.3
0573: MOVF 20,W
0574: BSF 03.5
0575: MOVWF 07
0576: BCF 03.5
0577: BTFSS 07.3
0578: GOTO 577
0579: NOP
057A: GOTO 57B
057B: NOP
057C: BSF 20.4
057D: MOVF 20,W
057E: BSF 03.5
057F: MOVWF 07
0580: NOP
....................
.................... delay_ms(100);
0581: MOVLW 64
0582: BCF 03.5
0583: MOVWF 28
0584: CALL 11D
....................
.................... i2c_start();
0585: BSF 20.4
0586: MOVF 20,W
0587: BSF 03.5
0588: MOVWF 07
0589: NOP
058A: BCF 03.5
058B: BSF 20.3
058C: MOVF 20,W
058D: BSF 03.5
058E: MOVWF 07
058F: NOP
0590: BCF 03.5
0591: BCF 07.4
0592: BCF 20.4
0593: MOVF 20,W
0594: BSF 03.5
0595: MOVWF 07
0596: NOP
0597: BCF 03.5
0598: BCF 07.3
0599: BCF 20.3
059A: MOVF 20,W
059B: BSF 03.5
059C: MOVWF 07
.................... I2C_Write(SHT25_ADDR+1);
059D: MOVLW 81
059E: BCF 03.5
059F: MOVWF 28
05A0: CALL 031
.................... MSB=i2c_read(1);
05A1: MOVLW 01
05A2: MOVWF 77
05A3: CALL 131
05A4: MOVF 78,W
05A5: MOVWF 23
.................... LSB=i2c_read(1);
05A6: MOVLW 01
05A7: MOVWF 77
05A8: CALL 131
05A9: MOVF 78,W
05AA: MOVWF 24
.................... Check=i2c_read(0);
05AB: CLRF 77
05AC: CALL 131
05AD: MOVF 78,W
05AE: MOVWF 25
.................... i2c_stop();
05AF: BCF 20.4
05B0: MOVF 20,W
05B1: BSF 03.5
05B2: MOVWF 07
05B3: NOP
05B4: BCF 03.5
05B5: BSF 20.3
05B6: MOVF 20,W
05B7: BSF 03.5
05B8: MOVWF 07
05B9: BCF 03.5
05BA: BTFSS 07.3
05BB: GOTO 5BA
05BC: NOP
05BD: GOTO 5BE
05BE: NOP
05BF: BSF 20.4
05C0: MOVF 20,W
05C1: BSF 03.5
05C2: MOVWF 07
05C3: NOP
....................
.................... LSB = LSB >> 2; // trow out status bits
05C4: BCF 03.5
05C5: RRF 24,F
05C6: RRF 24,F
05C7: MOVLW 3F
05C8: ANDWF 24,F
....................
.................... data = (((unsigned int16) MSB << 8) + (LSB << 4));
05C9: CLRF 29
05CA: MOVF 23,W
05CB: MOVWF 28
05CC: MOVWF 29
05CD: CLRF 28
05CE: SWAPF 24,W
05CF: MOVWF 77
05D0: MOVLW F0
05D1: ANDWF 77,F
05D2: MOVF 77,W
05D3: ADDWF 28,W
05D4: MOVWF 26
05D5: MOVF 29,W
05D6: MOVWF 27
05D7: BTFSC 03.0
05D8: INCF 27,F
.................... return(-46.85 + 175.72*((float)data/0xFFFF));
05D9: MOVF 27,W
05DA: MOVWF 29
05DB: MOVF 26,W
05DC: MOVWF 28
05DD: CALL 2AE
05DE: MOVF 77,W
05DF: MOVWF 28
05E0: MOVF 78,W
05E1: MOVWF 29
05E2: MOVF 79,W
05E3: MOVWF 2A
05E4: MOVF 7A,W
05E5: MOVWF 2B
05E6: MOVWF 2F
05E7: MOVF 79,W
05E8: MOVWF 2E
05E9: MOVF 78,W
05EA: MOVWF 2D
05EB: MOVF 77,W
05EC: MOVWF 2C
05ED: CLRF 33
05EE: MOVLW FF
05EF: MOVWF 32
05F0: MOVLW 7F
05F1: MOVWF 31
05F2: MOVLW 8E
05F3: MOVWF 30
05F4: CALL 2CB
05F5: MOVLW 52
05F6: MOVWF 37
05F7: MOVLW B8
05F8: MOVWF 36
05F9: MOVLW 2F
05FA: MOVWF 35
05FB: MOVLW 86
05FC: MOVWF 34
05FD: MOVF 7A,W
05FE: MOVWF 3B
05FF: MOVF 79,W
0600: MOVWF 3A
0601: MOVF 78,W
0602: MOVWF 39
0603: MOVF 77,W
0604: MOVWF 38
0605: CALL 395
0606: BCF 03.1
0607: MOVLW 66
0608: MOVWF 2B
0609: MOVWF 2A
060A: MOVLW BB
060B: MOVWF 29
060C: MOVLW 84
060D: MOVWF 28
060E: MOVF 7A,W
060F: MOVWF 2F
0610: MOVF 79,W
0611: MOVWF 2E
0612: MOVF 78,W
0613: MOVWF 2D
0614: MOVF 77,W
0615: MOVWF 2C
0616: CALL 40A
.................... }
0617: BSF 0A.3
0618: BCF 0A.4
0619: GOTO 0C5 (RETURN)
....................
.................... float SHT25_get_hum()
.................... {
.................... unsigned int8 MSB, LSB, Check;
.................... unsigned int16 data;
....................
.................... i2c_start(); //RH
*
0743: BSF 20.4
0744: MOVF 20,W
0745: BSF 03.5
0746: MOVWF 07
0747: NOP
0748: BCF 03.5
0749: BSF 20.3
074A: MOVF 20,W
074B: BSF 03.5
074C: MOVWF 07
074D: NOP
074E: BCF 03.5
074F: BCF 07.4
0750: BCF 20.4
0751: MOVF 20,W
0752: BSF 03.5
0753: MOVWF 07
0754: NOP
0755: BCF 03.5
0756: BCF 07.3
0757: BCF 20.3
0758: MOVF 20,W
0759: BSF 03.5
075A: MOVWF 07
.................... I2C_Write(SHT25_ADDR);
075B: MOVLW 80
075C: BCF 03.5
075D: MOVWF 28
075E: CALL 031
.................... I2C_write(0xE5);
075F: MOVLW E5
0760: MOVWF 28
0761: CALL 031
....................
.................... delay_ms(100);
0762: MOVLW 64
0763: MOVWF 28
0764: CALL 11D
....................
.................... i2c_start();
0765: BSF 20.4
0766: MOVF 20,W
0767: BSF 03.5
0768: MOVWF 07
0769: NOP
076A: BCF 03.5
076B: BSF 20.3
076C: MOVF 20,W
076D: BSF 03.5
076E: MOVWF 07
076F: NOP
0770: BCF 03.5
0771: BTFSS 07.3
0772: GOTO 771
0773: BCF 07.4
0774: BCF 20.4
0775: MOVF 20,W
0776: BSF 03.5
0777: MOVWF 07
0778: NOP
0779: BCF 03.5
077A: BCF 07.3
077B: BCF 20.3
077C: MOVF 20,W
077D: BSF 03.5
077E: MOVWF 07
.................... I2C_Write(SHT25_ADDR+1);
077F: MOVLW 81
0780: BCF 03.5
0781: MOVWF 28
0782: CALL 031
.................... MSB=i2c_read(1);
0783: MOVLW 01
0784: MOVWF 77
0785: CALL 131
0786: MOVF 78,W
0787: MOVWF 23
.................... LSB=i2c_read(1);
0788: MOVLW 01
0789: MOVWF 77
078A: CALL 131
078B: MOVF 78,W
078C: MOVWF 24
.................... Check=i2c_read(0);
078D: CLRF 77
078E: CALL 131
078F: MOVF 78,W
0790: MOVWF 25
.................... i2c_stop();
0791: BCF 20.4
0792: MOVF 20,W
0793: BSF 03.5
0794: MOVWF 07
0795: NOP
0796: BCF 03.5
0797: BSF 20.3
0798: MOVF 20,W
0799: BSF 03.5
079A: MOVWF 07
079B: BCF 03.5
079C: BTFSS 07.3
079D: GOTO 79C
079E: NOP
079F: GOTO 7A0
07A0: NOP
07A1: BSF 20.4
07A2: MOVF 20,W
07A3: BSF 03.5
07A4: MOVWF 07
07A5: NOP
....................
.................... LSB = LSB >> 2; // trow out status bits
07A6: BCF 03.5
07A7: RRF 24,F
07A8: RRF 24,F
07A9: MOVLW 3F
07AA: ANDWF 24,F
....................
.................... data = (((unsigned int16) MSB << 8) + (LSB << 4) );
07AB: CLRF 29
07AC: MOVF 23,W
07AD: MOVWF 28
07AE: MOVWF 29
07AF: CLRF 28
07B0: SWAPF 24,W
07B1: MOVWF 77
07B2: MOVLW F0
07B3: ANDWF 77,F
07B4: MOVF 77,W
07B5: ADDWF 28,W
07B6: MOVWF 26
07B7: MOVF 29,W
07B8: MOVWF 27
07B9: BTFSC 03.0
07BA: INCF 27,F
.................... return( -6.0 + 125.0*((float)data/0xFFFF));
07BB: MOVF 27,W
07BC: MOVWF 29
07BD: MOVF 26,W
07BE: MOVWF 28
07BF: CALL 2AE
07C0: MOVF 77,W
07C1: MOVWF 28
07C2: MOVF 78,W
07C3: MOVWF 29
07C4: MOVF 79,W
07C5: MOVWF 2A
07C6: MOVF 7A,W
07C7: MOVWF 2B
07C8: MOVWF 2F
07C9: MOVF 79,W
07CA: MOVWF 2E
07CB: MOVF 78,W
07CC: MOVWF 2D
07CD: MOVF 77,W
07CE: MOVWF 2C
07CF: CLRF 33
07D0: MOVLW FF
07D1: MOVWF 32
07D2: MOVLW 7F
07D3: MOVWF 31
07D4: MOVLW 8E
07D5: MOVWF 30
07D6: CALL 2CB
07D7: CLRF 37
07D8: CLRF 36
07D9: MOVLW 7A
07DA: MOVWF 35
07DB: MOVLW 85
07DC: MOVWF 34
07DD: MOVF 7A,W
07DE: MOVWF 3B
07DF: MOVF 79,W
07E0: MOVWF 3A
07E1: MOVF 78,W
07E2: MOVWF 39
07E3: MOVF 77,W
07E4: MOVWF 38
07E5: CALL 395
07E6: BCF 03.1
07E7: CLRF 2B
07E8: CLRF 2A
07E9: MOVLW C0
07EA: MOVWF 29
07EB: MOVLW 81
07EC: MOVWF 28
07ED: MOVF 7A,W
07EE: MOVWF 2F
07EF: MOVF 79,W
07F0: MOVWF 2E
07F1: MOVF 78,W
07F2: MOVWF 2D
07F3: MOVF 77,W
07F4: MOVWF 2C
07F5: CALL 40A
.................... }
07F6: BSF 0A.3
07F7: BCF 0A.4
07F8: GOTO 103 (RETURN)
....................
....................
....................
....................
....................
.................... void main()
.................... {
*
0030: DATA 00,00
*
0800: CLRF 04
0801: BCF 03.7
0802: MOVLW 1F
0803: ANDWF 03,F
0804: MOVLW 71
0805: BSF 03.5
0806: MOVWF 0F
0807: MOVF 0F,W
0808: BCF 06.7
0809: BCF 03.5
080A: BSF 06.7
080B: BSF 03.5
080C: BSF 03.6
080D: MOVF 09,W
080E: ANDLW C0
080F: MOVWF 09
0810: BCF 03.6
0811: BCF 1F.4
0812: BCF 1F.5
0813: MOVLW 00
0814: BSF 03.6
0815: MOVWF 08
0816: BCF 03.5
0817: CLRF 07
0818: CLRF 08
0819: CLRF 09
*
081D: CLRF 21
.................... unsigned int8 i=0, sht_config;
....................
.................... setup_adc_ports(NO_ANALOGS|VSS_VDD);
081E: BSF 03.5
081F: BSF 03.6
0820: MOVF 09,W
0821: ANDLW C0
0822: MOVWF 09
0823: BCF 03.6
0824: BCF 1F.4
0825: BCF 1F.5
0826: MOVLW 00
0827: BSF 03.6
0828: MOVWF 08
.................... setup_adc(ADC_CLOCK_DIV_2);
0829: BCF 03.5
082A: BCF 03.6
082B: BCF 1F.6
082C: BCF 1F.7
082D: BSF 03.5
082E: BCF 1F.7
082F: BCF 03.5
0830: BSF 1F.0
.................... setup_spi(SPI_SS_DISABLED);
0831: BCF 14.5
0832: BCF 20.5
0833: MOVF 20,W
0834: BSF 03.5
0835: MOVWF 07
0836: BCF 03.5
0837: BSF 20.4
0838: MOVF 20,W
0839: BSF 03.5
083A: MOVWF 07
083B: BCF 03.5
083C: BCF 20.3
083D: MOVF 20,W
083E: BSF 03.5
083F: MOVWF 07
0840: MOVLW 01
0841: BCF 03.5
0842: MOVWF 14
0843: MOVLW 00
0844: BSF 03.5
0845: MOVWF 14
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
0846: MOVF 01,W
0847: ANDLW C7
0848: IORLW 08
0849: MOVWF 01
.................... setup_timer_1(T1_DISABLED);
084A: BCF 03.5
084B: CLRF 10
.................... setup_timer_2(T2_DISABLED,0,1);
084C: MOVLW 00
084D: MOVWF 78
084E: MOVWF 12
084F: MOVLW 00
0850: BSF 03.5
0851: MOVWF 12
.................... setup_ccp1(CCP_OFF);
0852: BCF 03.5
0853: BSF 20.2
0854: MOVF 20,W
0855: BSF 03.5
0856: MOVWF 07
0857: BCF 03.5
0858: CLRF 17
0859: BSF 03.5
085A: CLRF 1B
085B: CLRF 1C
085C: MOVLW 01
085D: MOVWF 1D
.................... setup_comparator(NC_NC_NC_NC);
085E: BCF 03.5
085F: BSF 03.6
0860: CLRF 07
0861: CLRF 08
0862: CLRF 09
....................
.................... SHT25_soft_reset();
0863: BCF 0A.3
0864: BCF 03.6
0865: GOTO 07B
0866: BSF 0A.3
.................... printf("SHT25 humidity and temperature sensor example \r\n",);
0867: MOVLW 04
0868: BSF 03.6
0869: MOVWF 0D
086A: MOVLW 00
086B: MOVWF 0F
086C: BCF 0A.3
086D: BCF 03.6
086E: GOTO 0D5
086F: BSF 0A.3
.................... delay_ms (500);
0870: MOVLW 02
0871: MOVWF 23
0872: MOVLW FA
0873: MOVWF 28
0874: BCF 0A.3
0875: CALL 11D
0876: BSF 0A.3
0877: DECFSZ 23,F
0878: GOTO 072
....................
.................... while(TRUE)
.................... {
.................... if (i<10) sht_config = SHT25_RH12_T14 | SHT25_HEATER_OFF; // loop alters on chip heater on and off to check correct function
0879: MOVF 21,W
087A: SUBLW 09
087B: BTFSS 03.0
087C: GOTO 07F
087D: CLRF 22
.................... else
087E: GOTO 085
.................... {
.................... sht_config = SHT25_RH12_T14 | SHT25_HEATER_ON;
087F: MOVLW 04
0880: MOVWF 22
.................... if (i > 20) i = 0;
0881: MOVF 21,W
0882: SUBLW 14
0883: BTFSS 03.0
0884: CLRF 21
.................... }
.................... printf("setup: %X %X \r\n",SHT25_setup(sht_config),sht_config);
0885: MOVF 22,W
0886: MOVWF 23
0887: BCF 0A.3
0888: GOTO 176
0889: BSF 0A.3
088A: MOVF 78,W
088B: MOVWF 23
088C: MOVLW 1D
088D: BSF 03.6
088E: MOVWF 0D
088F: MOVLW 00
0890: MOVWF 0F
0891: BCF 03.0
0892: MOVLW 07
0893: BCF 03.6
0894: MOVWF 27
0895: BCF 0A.3
0896: CALL 23E
0897: BSF 0A.3
0898: MOVF 23,W
0899: MOVWF 24
089A: MOVLW 37
089B: MOVWF 25
089C: BCF 0A.3
089D: CALL 28D
089E: BSF 0A.3
089F: MOVLW 20
08A0: MOVWF 34
08A1: BCF 0A.3
08A2: CALL 0B3
08A3: BSF 0A.3
08A4: MOVF 22,W
08A5: MOVWF 24
08A6: MOVLW 37
08A7: MOVWF 25
08A8: BCF 0A.3
08A9: CALL 28D
08AA: BSF 0A.3
08AB: MOVLW 20
08AC: MOVWF 34
08AD: BCF 0A.3
08AE: CALL 0B3
08AF: BSF 0A.3
08B0: MOVLW 0D
08B1: MOVWF 34
08B2: BCF 0A.3
08B3: CALL 0B3
08B4: BSF 0A.3
08B5: MOVLW 0A
08B6: MOVWF 34
08B7: BCF 0A.3
08B8: CALL 0B3
08B9: BSF 0A.3
.................... delay_ms (500);
08BA: MOVLW 02
08BB: MOVWF 23
08BC: MOVLW FA
08BD: MOVWF 28
08BE: BCF 0A.3
08BF: CALL 11D
08C0: BSF 0A.3
08C1: DECFSZ 23,F
08C2: GOTO 0BC
.................... printf("Temp: %f \r\n",SHT25_get_temp());
08C3: BCF 0A.3
08C4: GOTO 54B
08C5: BSF 0A.3
08C6: MOVF 77,W
08C7: MOVWF 23
08C8: MOVF 78,W
08C9: MOVWF 24
08CA: MOVF 79,W
08CB: MOVWF 25
08CC: MOVF 7A,W
08CD: MOVWF 26
08CE: MOVLW 25
08CF: BSF 03.6
08D0: MOVWF 0D
08D1: MOVLW 00
08D2: MOVWF 0F
08D3: BCF 03.0
08D4: MOVLW 06
08D5: BCF 03.6
08D6: MOVWF 27
08D7: BCF 0A.3
08D8: CALL 23E
08D9: BSF 0A.3
08DA: MOVLW 89
08DB: MOVWF 04
08DC: MOVF 26,W
08DD: MOVWF 2A
08DE: MOVF 25,W
08DF: MOVWF 29
08E0: MOVF 24,W
08E1: MOVWF 28
08E2: MOVF 23,W
08E3: MOVWF 27
08E4: MOVLW 02
08E5: MOVWF 2B
08E6: BCF 0A.3
08E7: CALL 65C
08E8: BSF 0A.3
08E9: MOVLW 20
08EA: MOVWF 34
08EB: BCF 0A.3
08EC: CALL 0B3
08ED: BSF 0A.3
08EE: MOVLW 0D
08EF: MOVWF 34
08F0: BCF 0A.3
08F1: CALL 0B3
08F2: BSF 0A.3
08F3: MOVLW 0A
08F4: MOVWF 34
08F5: BCF 0A.3
08F6: CALL 0B3
08F7: BSF 0A.3
.................... delay_ms (500);
08F8: MOVLW 02
08F9: MOVWF 23
08FA: MOVLW FA
08FB: MOVWF 28
08FC: BCF 0A.3
08FD: CALL 11D
08FE: BSF 0A.3
08FF: DECFSZ 23,F
0900: GOTO 0FA
.................... printf("Hum: %f \r\n",SHT25_get_hum());
0901: BCF 0A.3
0902: GOTO 743
0903: BSF 0A.3
0904: MOVF 77,W
0905: MOVWF 23
0906: MOVF 78,W
0907: MOVWF 24
0908: MOVF 79,W
0909: MOVWF 25
090A: MOVF 7A,W
090B: MOVWF 26
090C: MOVLW 2B
090D: BSF 03.6
090E: MOVWF 0D
090F: MOVLW 00
0910: MOVWF 0F
0911: BCF 03.0
0912: MOVLW 05
0913: BCF 03.6
0914: MOVWF 27
0915: BCF 0A.3
0916: CALL 23E
0917: BSF 0A.3
0918: MOVLW 89
0919: MOVWF 04
091A: MOVF 26,W
091B: MOVWF 2A
091C: MOVF 25,W
091D: MOVWF 29
091E: MOVF 24,W
091F: MOVWF 28
0920: MOVF 23,W
0921: MOVWF 27
0922: MOVLW 02
0923: MOVWF 2B
0924: BCF 0A.3
0925: CALL 65C
0926: BSF 0A.3
0927: MOVLW 20
0928: MOVWF 34
0929: BCF 0A.3
092A: CALL 0B3
092B: BSF 0A.3
092C: MOVLW 0D
092D: MOVWF 34
092E: BCF 0A.3
092F: CALL 0B3
0930: BSF 0A.3
0931: MOVLW 0A
0932: MOVWF 34
0933: BCF 0A.3
0934: CALL 0B3
0935: BSF 0A.3
.................... delay_ms (1000);
0936: MOVLW 04
0937: MOVWF 23
0938: MOVLW FA
0939: MOVWF 28
093A: BCF 0A.3
093B: CALL 11D
093C: BSF 0A.3
093D: DECFSZ 23,F
093E: GOTO 138
.................... i++;
093F: INCF 21,F
.................... }
0940: GOTO 079
.................... }
....................
0941: SLEEP
 
Configuration Fuses:
Word 1: 2CF4 INTRC_IO NOWDT NOPUT MCLR NOPROTECT NOCPD NOBROWNOUT IESO FCMEN NOLVP NODEBUG
Word 2: 3FFF NOWRT BORV40
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.pjt
0,0 → 1,30
[PROJECT]
Target=main.hex
Development_Mode=
Processor_Text=PIC16F887
ToolSuite=CCS
Processor=0x887F
[main]
Type=4
Path=
FileList=
BuildTool=
OptionString=
AdditionalOptionString=
[mru-list]
1=.\main.c
[Windows]
0=0000 %S 0 0 796 451 3 0
[Opened Files]
1=main.c
2=main.h
3=C:\Program Files\PICC\devices\16F887.h
4=SHT25.c
5=SHT25.h
6=
[Target Data]
OptionString=-p +FM
FileList=D:\MLAB\Modules\Sensors\SHT25V01A\SW\PIC16F887\main.c
[Units]
Count=1
1=main (main)
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.sta
0,0 → 1,70
 
ROM used: 2363 (29%)
2370 (29%) including unused fragments
 
4 Average locations per line
31 Average locations per statement
 
RAM used: 12 (3%) at main() level
38 (10%) worst case
 
Stack used: 2 worst case (out of 8 total available)
 
Lines Stmts % Files
----- ----- --- -----
43 26 34 main.c
23 0 0 main.h
423 0 0 C:\Program Files\PICC\devices\16F887.h
14 0 0 SHT25.h
92 51 66 SHT25.c
----- -----
595 77 Total
 
Page ROM % RAM Vol Diff Functions:
---- --- --- --- --- ---- ----------
0 20 1 1 @delay_ms1
0 69 3 3 @I2C_READ_1
0 74 3 1 @I2C_WRITE_1
0 34 1 1 @PUTCHAR_1_
0 56 2 0 55 1.1 SHT25_soft_reset
0 200 8 3 550 4.0 SHT25_setup
0 207 9 9 572 6.0 SHT25_get_temp
0 29 1 2 @ITOF
0 202 9 14 @DIVFF
0 117 5 13 @MULFF
0 321 14 16 @ADDFF
0 182 8 9 552 6.0 SHT25_get_hum
1 322 14 6 831 5.7 MAIN
0 25 1 0 @const105
0 72 3 3 @PSTRINGC7_69
0 8 0 0 @const107
0 79 3 4 @PSTRINGCN7_69
0 33 1 2 @PRINTF_X_69
0 6 0 0 @const113
Inline 5 @FTOSD
0 66 3 13 @DIV3232
0 231 10 13 @PRINTF_L32D_69FPFPF
0 6 0 0 @const122
 
Program metrics:
Functions 5
Statements 77
Comments 124
Volume (V) 3540
Difficilty (D) 21.1
Effort to implement (E) 74648
Time to implement (T) 1 hours, 9 minutes
Est Delivered Bugs (B) 1
Cyclomatic Complexity 2
Maintainability (MI) 142
 
Segment Used Free
----------- ---- ----
00000-00003 4 0
00004-007FF 2037 7
00800-00FFF 322 1726
01000-017FF 0 2048
01800-01FFF 0 2048
 
 
 
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.sym
0,0 → 1,166
004 @WRITE_PROGRAM_MEMORY8.P1
004-005 @READ_PROGRAM_MEMORY8.P2
015 CCP_1_LOW
015 CCP_1
016 CCP_1_HIGH
01B CCP_2_LOW
01B CCP_2
01C CCP_2_HIGH
020 @TRIS_C
021 MAIN.i
022 MAIN.sht_config
023 SHT25_setup.setup_reg
023 SHT25_get_temp.MSB
023 SHT25_get_hum.MSB
023 MAIN.@SCRATCH1
023 @PSTRINGC7_69.@SCRATCH1
024 SHT25_get_hum.LSB
024 @PRINTF_X_69.P1
024 SHT25_setup.reg
024 SHT25_get_temp.LSB
024 MAIN.@SCRATCH2
024 @PSTRINGC7_69.@SCRATCH2
025 @PRINTF_X_69.P1
025 SHT25_get_temp.Check
025 SHT25_get_hum.Check
025 SHT25_setup.@SCRATCH1
025 MAIN.@SCRATCH3
025 @PSTRINGC7_69.@SCRATCH3
026-027 SHT25_get_hum.data
026-027 SHT25_get_temp.data
026 MAIN.@SCRATCH4
027-02A @PRINTF_L32D_69FPFPF.P1
027 @PSTRINGCN7_69.P2
028 @I2C_WRITE_1.P1
028-029 @ITOF.P2
028-02B @ADDFF.P3
028 @delay_ms1.P4
028 @I2C_READ_1.P5
028 SHT25_get_temp.@SCRATCH1
028 SHT25_get_hum.@SCRATCH1
028 @PSTRINGCN7_69.@SCRATCH1
029 @I2C_READ_1.@SCRATCH1
029 SHT25_get_temp.@SCRATCH2
029 SHT25_get_hum.@SCRATCH2
029 @PSTRINGCN7_69.@SCRATCH2
02A @I2C_READ_1.@SCRATCH2
02A SHT25_get_temp.@SCRATCH3
02A SHT25_get_hum.@SCRATCH3
02A @PSTRINGCN7_69.@SCRATCH3
02B @PRINTF_L32D_69FPFPF.P1
02B SHT25_get_temp.@SCRATCH4
02B SHT25_get_hum.@SCRATCH4
02C-02F @DIVFF.P1
02C-02F @ADDFF.P2
02C @PRINTF_L32D_69FPFPF.@SCRATCH1
02D @PRINTF_L32D_69FPFPF.@SCRATCH2
02E @PRINTF_L32D_69FPFPF.@SCRATCH3
02F @PRINTF_L32D_69FPFPF.@SCRATCH4
030-033 @DIVFF.P1
030 @ADDFF.@SCRATCH1
030 @PRINTF_L32D_69FPFPF.@SCRATCH5
031 @ADDFF.@SCRATCH2
031 @PRINTF_L32D_69FPFPF.@SCRATCH6
032 @ADDFF.@SCRATCH3
032 @PRINTF_L32D_69FPFPF.@SCRATCH7
033 @ADDFF.@SCRATCH4
033 @PRINTF_L32D_69FPFPF.@SCRATCH8
034-037 @FTOSD.P1
034-037 @DIV3232.P2
034-037 @MULFF.P3
034 @PUTCHAR_1_.P4
034 @DIVFF.@SCRATCH1
034 @ADDFF.@SCRATCH5
035 @DIVFF.@SCRATCH2
035 @ADDFF.@SCRATCH6
036 @DIVFF.@SCRATCH3
036 @ADDFF.@SCRATCH7
037 @DIVFF.@SCRATCH4
037 @ADDFF.@SCRATCH8
038-03B @MULFF.P1
038-03B @DIV3232.P2
038 @DIVFF.@SCRATCH5
038 @FTOSD.@SCRATCH1
039 @DIVFF.@SCRATCH6
03C @MULFF.@SCRATCH1
03C @DIV3232.@SCRATCH1
03D @MULFF.@SCRATCH2
03D @DIV3232.@SCRATCH2
03E @MULFF.@SCRATCH3
03E @DIV3232.@SCRATCH3
03F @MULFF.@SCRATCH4
03F @DIV3232.@SCRATCH4
040 @MULFF.@SCRATCH5
040 @DIV3232.@SCRATCH5
077 @SCRATCH
078 @SCRATCH
078 _RETURN_
079 @SCRATCH
07A @SCRATCH
107.6 C1OUT
108.6 C2OUT
10D-10E @READ_PROGRAM_MEMORY8.P1
10D-10E @WRITE_PROGRAM_MEMORY8.P2
 
ROM Allocation:
011D @delay_ms1
0131 @I2C_READ_1
0031 @I2C_WRITE_1
00B3 @PUTCHAR_1_
007B SHT25_soft_reset
0176 SHT25_setup
054B SHT25_get_temp
02AE @ITOF
02CB @DIVFF
0395 @MULFF
040A @ADDFF
0743 SHT25_get_hum
0800 MAIN
0004 @const105
00D5 @PSTRINGC7_69
001D @const107
023E @PSTRINGCN7_69
028D @PRINTF_X_69
0025 @const113
0683 @FTOSD
061A @DIV3232
065C @PRINTF_L32D_69FPFPF
002B @const122
0800 @cinit
 
 
User Memory space:
 
User Memory space:
 
Project Directory:
D:\MLAB\Modules\Sensors\SHT25V01A\SW\PIC16F887\
 
Project Files:
main.c
main.h
C:\Program Files\PICC\devices\16F887.h
SHT25.h
SHT25.c
 
Units:
D:\MLAB\Modules\Sensors\SHT25V01A\SW\PIC16F887\main (main)
 
Compiler Settings:
Processor: PIC16F887
Pointer Size: 16
ADC Range: 0-255
Opt Level: 9
Short,Int,Long: UNSIGNED: 1,8,16
Float,Double: 32,32
 
Output Files:
Errors: main.err
Ext Symbols: main.esym
INHX8: main.hex
Symbols: main.sym
List: main.lst
Debug/COFF: main.cof
Project: main.PJT
Call Tree: main.tre
Statistics: main.sta
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.tre
0,0 → 1,93
ÀÄmain
ÀÄMAIN 1/322 Ram=6
ÃÄ??0??
ÃÄSHT25_soft_reset 0/56 Ram=0
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÀÄ@I2C_WRITE_1 0/74 Ram=1
ÃÄ@PSTRINGC7_69 0/72 Ram=3
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@delay_ms1 0/20 Ram=1
ÃÄSHT25_setup 0/200 Ram=3
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@I2C_READ_1 0/69 Ram=3
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@delay_ms1 0/20 Ram=1
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÀÄ@I2C_READ_1 0/69 Ram=3
ÃÄ@PSTRINGCN7_69 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PRINTF_X_69 0/33 Ram=2
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PRINTF_X_69 0/33 Ram=2
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@delay_ms1 0/20 Ram=1
ÃÄSHT25_get_temp 0/207 Ram=9
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@delay_ms1 0/20 Ram=1
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@I2C_READ_1 0/69 Ram=3
³ ÃÄ@I2C_READ_1 0/69 Ram=3
³ ÃÄ@I2C_READ_1 0/69 Ram=3
³ ÃÄ@ITOF 0/29 Ram=2
³ ÃÄ@DIVFF 0/202 Ram=14
³ ÃÄ@MULFF 0/117 Ram=13
³ ÀÄ@ADDFF 0/321 Ram=16
ÃÄ@PSTRINGCN7_69 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PRINTF_L32D_69FPFPF 0/231 Ram=13
³ ÃÄ@MULFF 0/117 Ram=13
³ ÃÄ@FTOSD (Inline) Ram=5
³ ÃÄ@DIV3232 0/66 Ram=13
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@DIV3232 0/66 Ram=13
ÃÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@delay_ms1 0/20 Ram=1
ÃÄSHT25_get_hum 0/182 Ram=9
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@delay_ms1 0/20 Ram=1
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@I2C_READ_1 0/69 Ram=3
³ ÃÄ@I2C_READ_1 0/69 Ram=3
³ ÃÄ@I2C_READ_1 0/69 Ram=3
³ ÃÄ@ITOF 0/29 Ram=2
³ ÃÄ@DIVFF 0/202 Ram=14
³ ÃÄ@MULFF 0/117 Ram=13
³ ÀÄ@ADDFF 0/321 Ram=16
ÃÄ@PSTRINGCN7_69 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PRINTF_L32D_69FPFPF 0/231 Ram=13
³ ÃÄ@MULFF 0/117 Ram=13
³ ÃÄ@FTOSD (Inline) Ram=5
³ ÃÄ@DIV3232 0/66 Ram=13
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@DIV3232 0/66 Ram=13
ÃÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PUTCHAR_1_ 0/34 Ram=1
ÀÄ@delay_ms1 0/20 Ram=1
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.h
0,0 → 1,22
#include <16F887.h>
#device adc=8
 
#FUSES NOWDT //No Watch Dog Timer
#FUSES INTRC_IO //Internal RC Osc
#FUSES NOPUT //No Power Up Timer
#FUSES MCLR //Master Clear pin enabled
#FUSES NOPROTECT //Code not protected from reading
#FUSES NOCPD //No EE protection
#FUSES NOBROWNOUT //No brownout reset
#FUSES IESO //Internal External Switch Over mode enabled
#FUSES FCMEN //Fail-safe clock monitor enabled
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NODEBUG //No Debug mode for ICD
#FUSES NOWRT //Program memory not write protected
#FUSES BORV40 //Brownout reset at 4.0V
 
#use delay(clock=8000000)
 
#use i2c(master, sda=PIN_C4, scl=PIN_C3)
#use rs232(baud=9600,parity=N,xmit=PIN_B7,rcv=PIN_B6,bits=8) //rcv TXD xmit RXD