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 << 2)); |
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 << 2) ); |
return( -6.0 + 125.0*((float)data/0xFFFF)); |
} |
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.c |
---|
0,0 → 1,45 |
/* |
SHT25 sensor demo firmware |
*/ |
#include "main.h" |
#include "SHT25.h" |
void main() |
{ |
unsigned int8 i=0, sht_config; |
float temperature, humidity; |
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",); |
printf("Temperature Humidity[%%] \r\n"); |
delay_ms (500); |
while(TRUE) |
{ |
if (i<100) 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 > 120) i = 0; |
} |
temperature = SHT25_get_temp(); |
humidity = SHT25_get_hum(); |
printf("%f %f %X %X \r\n",temperature, humidity, SHT25_setup(sht_config),sht_config); |
i++; |
delay_ms(1000); |
} |
} |
/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=28% RAM=5% - 12% |
0 Errors, 0 Warnings. |
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.esym |
---|
0,0 → 1,459 |
D G "__PCM__" 0 47 ""4.106"" |
D G "__DEVICE__" 0 47 "887" |
D G "__DATE__" 0 47 ""15-V-13"" |
D G "__TIME__" 0 47 ""22:58:57"" "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" |
V L "temperature" 0 11 "float" |
V L "humidity" 0 11 "float" |
C L "MAIN" 0 30 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.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_C7,rcv=PIN_C6,bits=8) //rcv TXD xmit RXD |
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.hex |
---|
0,0 → 1,295 |
:1000000008308A0000280000532454193510E83ABB |
:10001000ED34E434F43CA0306E32203AE536F03270 |
:10002000F230F43AF232A0396537F3377210653C9A |
:10003000E136703665100D050000D4326D38653933 |
:10004000613A753965102024F5366932693AF92D1F |
:10005000A5125D10A0060A000830F8000000871104 |
:10006000A01120088316870000008312B00D07122C |
:10007000031C40282016200883168700442883127A |
:10008000201220088316870000008312A015200884 |
:10009000831687008312871D4B28F80B2E2800003B |
:1000A0008711A011200883168700000083122016F4 |
:1000B000200883168700000000008312A015200886 |
:1000C000831687008312871D6328F8010000071A32 |
:1000D00078148711A0112008831687008312071255 |
:1000E000201220088316870083120800201620089B |
:1000F0008316870000008312A0152008831687004E |
:1001000000008312071220122008831687000000C7 |
:1001100083128711A0112008831687008030831274 |
:10012000B0002C20FE30B0002C20201220088316B6 |
:10013000870000008312A015200883168700831211 |
:10014000871DA0280000A428000020162008831680 |
:100150008700000083128A150A126A28A01320085B |
:1001600083168700831287130830F800B728000031 |
:10017000F817C828F813B90C03188717031C87133E |
:100180007817C8287813F80BBB28C62800008717F3 |
:100190003F308400840BCA280000F81BBA28781B63 |
:1001A000C2280800831603178C170C1400000000E7 |
:1001B00083120C087F39031916290313AB000317A8 |
:1001C0000D080313AC0003170F080313AD002B0831 |
:1001D000B900AE202C0803178D0003132D08031758 |
:1001E0008F0083168C170C140000000083120C0D76 |
:1001F0000E0D7F39031916290313AB0003170D08E1 |
:100200000313AC0003170F080313AD002B08B9004C |
:10021000AE202C0803178D0003132D0803178F0041 |
:100220008D0A03198F0A0313D228031703138A15A3 |
:100230000A127328831603178C170C140000000091 |
:100240000318492983120C087F390313AC000317E4 |
:100250000D080313AD0003170F080313AE002C089D |
:10026000B900AE202D0803178D0003132E080317C5 |
:100270008F0083168C170C140000000083120313E8 |
:10028000AB0B43294629831603174929682983168E |
:10029000031783120C0D0E0D7F390313AC000317E7 |
:1002A0000D080313AD0003170F080313AE002C084D |
:1002B000B900AE202D0803178D0003132E08031775 |
:1002C0008F008D0A03198F0A03100313AB0B1A2931 |
:1002D0000800303084008313000803197C290230A1 |
:1002E000F800F701F70B7229F80B71299730F70026 |
:1002F000F70B7829800B6F2908000830B1007708C8 |
:10030000B200201620088316870000008312A01573 |
:100310002008831687008312871D8C29071A03146F |
:10032000071E0310F80D0000A01120088316870097 |
:1003300083128711B10B81292016200883168700AC |
:1003400000008312071232080319AB29201220087B |
:100350008316870083120000A015200883168700EB |
:100360008312871DB12900008711A0112008831670 |
:1003700087000000831207122012200883168700CE |
:10038000831208008E30F7003108F8003008F900B9 |
:10039000FA01F808031DD6297908F800F901083098 |
:1003A000F702F808031DD629F701DE290310F81B10 |
:1003B000DD29F90DF80DF703D629F81308003408E4 |
:1003C0000319A42AC00038080319A42AC002031C78 |
:1003D000EE297F30C0070318A42AF4298130C00217 |
:1003E000031CA42A0319A42A4008F700F801F90104 |
:1003F000FA01BF013508BE00BE173608BD00370838 |
:10040000BC001930C0003B08BC020318172A013099 |
:10041000BD020318172ABE020318172ABF020318C9 |
:10042000172ABF0ABE0ABD0A3B08BC07492A3A0878 |
:10043000BD020318322A0130BE020318322ABF025D |
:100440000318322ABF0ABE0A3A08BD073B08BC0798 |
:10045000031C492ABD0A031D492ABE0A031D492A55 |
:10046000BF0A492A39088038BE020318482A0130D9 |
:10047000BF020318482ABF0A39088038BE073A0865 |
:10048000BD07031C262ABE0A031D262ABF0A262AE8 |
:100490007A14C00B4C2A572A0310BC0DBD0DBE0D9B |
:1004A000BF0D0310FA0DF90DF80DC10D032A411C03 |
:1004B0005F2A0310F80CF90CFA0CC10C622AF7033E |
:1004C0000319A42AC11B8B2A0310BC0DBD0DBE0D40 |
:1004D000BF0D3B08BC020318772A0130BD02031888 |
:1004E000772ABE020318772ABF02031C9A2A3A0809 |
:1004F000BD020318822A0130BE020318822ABF02FD |
:10050000031C9A2A39088038BE0203188B2A01304E |
:10051000BF02031C9A2AFA0A031D9A2AF90A031D2C |
:100520009A2AF80A031D9A2AF70A0319A42AF80C32 |
:10053000F90CFA0C3508C0003908C006C01FA22A01 |
:10054000F817A82AF813A82AF701F801F901FA0107 |
:10055000080039080319192BC1003D080319192B8C |
:10056000C1070318BA2A7F30C102031C192B0319D3 |
:10057000192BBE2A8130C1070318192B4108F70037 |
:10058000F801F901FA013A08C500C5173B08C40093 |
:100590003C08C3001830C100C201431CE72A4008D0 |
:1005A000FA07031CD92AF90A031DD92AF80A0319E4 |
:1005B000C2173F08F907031CE02AF80A0319C217FB |
:1005C0003E08BB00BB173B08F8070318C217C20D53 |
:1005D000F80CF90CFA0CC50CC40CC30C0310C10BBD |
:1005E000CC2A0130F7070318192BF81BFE2AC50D7A |
:1005F000FA0DF90DF80DF7030319192BC51F0F2B71 |
:10060000FA0A031D0F2BF90A031D0F2BF80A031D0D |
:100610000F2BF80CF90CFA0CF70A0319192B3A08EE |
:10062000C2003E08C206C21F172BF8171D2BF81375 |
:100630001D2BF701F801F901FA0108008030831839 |
:10064000B506BA01BB013108B9003508B906300852 |
:1006500003190E2CB800F70034080319172CB80240 |
:100660000319B32B031C712B3508BE00BE173608C7 |
:10067000BD003708BC00BB010310BE0CBD0CBC0C98 |
:10068000BB0CB80B3B2BB91F482B3A142B2C3A1040 |
:1006900038103A16333084008313402C3A12B91BB9 |
:1006A0005B2B381C662BBE0CBD0CBC0CBB0CF70ABC |
:1006B0000319262C662BBE1B692B0310BB0DBC0D2A |
:1006C000BD0DBE0DF7030319262C5B2B3A17D32B58 |
:1006D0003A133108B900B91F6F2BBE171F2CBE1378 |
:1006E0001F2C3408B800F7003008B8023108BE00EB |
:1006F000BE173208BD003308BC00BB010310BE0C9E |
:10070000BD0CBC0CBB0CB80B7D2BB91F8A2BBA14CB |
:100710002B2CBA103810BA16373084008313402CB3 |
:10072000BA12B91B9D2B381CA82BBE0CBD0CBC0CDF |
:10073000BB0CF70A0319262CA82BBE1BAB2B0310EE |
:10074000BB0DBC0DBD0DBE0DF7030319262C9D2B53 |
:10075000BA17D32BBA133508B900B91FB12BBE177E |
:100760001F2CBE131F2C3508BE00BE173608BD0057 |
:100770003708BC00B91FC02BBE133A152B2C3A11F9 |
:10078000BB013810333084008313402CB91BE92B94 |
:100790003108B900381CD32BBE0CBD0CBC0CBB0CF3 |
:1007A000F70A0319262CBB1FE42BBC0A031DE42BFC |
:1007B000BD0A031DE42BBE0A031DE42BBE0CBD0CB9 |
:1007C000BC0CF70A0319262C3A1B682BBA1BAA2B60 |
:1007D000082C8030BE06BE1FF12B2B2C3508B9002B |
:1007E000FE2B3108B900BE08031DFE2BBD08031DFA |
:1007F000FE2BBC08031DFE2BF7011F2CBE1B082C73 |
:100800000310BB0DBC0DBD0DBE0DF70BFE2B262C32 |
:10081000B91F0C2CBE171F2CBE131F2C3408F70059 |
:100820003508BE003608BD003708BC001F2C300854 |
:10083000F7003108BE003208BD003308BC003E0896 |
:10084000F8003D08F9003C08FA005E2CF701F801B9 |
:10085000F901FA015E2CBB01BC09BD09BE09BB0947 |
:10086000BB0A031D392CBC0A031D392CBD0A031910 |
:10087000BE0A3A18472BBA18892B3A19BF2BEE2B10 |
:100880000008BC07031C4A2CBD0A031D4A2CBE0AE3 |
:100890000319381484030008BD07031C522CBE0A38 |
:1008A0000319381484030008801F803ABE07031818 |
:1008B00038143A1A4E2BBA1A902BC62B0800201661 |
:1008C00020088316870000008312A01520088316D5 |
:1008D000870000008312871D6B2C0712201220084E |
:1008E00083168700000083128711A0112008831649 |
:1008F000870080308312B0002C20E330B0002C2021 |
:10090000201220088316870000008312A0152008FB |
:10091000831687008312871D8B2C00008F2C00000C |
:100920002016200883168700000064308312B00070 |
:100930006921201620088316870000008312A01565 |
:100940002008831687000000831207122012200857 |
:1009500083168700000083128711A01120088316D8 |
:10096000870081308312B0002C200130F7007D21F8 |
:100970007808AB000130F7007D217808AC00F70162 |
:100980007D217808AD002012200883168700000022 |
:100990008312A0152008831687008312871DCE2C92 |
:1009A0000000D22C000020162008831687000000CB |
:1009B0008312AC0CAC0C3F30AC05B1012B08B0007D |
:1009C000B100B0012C0EF700F030F70577083007C2 |
:1009D000AE003108AF000318AF0A2F08B1002E088F |
:1009E000B000C2217708B0007808B1007908B200E1 |
:1009F0007A08B300B7007908B6007808B500770820 |
:100A0000B400BB01FF30BA007F30B9008E30B800AF |
:100A1000DF215230BC00B830BB002F30BA00863026 |
:100A2000B9007A08C0007908BF007808BE007708CE |
:100A3000BD00A92283106630B300B200BB30B10004 |
:100A40008430B0007A08B7007908B6007808B5009D |
:100A50007708B4001E238A150A12A8282016200839 |
:100A60008316870000008312A015200883168700D4 |
:100A7000000083120712201220088316870000004E |
:100A800083128711A01120088316870080308312FB |
:100A9000B0002C20E530B0002C206430B00069217B |
:100AA000201620088316870000008312A015200856 |
:100AB0008316870000008312871D5C2D0712201209 |
:100AC000200883168700000083128711A0112008D8 |
:100AD0008316870081308312B0002C200130F7008C |
:100AE0007D217808AB000130F7007D217808AC004B |
:100AF000F7017D217808AD002012200883168700B9 |
:100B000000008312A0152008831687008312871D1A |
:100B1000872D00008B2D00002016200883168700EB |
:100B200000008312AC0CAC0C3F30AC05B1012B08BB |
:100B3000B000B100B0012C0EF700F030F7057708D7 |
:100B40003007AE003108AF000318AF0A2F08B1001C |
:100B50002E08B000C2217708B0007808B1007908EB |
:100B6000B2007A08B300B7007908B6007808B5007B |
:100B70007708B400BB01FF30BA007F30B9008E3077 |
:100B8000B800DF21BC01BB017A30BA008530B90062 |
:100B90007A08C0007908BF007808BE007708BD0059 |
:100BA000A9228310B301B201C030B1008130B0007E |
:100BB0007A08B7007908B6007808B5007708B4005D |
:100BC0001E238A150A12B3282016200883168700D0 |
:100BD00000008312A01520088316870000008312EE |
:100BE0000712201220088316870000008312871145 |
:100BF000A01120088316870080308312B0002C20BB |
:100C0000E730B0002C202016200883168700000053 |
:100C10008312A01520088316870000008312871D09 |
:100C20000F2E07122012200883168700000083125F |
:100C30008711A01120088316870081308312B0002D |
:100C40002C20F7017D217808AC002C083A392B04C0 |
:100C5000AC00201620088316870000008312A01520 |
:100C600020088316870000008312871D352E071287 |
:100C70002012200883168700000083128711A0111C |
:100C800020088316870080308312B0002C20E630C5 |
:100C9000B0002C202C08B0002C2020122008831635 |
:100CA000870000008312A015200883168700831296 |
:100CB000871D582E00005C2E000020162008831689 |
:100CC000870000000A308312B00069212016200836 |
:100CD0008316870000008312A01520088316870062 |
:100CE00000008312071220122008831687000000DC |
:100CF00083128711A0112008831687008030831289 |
:100D0000B0002C20E730B0002C20201620088316DD |
:100D1000870000008312A0152008831687000000BA |
:100D20008312871D912E0712201220088316870038 |
:100D3000000083128711A0112008831687008130DC |
:100D40008312B0002C20F7017D217808AC002C081C |
:100D5000F8008A150A12C028F701F801F901FA0112 |
:100D6000C101C201C301C40140083F043E043D0467 |
:100D70000319EA2E2030C5000310B90DBA0DBB0DC2 |
:100D8000BC0DC10DC20DC30DC40D40084402031DAE |
:100D9000D32E3F084302031DD32E3E084202031DFB |
:100DA000D32E3D084102031CE42E3D08C1023E083B |
:100DB000031C3E0FC2023F08031C3F0FC302400842 |
:100DC000031C400FC4020314F70DF80DF90DFA0DC2 |
:100DD000C50BBC2E41308400831308000408B10009 |
:100DE0003008B30003190D2F2F08BC002E08BB00DC |
:100DF0002D08BA002C08B900C001BF012030BE0088 |
:100E00008230BD00A9227A08AF007908AE007808C8 |
:100E1000AD007708AC00B30BF42E2F08BC002E08F1 |
:100E2000BB002D08BA002C08B9003908B63CB9003F |
:100E3000FA013A08BD00BA170310BA0CBB0CBC0C7F |
:100E4000FA0CF90CF80CF70CB90B1C2FBD1F332F43 |
:100E5000F709F809F909FA09F70A0319F80A031951 |
:100E6000F90A0319FA0A7A08AF007908AE0078087F |
:100E7000AD007708AC00AF1F4A2FB103B116AC0923 |
:100E8000AD09AE09AF09AC0A0319AD0A0319AE0AE0 |
:100E90000319AF0A3B30B8009A30B700CA30B60029 |
:100EA000B5010A30B30030080319B10A2F08BC009D |
:100EB0002E08BB002D08BA002C08B9003808C00065 |
:100EC0003708BF003608BE003508BD00AC26000854 |
:100ED000AC00840A0008AD00840A0008AE00840A51 |
:100EE0000008AF00FD308407F708031D8A2F300A81 |
:100EF000330203198A2F310803198C2F0F3933025B |
:100F00000319842F0318BC2FB11BBC2F311B8C2F4E |
:100F10002030B82F2030B105B11E9A2FB112300801 |
:100F2000031DB1037708B1002D30B900AE203108A0 |
:100F3000F700B10130083302031DA82F7708B10074 |
:100F40002E30B900AE203108F7002030B105003056 |
:100F50003030B11EB82FB1123008031DB10377082D |
:100F6000B1002D30B900AE203108F700B1013030AA |
:100F7000F7077708B900AE203808BC003708BB0077 |
:100F80003608BA003508B900C001BF01BE010A30F9 |
:100F9000BD00AC267A08B8007908B7007808B6001A |
:100FA0007708B500B30B562F0800AD1BE72F0F30A5 |
:100FB000F7002C0EF7050A3077020318E22F3030C5 |
:100FC000F707E42F2D08F7077708B900AE200F3098 |
:100FD000AC050A302C020318EF2F3030F12FAD137F |
:0C0FE0002D08AC072C08B900AE2008005A |
:10100000840183131F308305713083168F000F080E |
:101010008312A01320088316870083128717831674 |
:1010200003170908C039890003131F129F120030EB |
:10103000031788008312870188018901FF30031399 |
:10104000A000A101831603170908C0398900031302 |
:101050001F129F12003003178800831203131F13FF |
:101060009F1383169F1383121F149412A01220083B |
:1010700083168700831220162008831687008312A8 |
:10108000A0112008831687000130831294000030DD |
:10109000831694000108C739083881008312900133 |
:1010A0000030F80092000030831692008312201561 |
:1010B0002008831687008312970183169B019C01E9 |
:1010C00001309D00831203178701880189018A116D |
:1010D000031376288A15043003178D0000308F0023 |
:1010E0008A110313D2288A151D3003178D00003092 |
:1010F0008F00031016300313AB008A111A218A15D2 |
:101100002530B9008A11AE208A15293003178D00C9 |
:1011100000308F00031005300313AB008A111A2131 |
:101120008A150230AB00FA30B0008A1169218A15A5 |
:10113000AB0B93282108633C031CA028A201A6281E |
:101140000430A2002108783C031CA1018A115F2C05 |
:101150008A157A08A6007908A5007808A4007708FF |
:10116000A3008A112E2D8A157A08AA007908A900F1 |
:101170007808A8007708A7002208AB008A11E42DA0 |
:101180008A157808AB00893084002608AF0025084E |
:10119000AE002408AD002308AC000230B0008A1174 |
:1011A000EE268A152030B9008A11AE208A158930C2 |
:1011B00084002A08AF002908AE002808AD002708DF |
:1011C000AC000230B0008A11EE268A152030B9003A |
:1011D0008A11AE208A152B08AC003730AD008A1179 |
:1011E000D5278A152030B9008A11AE208A15220829 |
:1011F000AC003730AD008A11D5278A152030B900F0 |
:101200008A11AE208A150D30B9008A11AE208A15D8 |
:101210000A30B9008A11AE208A15A10A0430AB0049 |
:10122000FA30B0008A1169218A15AB0B10299A286F |
:02123000630059 |
:04400E00F42CFF3F50 |
:00000001FF |
;PIC16F887 |
;CRC=38BC CREATED="15-V-13 22:58" |
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.lst |
---|
0,0 → 1,1328 |
CCS PCM C Compiler, Version 4.106, 47914 15-V-13 22:58 |
Filename: Z:\home\kaklik\svnMLAB\Modules\Sensors\SHT25V01A\SW\PIC16F887\main.lst |
ROM used: 2319 words (28%) |
Largest free fragment is 2048 |
RAM used: 17 (5%) at main() level |
43 (12%) 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) |
* |
0169: MOVLW 30 |
016A: MOVWF 04 |
016B: BCF 03.7 |
016C: MOVF 00,W |
016D: BTFSC 03.2 |
016E: GOTO 17C |
016F: MOVLW 02 |
0170: MOVWF 78 |
0171: CLRF 77 |
0172: DECFSZ 77,F |
0173: GOTO 172 |
0174: DECFSZ 78,F |
0175: GOTO 171 |
0176: MOVLW 97 |
0177: MOVWF 77 |
0178: DECFSZ 77,F |
0179: GOTO 178 |
017A: DECFSZ 00,F |
017B: GOTO 16F |
017C: RETURN |
.................... |
.................... #use i2c(master, sda=PIN_C4, scl=PIN_C3) |
* |
002C: MOVLW 08 |
002D: MOVWF 78 |
002E: NOP |
002F: BCF 07.3 |
0030: BCF 20.3 |
0031: MOVF 20,W |
0032: BSF 03.5 |
0033: MOVWF 07 |
0034: NOP |
0035: BCF 03.5 |
0036: RLF 30,F |
0037: BCF 07.4 |
0038: BTFSS 03.0 |
0039: GOTO 040 |
003A: BSF 20.4 |
003B: MOVF 20,W |
003C: BSF 03.5 |
003D: MOVWF 07 |
003E: GOTO 044 |
003F: BCF 03.5 |
0040: BCF 20.4 |
0041: MOVF 20,W |
0042: BSF 03.5 |
0043: MOVWF 07 |
0044: NOP |
0045: BCF 03.5 |
0046: BSF 20.3 |
0047: MOVF 20,W |
0048: BSF 03.5 |
0049: MOVWF 07 |
004A: BCF 03.5 |
004B: BTFSS 07.3 |
004C: GOTO 04B |
004D: DECFSZ 78,F |
004E: GOTO 02E |
004F: NOP |
0050: BCF 07.3 |
0051: BCF 20.3 |
0052: MOVF 20,W |
0053: BSF 03.5 |
0054: MOVWF 07 |
0055: NOP |
0056: BCF 03.5 |
0057: BSF 20.4 |
0058: MOVF 20,W |
0059: BSF 03.5 |
005A: MOVWF 07 |
005B: NOP |
005C: NOP |
005D: BCF 03.5 |
005E: BSF 20.3 |
005F: MOVF 20,W |
0060: BSF 03.5 |
0061: MOVWF 07 |
0062: BCF 03.5 |
0063: BTFSS 07.3 |
0064: GOTO 063 |
0065: CLRF 78 |
0066: NOP |
0067: BTFSC 07.4 |
0068: BSF 78.0 |
0069: BCF 07.3 |
006A: BCF 20.3 |
006B: MOVF 20,W |
006C: BSF 03.5 |
006D: MOVWF 07 |
006E: BCF 03.5 |
006F: BCF 07.4 |
0070: BCF 20.4 |
0071: MOVF 20,W |
0072: BSF 03.5 |
0073: MOVWF 07 |
0074: BCF 03.5 |
0075: RETURN |
* |
017D: MOVLW 08 |
017E: MOVWF 31 |
017F: MOVF 77,W |
0180: MOVWF 32 |
0181: BSF 20.4 |
0182: MOVF 20,W |
0183: BSF 03.5 |
0184: MOVWF 07 |
0185: NOP |
0186: BCF 03.5 |
0187: BSF 20.3 |
0188: MOVF 20,W |
0189: BSF 03.5 |
018A: MOVWF 07 |
018B: BCF 03.5 |
018C: BTFSS 07.3 |
018D: GOTO 18C |
018E: BTFSC 07.4 |
018F: BSF 03.0 |
0190: BTFSS 07.4 |
0191: BCF 03.0 |
0192: RLF 78,F |
0193: NOP |
0194: BCF 20.3 |
0195: MOVF 20,W |
0196: BSF 03.5 |
0197: MOVWF 07 |
0198: BCF 03.5 |
0199: BCF 07.3 |
019A: DECFSZ 31,F |
019B: GOTO 181 |
019C: BSF 20.4 |
019D: MOVF 20,W |
019E: BSF 03.5 |
019F: MOVWF 07 |
01A0: NOP |
01A1: BCF 03.5 |
01A2: BCF 07.4 |
01A3: MOVF 32,W |
01A4: BTFSC 03.2 |
01A5: GOTO 1AB |
01A6: BCF 20.4 |
01A7: MOVF 20,W |
01A8: BSF 03.5 |
01A9: MOVWF 07 |
01AA: BCF 03.5 |
01AB: NOP |
01AC: BSF 20.3 |
01AD: MOVF 20,W |
01AE: BSF 03.5 |
01AF: MOVWF 07 |
01B0: BCF 03.5 |
01B1: BTFSS 07.3 |
01B2: GOTO 1B1 |
01B3: NOP |
01B4: BCF 07.3 |
01B5: BCF 20.3 |
01B6: MOVF 20,W |
01B7: BSF 03.5 |
01B8: MOVWF 07 |
01B9: NOP |
01BA: BCF 03.5 |
01BB: BCF 07.4 |
01BC: BCF 20.4 |
01BD: MOVF 20,W |
01BE: BSF 03.5 |
01BF: MOVWF 07 |
01C0: BCF 03.5 |
01C1: RETURN |
.................... #use rs232(baud=9600,parity=N,xmit=PIN_C7,rcv=PIN_C6,bits=8) //rcv TXD xmit RXD |
* |
00AE: BCF 20.7 |
00AF: MOVF 20,W |
00B0: BSF 03.5 |
00B1: MOVWF 07 |
00B2: BCF 03.5 |
00B3: BCF 07.7 |
00B4: MOVLW 08 |
00B5: MOVWF 78 |
00B6: GOTO 0B7 |
00B7: NOP |
00B8: BSF 78.7 |
00B9: GOTO 0C8 |
00BA: BCF 78.7 |
00BB: RRF 39,F |
00BC: BTFSC 03.0 |
00BD: BSF 07.7 |
00BE: BTFSS 03.0 |
00BF: BCF 07.7 |
00C0: BSF 78.6 |
00C1: GOTO 0C8 |
00C2: BCF 78.6 |
00C3: DECFSZ 78,F |
00C4: GOTO 0BB |
00C5: GOTO 0C6 |
00C6: NOP |
00C7: BSF 07.7 |
00C8: MOVLW 3F |
00C9: MOVWF 04 |
00CA: DECFSZ 04,F |
00CB: GOTO 0CA |
00CC: NOP |
00CD: BTFSC 78.7 |
00CE: GOTO 0BA |
00CF: BTFSC 78.6 |
00D0: GOTO 0C2 |
00D1: 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 |
* |
0076: BSF 20.4 |
0077: MOVF 20,W |
0078: BSF 03.5 |
0079: MOVWF 07 |
007A: NOP |
007B: BCF 03.5 |
007C: BSF 20.3 |
007D: MOVF 20,W |
007E: BSF 03.5 |
007F: MOVWF 07 |
0080: NOP |
0081: BCF 03.5 |
0082: BCF 07.4 |
0083: BCF 20.4 |
0084: MOVF 20,W |
0085: BSF 03.5 |
0086: MOVWF 07 |
0087: NOP |
0088: BCF 03.5 |
0089: BCF 07.3 |
008A: BCF 20.3 |
008B: MOVF 20,W |
008C: BSF 03.5 |
008D: MOVWF 07 |
.................... i2c_write(0x80); // Device address |
008E: MOVLW 80 |
008F: BCF 03.5 |
0090: MOVWF 30 |
0091: CALL 02C |
.................... i2c_write(0xFE); // Device command |
0092: MOVLW FE |
0093: MOVWF 30 |
0094: CALL 02C |
.................... i2c_stop(); // Stop condition |
0095: BCF 20.4 |
0096: MOVF 20,W |
0097: BSF 03.5 |
0098: MOVWF 07 |
0099: NOP |
009A: BCF 03.5 |
009B: BSF 20.3 |
009C: MOVF 20,W |
009D: BSF 03.5 |
009E: MOVWF 07 |
009F: BCF 03.5 |
00A0: BTFSS 07.3 |
00A1: GOTO 0A0 |
00A2: NOP |
00A3: GOTO 0A4 |
00A4: NOP |
00A5: BSF 20.4 |
00A6: MOVF 20,W |
00A7: BSF 03.5 |
00A8: MOVWF 07 |
00A9: NOP |
.................... } |
00AA: BCF 03.5 |
00AB: BSF 0A.3 |
00AC: BCF 0A.4 |
00AD: GOTO 06A (RETURN) |
.................... |
.................... unsigned int8 SHT25_setup(unsigned int8 setup_reg ) // writes to status register and returns its value |
.................... { |
.................... unsigned int8 reg; |
.................... |
.................... i2c_start(); // Start condition |
* |
05E4: BSF 20.4 |
05E5: MOVF 20,W |
05E6: BSF 03.5 |
05E7: MOVWF 07 |
05E8: NOP |
05E9: BCF 03.5 |
05EA: BSF 20.3 |
05EB: MOVF 20,W |
05EC: BSF 03.5 |
05ED: MOVWF 07 |
05EE: NOP |
05EF: BCF 03.5 |
05F0: BCF 07.4 |
05F1: BCF 20.4 |
05F2: MOVF 20,W |
05F3: BSF 03.5 |
05F4: MOVWF 07 |
05F5: NOP |
05F6: BCF 03.5 |
05F7: BCF 07.3 |
05F8: BCF 20.3 |
05F9: MOVF 20,W |
05FA: BSF 03.5 |
05FB: MOVWF 07 |
.................... i2c_write(SHT25_ADDR); // Device address |
05FC: MOVLW 80 |
05FD: BCF 03.5 |
05FE: MOVWF 30 |
05FF: CALL 02C |
.................... i2c_write(0xE7); // Device command |
0600: MOVLW E7 |
0601: MOVWF 30 |
0602: CALL 02C |
.................... |
.................... i2c_start(); // Start condition |
0603: BSF 20.4 |
0604: MOVF 20,W |
0605: BSF 03.5 |
0606: MOVWF 07 |
0607: NOP |
0608: BCF 03.5 |
0609: BSF 20.3 |
060A: MOVF 20,W |
060B: BSF 03.5 |
060C: MOVWF 07 |
060D: NOP |
060E: BCF 03.5 |
060F: BTFSS 07.3 |
0610: GOTO 60F |
0611: BCF 07.4 |
0612: BCF 20.4 |
0613: MOVF 20,W |
0614: BSF 03.5 |
0615: MOVWF 07 |
0616: NOP |
0617: BCF 03.5 |
0618: BCF 07.3 |
0619: BCF 20.3 |
061A: MOVF 20,W |
061B: BSF 03.5 |
061C: MOVWF 07 |
.................... i2c_write(SHT25_ADDR+1); // Device address |
061D: MOVLW 81 |
061E: BCF 03.5 |
061F: MOVWF 30 |
0620: CALL 02C |
.................... reg=i2c_read(0); // Read status actual status register |
0621: CLRF 77 |
0622: CALL 17D |
0623: MOVF 78,W |
0624: MOVWF 2C |
.................... |
.................... reg = (reg & 0x3A) | setup_reg; |
0625: MOVF 2C,W |
0626: ANDLW 3A |
0627: IORWF 2B,W |
0628: MOVWF 2C |
.................... |
.................... i2c_start(); // Start condition |
0629: BSF 20.4 |
062A: MOVF 20,W |
062B: BSF 03.5 |
062C: MOVWF 07 |
062D: NOP |
062E: BCF 03.5 |
062F: BSF 20.3 |
0630: MOVF 20,W |
0631: BSF 03.5 |
0632: MOVWF 07 |
0633: NOP |
0634: BCF 03.5 |
0635: BTFSS 07.3 |
0636: GOTO 635 |
0637: BCF 07.4 |
0638: BCF 20.4 |
0639: MOVF 20,W |
063A: BSF 03.5 |
063B: MOVWF 07 |
063C: NOP |
063D: BCF 03.5 |
063E: BCF 07.3 |
063F: BCF 20.3 |
0640: MOVF 20,W |
0641: BSF 03.5 |
0642: MOVWF 07 |
.................... i2c_write(SHT25_ADDR); // Device address |
0643: MOVLW 80 |
0644: BCF 03.5 |
0645: MOVWF 30 |
0646: CALL 02C |
.................... i2c_write(0xE6); // Write to status register |
0647: MOVLW E6 |
0648: MOVWF 30 |
0649: CALL 02C |
.................... i2c_write(reg); // Device command |
064A: MOVF 2C,W |
064B: MOVWF 30 |
064C: CALL 02C |
.................... i2c_stop(); // Stop condition |
064D: BCF 20.4 |
064E: MOVF 20,W |
064F: BSF 03.5 |
0650: MOVWF 07 |
0651: NOP |
0652: BCF 03.5 |
0653: BSF 20.3 |
0654: MOVF 20,W |
0655: BSF 03.5 |
0656: MOVWF 07 |
0657: BCF 03.5 |
0658: BTFSS 07.3 |
0659: GOTO 658 |
065A: NOP |
065B: GOTO 65C |
065C: NOP |
065D: BSF 20.4 |
065E: MOVF 20,W |
065F: BSF 03.5 |
0660: MOVWF 07 |
0661: NOP |
.................... |
.................... delay_ms(10); |
0662: MOVLW 0A |
0663: BCF 03.5 |
0664: MOVWF 30 |
0665: CALL 169 |
.................... |
.................... i2c_start(); // Start condition |
0666: BSF 20.4 |
0667: MOVF 20,W |
0668: BSF 03.5 |
0669: MOVWF 07 |
066A: NOP |
066B: BCF 03.5 |
066C: BSF 20.3 |
066D: MOVF 20,W |
066E: BSF 03.5 |
066F: MOVWF 07 |
0670: NOP |
0671: BCF 03.5 |
0672: BCF 07.4 |
0673: BCF 20.4 |
0674: MOVF 20,W |
0675: BSF 03.5 |
0676: MOVWF 07 |
0677: NOP |
0678: BCF 03.5 |
0679: BCF 07.3 |
067A: BCF 20.3 |
067B: MOVF 20,W |
067C: BSF 03.5 |
067D: MOVWF 07 |
.................... i2c_write(SHT25_ADDR); // Device address |
067E: MOVLW 80 |
067F: BCF 03.5 |
0680: MOVWF 30 |
0681: CALL 02C |
.................... i2c_write(0xE7); // Device command |
0682: MOVLW E7 |
0683: MOVWF 30 |
0684: CALL 02C |
.................... |
.................... i2c_start(); // Start condition |
0685: BSF 20.4 |
0686: MOVF 20,W |
0687: BSF 03.5 |
0688: MOVWF 07 |
0689: NOP |
068A: BCF 03.5 |
068B: BSF 20.3 |
068C: MOVF 20,W |
068D: BSF 03.5 |
068E: MOVWF 07 |
068F: NOP |
0690: BCF 03.5 |
0691: BTFSS 07.3 |
0692: GOTO 691 |
0693: BCF 07.4 |
0694: BCF 20.4 |
0695: MOVF 20,W |
0696: BSF 03.5 |
0697: MOVWF 07 |
0698: NOP |
0699: BCF 03.5 |
069A: BCF 07.3 |
069B: BCF 20.3 |
069C: MOVF 20,W |
069D: BSF 03.5 |
069E: MOVWF 07 |
.................... i2c_write(SHT25_ADDR+1); // Device address |
069F: MOVLW 81 |
06A0: BCF 03.5 |
06A1: MOVWF 30 |
06A2: CALL 02C |
.................... reg=i2c_read(0); // Read status actual status register |
06A3: CLRF 77 |
06A4: CALL 17D |
06A5: MOVF 78,W |
06A6: MOVWF 2C |
.................... |
.................... return (reg); |
06A7: MOVF 2C,W |
06A8: MOVWF 78 |
.................... } |
06A9: BSF 0A.3 |
06AA: BCF 0A.4 |
06AB: GOTO 0C0 (RETURN) |
.................... |
.................... |
.................... float SHT25_get_temp() |
.................... { |
.................... unsigned int8 MSB, LSB, Check; |
.................... unsigned int16 data; |
.................... |
.................... i2c_start(); |
* |
045F: BSF 20.4 |
0460: MOVF 20,W |
0461: BSF 03.5 |
0462: MOVWF 07 |
0463: NOP |
0464: BCF 03.5 |
0465: BSF 20.3 |
0466: MOVF 20,W |
0467: BSF 03.5 |
0468: MOVWF 07 |
0469: NOP |
046A: BCF 03.5 |
046B: BTFSS 07.3 |
046C: GOTO 46B |
046D: BCF 07.4 |
046E: BCF 20.4 |
046F: MOVF 20,W |
0470: BSF 03.5 |
0471: MOVWF 07 |
0472: NOP |
0473: BCF 03.5 |
0474: BCF 07.3 |
0475: BCF 20.3 |
0476: MOVF 20,W |
0477: BSF 03.5 |
0478: MOVWF 07 |
.................... I2C_Write(SHT25_ADDR); |
0479: MOVLW 80 |
047A: BCF 03.5 |
047B: MOVWF 30 |
047C: CALL 02C |
.................... I2C_write(0xE3); |
047D: MOVLW E3 |
047E: MOVWF 30 |
047F: CALL 02C |
.................... i2c_stop(); |
0480: BCF 20.4 |
0481: MOVF 20,W |
0482: BSF 03.5 |
0483: MOVWF 07 |
0484: NOP |
0485: BCF 03.5 |
0486: BSF 20.3 |
0487: MOVF 20,W |
0488: BSF 03.5 |
0489: MOVWF 07 |
048A: BCF 03.5 |
048B: BTFSS 07.3 |
048C: GOTO 48B |
048D: NOP |
048E: GOTO 48F |
048F: NOP |
0490: BSF 20.4 |
0491: MOVF 20,W |
0492: BSF 03.5 |
0493: MOVWF 07 |
0494: NOP |
.................... |
.................... delay_ms(100); |
0495: MOVLW 64 |
0496: BCF 03.5 |
0497: MOVWF 30 |
0498: CALL 169 |
.................... |
.................... i2c_start(); |
0499: BSF 20.4 |
049A: MOVF 20,W |
049B: BSF 03.5 |
049C: MOVWF 07 |
049D: NOP |
049E: BCF 03.5 |
049F: BSF 20.3 |
04A0: MOVF 20,W |
04A1: BSF 03.5 |
04A2: MOVWF 07 |
04A3: NOP |
04A4: BCF 03.5 |
04A5: BCF 07.4 |
04A6: BCF 20.4 |
04A7: MOVF 20,W |
04A8: BSF 03.5 |
04A9: MOVWF 07 |
04AA: NOP |
04AB: BCF 03.5 |
04AC: BCF 07.3 |
04AD: BCF 20.3 |
04AE: MOVF 20,W |
04AF: BSF 03.5 |
04B0: MOVWF 07 |
.................... I2C_Write(SHT25_ADDR+1); |
04B1: MOVLW 81 |
04B2: BCF 03.5 |
04B3: MOVWF 30 |
04B4: CALL 02C |
.................... MSB=i2c_read(1); |
04B5: MOVLW 01 |
04B6: MOVWF 77 |
04B7: CALL 17D |
04B8: MOVF 78,W |
04B9: MOVWF 2B |
.................... LSB=i2c_read(1); |
04BA: MOVLW 01 |
04BB: MOVWF 77 |
04BC: CALL 17D |
04BD: MOVF 78,W |
04BE: MOVWF 2C |
.................... Check=i2c_read(0); |
04BF: CLRF 77 |
04C0: CALL 17D |
04C1: MOVF 78,W |
04C2: MOVWF 2D |
.................... i2c_stop(); |
04C3: BCF 20.4 |
04C4: MOVF 20,W |
04C5: BSF 03.5 |
04C6: MOVWF 07 |
04C7: NOP |
04C8: BCF 03.5 |
04C9: BSF 20.3 |
04CA: MOVF 20,W |
04CB: BSF 03.5 |
04CC: MOVWF 07 |
04CD: BCF 03.5 |
04CE: BTFSS 07.3 |
04CF: GOTO 4CE |
04D0: NOP |
04D1: GOTO 4D2 |
04D2: NOP |
04D3: BSF 20.4 |
04D4: MOVF 20,W |
04D5: BSF 03.5 |
04D6: MOVWF 07 |
04D7: NOP |
.................... |
.................... LSB = LSB >> 2; // trow out status bits |
04D8: BCF 03.5 |
04D9: RRF 2C,F |
04DA: RRF 2C,F |
04DB: MOVLW 3F |
04DC: ANDWF 2C,F |
.................... |
.................... data = (((unsigned int16) MSB << 8) + (LSB << 4)); |
04DD: CLRF 31 |
04DE: MOVF 2B,W |
04DF: MOVWF 30 |
04E0: MOVWF 31 |
04E1: CLRF 30 |
04E2: SWAPF 2C,W |
04E3: MOVWF 77 |
04E4: MOVLW F0 |
04E5: ANDWF 77,F |
04E6: MOVF 77,W |
04E7: ADDWF 30,W |
04E8: MOVWF 2E |
04E9: MOVF 31,W |
04EA: MOVWF 2F |
04EB: BTFSC 03.0 |
04EC: INCF 2F,F |
.................... return(-46.85 + 175.72*((float)data/0xFFFF)); |
04ED: MOVF 2F,W |
04EE: MOVWF 31 |
04EF: MOVF 2E,W |
04F0: MOVWF 30 |
04F1: CALL 1C2 |
04F2: MOVF 77,W |
04F3: MOVWF 30 |
04F4: MOVF 78,W |
04F5: MOVWF 31 |
04F6: MOVF 79,W |
04F7: MOVWF 32 |
04F8: MOVF 7A,W |
04F9: MOVWF 33 |
04FA: MOVWF 37 |
04FB: MOVF 79,W |
04FC: MOVWF 36 |
04FD: MOVF 78,W |
04FE: MOVWF 35 |
04FF: MOVF 77,W |
0500: MOVWF 34 |
0501: CLRF 3B |
0502: MOVLW FF |
0503: MOVWF 3A |
0504: MOVLW 7F |
0505: MOVWF 39 |
0506: MOVLW 8E |
0507: MOVWF 38 |
0508: CALL 1DF |
0509: MOVLW 52 |
050A: MOVWF 3C |
050B: MOVLW B8 |
050C: MOVWF 3B |
050D: MOVLW 2F |
050E: MOVWF 3A |
050F: MOVLW 86 |
0510: MOVWF 39 |
0511: MOVF 7A,W |
0512: MOVWF 40 |
0513: MOVF 79,W |
0514: MOVWF 3F |
0515: MOVF 78,W |
0516: MOVWF 3E |
0517: MOVF 77,W |
0518: MOVWF 3D |
0519: CALL 2A9 |
051A: BCF 03.1 |
051B: MOVLW 66 |
051C: MOVWF 33 |
051D: MOVWF 32 |
051E: MOVLW BB |
051F: MOVWF 31 |
0520: MOVLW 84 |
0521: MOVWF 30 |
0522: MOVF 7A,W |
0523: MOVWF 37 |
0524: MOVF 79,W |
0525: MOVWF 36 |
0526: MOVF 78,W |
0527: MOVWF 35 |
0528: MOVF 77,W |
0529: MOVWF 34 |
052A: CALL 31E |
.................... } |
052B: BSF 0A.3 |
052C: BCF 0A.4 |
052D: GOTO 0A8 (RETURN) |
.................... |
.................... float SHT25_get_hum() |
.................... { |
.................... unsigned int8 MSB, LSB, Check; |
.................... unsigned int16 data; |
.................... |
.................... i2c_start(); //RH |
052E: BSF 20.4 |
052F: MOVF 20,W |
0530: BSF 03.5 |
0531: MOVWF 07 |
0532: NOP |
0533: BCF 03.5 |
0534: BSF 20.3 |
0535: MOVF 20,W |
0536: BSF 03.5 |
0537: MOVWF 07 |
0538: NOP |
0539: BCF 03.5 |
053A: BCF 07.4 |
053B: BCF 20.4 |
053C: MOVF 20,W |
053D: BSF 03.5 |
053E: MOVWF 07 |
053F: NOP |
0540: BCF 03.5 |
0541: BCF 07.3 |
0542: BCF 20.3 |
0543: MOVF 20,W |
0544: BSF 03.5 |
0545: MOVWF 07 |
.................... I2C_Write(SHT25_ADDR); |
0546: MOVLW 80 |
0547: BCF 03.5 |
0548: MOVWF 30 |
0549: CALL 02C |
.................... I2C_write(0xE5); |
054A: MOVLW E5 |
054B: MOVWF 30 |
054C: CALL 02C |
.................... |
.................... delay_ms(100); |
054D: MOVLW 64 |
054E: MOVWF 30 |
054F: CALL 169 |
.................... |
.................... i2c_start(); |
0550: BSF 20.4 |
0551: MOVF 20,W |
0552: BSF 03.5 |
0553: MOVWF 07 |
0554: NOP |
0555: BCF 03.5 |
0556: BSF 20.3 |
0557: MOVF 20,W |
0558: BSF 03.5 |
0559: MOVWF 07 |
055A: NOP |
055B: BCF 03.5 |
055C: BTFSS 07.3 |
055D: GOTO 55C |
055E: BCF 07.4 |
055F: BCF 20.4 |
0560: MOVF 20,W |
0561: BSF 03.5 |
0562: MOVWF 07 |
0563: NOP |
0564: BCF 03.5 |
0565: BCF 07.3 |
0566: BCF 20.3 |
0567: MOVF 20,W |
0568: BSF 03.5 |
0569: MOVWF 07 |
.................... I2C_Write(SHT25_ADDR+1); |
056A: MOVLW 81 |
056B: BCF 03.5 |
056C: MOVWF 30 |
056D: CALL 02C |
.................... MSB=i2c_read(1); |
056E: MOVLW 01 |
056F: MOVWF 77 |
0570: CALL 17D |
0571: MOVF 78,W |
0572: MOVWF 2B |
.................... LSB=i2c_read(1); |
0573: MOVLW 01 |
0574: MOVWF 77 |
0575: CALL 17D |
0576: MOVF 78,W |
0577: MOVWF 2C |
.................... Check=i2c_read(0); |
0578: CLRF 77 |
0579: CALL 17D |
057A: MOVF 78,W |
057B: MOVWF 2D |
.................... i2c_stop(); |
057C: BCF 20.4 |
057D: MOVF 20,W |
057E: BSF 03.5 |
057F: MOVWF 07 |
0580: NOP |
0581: BCF 03.5 |
0582: BSF 20.3 |
0583: MOVF 20,W |
0584: BSF 03.5 |
0585: MOVWF 07 |
0586: BCF 03.5 |
0587: BTFSS 07.3 |
0588: GOTO 587 |
0589: NOP |
058A: GOTO 58B |
058B: NOP |
058C: BSF 20.4 |
058D: MOVF 20,W |
058E: BSF 03.5 |
058F: MOVWF 07 |
0590: NOP |
.................... |
.................... LSB = LSB >> 2; // trow out status bits |
0591: BCF 03.5 |
0592: RRF 2C,F |
0593: RRF 2C,F |
0594: MOVLW 3F |
0595: ANDWF 2C,F |
.................... |
.................... data = (((unsigned int16) MSB << 8) + (LSB << 4) ); |
0596: CLRF 31 |
0597: MOVF 2B,W |
0598: MOVWF 30 |
0599: MOVWF 31 |
059A: CLRF 30 |
059B: SWAPF 2C,W |
059C: MOVWF 77 |
059D: MOVLW F0 |
059E: ANDWF 77,F |
059F: MOVF 77,W |
05A0: ADDWF 30,W |
05A1: MOVWF 2E |
05A2: MOVF 31,W |
05A3: MOVWF 2F |
05A4: BTFSC 03.0 |
05A5: INCF 2F,F |
.................... return( -6.0 + 125.0*((float)data/0xFFFF)); |
05A6: MOVF 2F,W |
05A7: MOVWF 31 |
05A8: MOVF 2E,W |
05A9: MOVWF 30 |
05AA: CALL 1C2 |
05AB: MOVF 77,W |
05AC: MOVWF 30 |
05AD: MOVF 78,W |
05AE: MOVWF 31 |
05AF: MOVF 79,W |
05B0: MOVWF 32 |
05B1: MOVF 7A,W |
05B2: MOVWF 33 |
05B3: MOVWF 37 |
05B4: MOVF 79,W |
05B5: MOVWF 36 |
05B6: MOVF 78,W |
05B7: MOVWF 35 |
05B8: MOVF 77,W |
05B9: MOVWF 34 |
05BA: CLRF 3B |
05BB: MOVLW FF |
05BC: MOVWF 3A |
05BD: MOVLW 7F |
05BE: MOVWF 39 |
05BF: MOVLW 8E |
05C0: MOVWF 38 |
05C1: CALL 1DF |
05C2: CLRF 3C |
05C3: CLRF 3B |
05C4: MOVLW 7A |
05C5: MOVWF 3A |
05C6: MOVLW 85 |
05C7: MOVWF 39 |
05C8: MOVF 7A,W |
05C9: MOVWF 40 |
05CA: MOVF 79,W |
05CB: MOVWF 3F |
05CC: MOVF 78,W |
05CD: MOVWF 3E |
05CE: MOVF 77,W |
05CF: MOVWF 3D |
05D0: CALL 2A9 |
05D1: BCF 03.1 |
05D2: CLRF 33 |
05D3: CLRF 32 |
05D4: MOVLW C0 |
05D5: MOVWF 31 |
05D6: MOVLW 81 |
05D7: MOVWF 30 |
05D8: MOVF 7A,W |
05D9: MOVWF 37 |
05DA: MOVF 79,W |
05DB: MOVWF 36 |
05DC: MOVF 78,W |
05DD: MOVWF 35 |
05DE: MOVF 77,W |
05DF: MOVWF 34 |
05E0: CALL 31E |
.................... } |
05E1: BSF 0A.3 |
05E2: BCF 0A.4 |
05E3: GOTO 0B3 (RETURN) |
.................... |
.................... |
.................... |
.................... |
.................... |
.................... void main() |
.................... { |
* |
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 03.5 |
0809: BCF 20.7 |
080A: MOVF 20,W |
080B: BSF 03.5 |
080C: MOVWF 07 |
080D: BCF 03.5 |
080E: BSF 07.7 |
080F: BSF 03.5 |
0810: BSF 03.6 |
0811: MOVF 09,W |
0812: ANDLW C0 |
0813: MOVWF 09 |
0814: BCF 03.6 |
0815: BCF 1F.4 |
0816: BCF 1F.5 |
0817: MOVLW 00 |
0818: BSF 03.6 |
0819: MOVWF 08 |
081A: BCF 03.5 |
081B: CLRF 07 |
081C: CLRF 08 |
081D: CLRF 09 |
* |
0821: CLRF 21 |
.................... unsigned int8 i=0, sht_config; |
.................... float temperature, humidity; |
.................... |
.................... setup_adc_ports(NO_ANALOGS|VSS_VDD); |
0822: BSF 03.5 |
0823: BSF 03.6 |
0824: MOVF 09,W |
0825: ANDLW C0 |
0826: MOVWF 09 |
0827: BCF 03.6 |
0828: BCF 1F.4 |
0829: BCF 1F.5 |
082A: MOVLW 00 |
082B: BSF 03.6 |
082C: MOVWF 08 |
.................... setup_adc(ADC_CLOCK_DIV_2); |
082D: BCF 03.5 |
082E: BCF 03.6 |
082F: BCF 1F.6 |
0830: BCF 1F.7 |
0831: BSF 03.5 |
0832: BCF 1F.7 |
0833: BCF 03.5 |
0834: BSF 1F.0 |
.................... setup_spi(SPI_SS_DISABLED); |
0835: BCF 14.5 |
0836: BCF 20.5 |
0837: MOVF 20,W |
0838: BSF 03.5 |
0839: MOVWF 07 |
083A: BCF 03.5 |
083B: BSF 20.4 |
083C: MOVF 20,W |
083D: BSF 03.5 |
083E: MOVWF 07 |
083F: BCF 03.5 |
0840: BCF 20.3 |
0841: MOVF 20,W |
0842: BSF 03.5 |
0843: MOVWF 07 |
0844: MOVLW 01 |
0845: BCF 03.5 |
0846: MOVWF 14 |
0847: MOVLW 00 |
0848: BSF 03.5 |
0849: MOVWF 14 |
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); |
084A: MOVF 01,W |
084B: ANDLW C7 |
084C: IORLW 08 |
084D: MOVWF 01 |
.................... setup_timer_1(T1_DISABLED); |
084E: BCF 03.5 |
084F: CLRF 10 |
.................... setup_timer_2(T2_DISABLED,0,1); |
0850: MOVLW 00 |
0851: MOVWF 78 |
0852: MOVWF 12 |
0853: MOVLW 00 |
0854: BSF 03.5 |
0855: MOVWF 12 |
.................... setup_ccp1(CCP_OFF); |
0856: BCF 03.5 |
0857: BSF 20.2 |
0858: MOVF 20,W |
0859: BSF 03.5 |
085A: MOVWF 07 |
085B: BCF 03.5 |
085C: CLRF 17 |
085D: BSF 03.5 |
085E: CLRF 1B |
085F: CLRF 1C |
0860: MOVLW 01 |
0861: MOVWF 1D |
.................... setup_comparator(NC_NC_NC_NC); |
0862: BCF 03.5 |
0863: BSF 03.6 |
0864: CLRF 07 |
0865: CLRF 08 |
0866: CLRF 09 |
.................... |
.................... SHT25_soft_reset(); |
0867: BCF 0A.3 |
0868: BCF 03.6 |
0869: GOTO 076 |
086A: BSF 0A.3 |
.................... printf("SHT25 humidity and temperature sensor example \r\n",); |
086B: MOVLW 04 |
086C: BSF 03.6 |
086D: MOVWF 0D |
086E: MOVLW 00 |
086F: MOVWF 0F |
0870: BCF 0A.3 |
0871: BCF 03.6 |
0872: GOTO 0D2 |
0873: BSF 0A.3 |
.................... printf("Temperature Humidity[%%] \r\n"); |
0874: MOVLW 1D |
0875: BSF 03.6 |
0876: MOVWF 0D |
0877: MOVLW 00 |
0878: MOVWF 0F |
0879: BCF 03.0 |
087A: MOVLW 16 |
087B: BCF 03.6 |
087C: MOVWF 2B |
087D: BCF 0A.3 |
087E: CALL 11A |
087F: BSF 0A.3 |
0880: MOVLW 25 |
0881: MOVWF 39 |
0882: BCF 0A.3 |
0883: CALL 0AE |
0884: BSF 0A.3 |
0885: MOVLW 29 |
0886: BSF 03.6 |
0887: MOVWF 0D |
0888: MOVLW 00 |
0889: MOVWF 0F |
088A: BCF 03.0 |
088B: MOVLW 05 |
088C: BCF 03.6 |
088D: MOVWF 2B |
088E: BCF 0A.3 |
088F: CALL 11A |
0890: BSF 0A.3 |
.................... delay_ms (500); |
0891: MOVLW 02 |
0892: MOVWF 2B |
0893: MOVLW FA |
0894: MOVWF 30 |
0895: BCF 0A.3 |
0896: CALL 169 |
0897: BSF 0A.3 |
0898: DECFSZ 2B,F |
0899: GOTO 093 |
.................... |
.................... |
.................... while(TRUE) |
.................... { |
.................... if (i<100) sht_config = SHT25_RH12_T14 | SHT25_HEATER_OFF; // loop alters on chip heater on and off to check correct function |
089A: MOVF 21,W |
089B: SUBLW 63 |
089C: BTFSS 03.0 |
089D: GOTO 0A0 |
089E: CLRF 22 |
.................... else |
089F: GOTO 0A6 |
.................... { |
.................... sht_config = SHT25_RH12_T14 | SHT25_HEATER_ON; |
08A0: MOVLW 04 |
08A1: MOVWF 22 |
.................... if (i > 120) i = 0; |
08A2: MOVF 21,W |
08A3: SUBLW 78 |
08A4: BTFSS 03.0 |
08A5: CLRF 21 |
.................... } |
.................... |
.................... temperature = SHT25_get_temp(); |
08A6: BCF 0A.3 |
08A7: GOTO 45F |
08A8: BSF 0A.3 |
08A9: MOVF 7A,W |
08AA: MOVWF 26 |
08AB: MOVF 79,W |
08AC: MOVWF 25 |
08AD: MOVF 78,W |
08AE: MOVWF 24 |
08AF: MOVF 77,W |
08B0: MOVWF 23 |
.................... humidity = SHT25_get_hum(); |
08B1: BCF 0A.3 |
08B2: GOTO 52E |
08B3: BSF 0A.3 |
08B4: MOVF 7A,W |
08B5: MOVWF 2A |
08B6: MOVF 79,W |
08B7: MOVWF 29 |
08B8: MOVF 78,W |
08B9: MOVWF 28 |
08BA: MOVF 77,W |
08BB: MOVWF 27 |
.................... |
.................... printf("%f %f %X %X \r\n",temperature, humidity, SHT25_setup(sht_config),sht_config); |
08BC: MOVF 22,W |
08BD: MOVWF 2B |
08BE: BCF 0A.3 |
08BF: GOTO 5E4 |
08C0: BSF 0A.3 |
08C1: MOVF 78,W |
08C2: MOVWF 2B |
08C3: MOVLW 89 |
08C4: MOVWF 04 |
08C5: MOVF 26,W |
08C6: MOVWF 2F |
08C7: MOVF 25,W |
08C8: MOVWF 2E |
08C9: MOVF 24,W |
08CA: MOVWF 2D |
08CB: MOVF 23,W |
08CC: MOVWF 2C |
08CD: MOVLW 02 |
08CE: MOVWF 30 |
08CF: BCF 0A.3 |
08D0: CALL 6EE |
08D1: BSF 0A.3 |
08D2: MOVLW 20 |
08D3: MOVWF 39 |
08D4: BCF 0A.3 |
08D5: CALL 0AE |
08D6: BSF 0A.3 |
08D7: MOVLW 89 |
08D8: MOVWF 04 |
08D9: MOVF 2A,W |
08DA: MOVWF 2F |
08DB: MOVF 29,W |
08DC: MOVWF 2E |
08DD: MOVF 28,W |
08DE: MOVWF 2D |
08DF: MOVF 27,W |
08E0: MOVWF 2C |
08E1: MOVLW 02 |
08E2: MOVWF 30 |
08E3: BCF 0A.3 |
08E4: CALL 6EE |
08E5: BSF 0A.3 |
08E6: MOVLW 20 |
08E7: MOVWF 39 |
08E8: BCF 0A.3 |
08E9: CALL 0AE |
08EA: BSF 0A.3 |
08EB: MOVF 2B,W |
08EC: MOVWF 2C |
08ED: MOVLW 37 |
08EE: MOVWF 2D |
08EF: BCF 0A.3 |
08F0: CALL 7D5 |
08F1: BSF 0A.3 |
08F2: MOVLW 20 |
08F3: MOVWF 39 |
08F4: BCF 0A.3 |
08F5: CALL 0AE |
08F6: BSF 0A.3 |
08F7: MOVF 22,W |
08F8: MOVWF 2C |
08F9: MOVLW 37 |
08FA: MOVWF 2D |
08FB: BCF 0A.3 |
08FC: CALL 7D5 |
08FD: BSF 0A.3 |
08FE: MOVLW 20 |
08FF: MOVWF 39 |
0900: BCF 0A.3 |
0901: CALL 0AE |
0902: BSF 0A.3 |
0903: MOVLW 0D |
0904: MOVWF 39 |
0905: BCF 0A.3 |
0906: CALL 0AE |
0907: BSF 0A.3 |
0908: MOVLW 0A |
0909: MOVWF 39 |
090A: BCF 0A.3 |
090B: CALL 0AE |
090C: BSF 0A.3 |
.................... i++; |
090D: INCF 21,F |
.................... delay_ms(1000); |
090E: MOVLW 04 |
090F: MOVWF 2B |
0910: MOVLW FA |
0911: MOVWF 30 |
0912: BCF 0A.3 |
0913: CALL 169 |
0914: BSF 0A.3 |
0915: DECFSZ 2B,F |
0916: GOTO 110 |
.................... } |
0917: GOTO 09A |
.................... } |
.................... |
0918: 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 (x86)\PICC\devices\16F887.h |
4=SHT25.h |
5=SHT25.c |
6= |
[Target Data] |
OptionString=-p +FM |
FileList=Z:\home\kaklik\svnMLAB\Modules\Sensors\SHT25V01A\SW\PIC16F887\main.c |
[Units] |
Count=1 |
1=main (main) |
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.sta |
---|
0,0 → 1,68 |
ROM used: 2319 (28%) |
2329 (28%) including unused fragments |
4 Average locations per line |
31 Average locations per statement |
RAM used: 17 (5%) at main() level |
43 (12%) worst case |
Stack used: 2 worst case (out of 8 total available) |
Lines Stmts % Files |
----- ----- --- ----- |
46 25 33 main.c |
23 0 0 main.h |
423 0 0 C:\Program Files (x86)\PICC\devices\16F887.h |
14 0 0 SHT25.h |
92 51 67 SHT25.c |
----- ----- |
598 76 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 36 2 1 @PUTCHAR_1_ |
0 56 2 0 55 1.1 SHT25_soft_reset |
0 200 9 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 281 12 11 840 5.7 MAIN |
0 25 1 0 @const107 |
0 72 3 3 @PSTRINGC7_69 |
0 15 1 0 @const109 |
0 79 3 4 @PSTRINGCN7_69 |
Inline 5 @FTOSD |
0 66 3 13 @DIV3232 |
0 231 10 13 @PRINTF_L32D_69FPFPF |
0 33 1 2 @PRINTF_X_69 |
Program metrics: |
Functions 5 |
Statements 76 |
Comments 124 |
Volume (V) 3546 |
Difficilty (D) 21.3 |
Effort to implement (E) 75478 |
Time to implement (T) 1 hours, 10 minutes |
Est Delivered Bugs (B) 1 |
Cyclomatic Complexity 2 |
Maintainability (MI) 142 |
Segment Used Free |
----------- ---- ---- |
00000-00003 4 0 |
00004-007FF 2034 10 |
00800-00FFF 281 1767 |
01000-017FF 0 2048 |
01800-01FFF 0 2048 |
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.sym |
---|
0,0 → 1,163 |
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-026 MAIN.temperature |
027-02A MAIN.humidity |
02B SHT25_setup.setup_reg |
02B @PSTRINGCN7_69.P1 |
02B SHT25_get_temp.MSB |
02B SHT25_get_hum.MSB |
02B MAIN.@SCRATCH1 |
02B @PSTRINGC7_69.@SCRATCH1 |
02C SHT25_setup.reg |
02C SHT25_get_hum.LSB |
02C @PRINTF_X_69.P1 |
02C-02F @PRINTF_L32D_69FPFPF.P2 |
02C SHT25_get_temp.LSB |
02C @PSTRINGC7_69.@SCRATCH2 |
02C @PSTRINGCN7_69.@SCRATCH1 |
02D SHT25_get_hum.Check |
02D @PRINTF_X_69.P1 |
02D SHT25_get_temp.Check |
02D SHT25_setup.@SCRATCH1 |
02D @PSTRINGC7_69.@SCRATCH3 |
02D @PSTRINGCN7_69.@SCRATCH2 |
02E-02F SHT25_get_hum.data |
02E-02F SHT25_get_temp.data |
02E @PSTRINGCN7_69.@SCRATCH3 |
030-031 @ITOF.P1 |
030 @I2C_READ_1.P2 |
030-033 @ADDFF.P3 |
030 @delay_ms1.P4 |
030 @I2C_WRITE_1.P5 |
030 @PRINTF_L32D_69FPFPF.P6 |
030 SHT25_get_temp.@SCRATCH1 |
030 SHT25_get_hum.@SCRATCH1 |
031 @I2C_READ_1.@SCRATCH1 |
031 SHT25_get_temp.@SCRATCH2 |
031 SHT25_get_hum.@SCRATCH2 |
031 @PRINTF_L32D_69FPFPF.@SCRATCH1 |
032 @I2C_READ_1.@SCRATCH2 |
032 SHT25_get_temp.@SCRATCH3 |
032 SHT25_get_hum.@SCRATCH3 |
032 @PRINTF_L32D_69FPFPF.@SCRATCH2 |
033 SHT25_get_temp.@SCRATCH4 |
033 SHT25_get_hum.@SCRATCH4 |
033 @PRINTF_L32D_69FPFPF.@SCRATCH3 |
034-037 @ADDFF.P1 |
034-037 @DIVFF.P2 |
034 @PRINTF_L32D_69FPFPF.@SCRATCH4 |
035 @PRINTF_L32D_69FPFPF.@SCRATCH5 |
036 @PRINTF_L32D_69FPFPF.@SCRATCH6 |
037 @PRINTF_L32D_69FPFPF.@SCRATCH7 |
038-03B @DIVFF.P1 |
038 @ADDFF.@SCRATCH1 |
038 @PRINTF_L32D_69FPFPF.@SCRATCH8 |
039 @PUTCHAR_1_.P1 |
039-03C @MULFF.P2 |
039-03C @DIV3232.P3 |
039-03C @FTOSD.P4 |
039 @ADDFF.@SCRATCH2 |
03A @ADDFF.@SCRATCH3 |
03B @ADDFF.@SCRATCH4 |
03C @DIVFF.@SCRATCH1 |
03C @ADDFF.@SCRATCH5 |
03D-040 @MULFF.P1 |
03D-040 @DIV3232.P2 |
03D @DIVFF.@SCRATCH2 |
03D @ADDFF.@SCRATCH6 |
03D @FTOSD.@SCRATCH1 |
03E @DIVFF.@SCRATCH3 |
03E @ADDFF.@SCRATCH7 |
03F @DIVFF.@SCRATCH4 |
03F @ADDFF.@SCRATCH8 |
040 @DIVFF.@SCRATCH5 |
041 @DIVFF.@SCRATCH6 |
041 @MULFF.@SCRATCH1 |
041 @DIV3232.@SCRATCH1 |
042 @MULFF.@SCRATCH2 |
042 @DIV3232.@SCRATCH2 |
043 @MULFF.@SCRATCH3 |
043 @DIV3232.@SCRATCH3 |
044 @MULFF.@SCRATCH4 |
044 @DIV3232.@SCRATCH4 |
045 @MULFF.@SCRATCH5 |
045 @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: |
0169 @delay_ms1 |
017D @I2C_READ_1 |
002C @I2C_WRITE_1 |
00AE @PUTCHAR_1_ |
0076 SHT25_soft_reset |
05E4 SHT25_setup |
045F SHT25_get_temp |
01C2 @ITOF |
01DF @DIVFF |
02A9 @MULFF |
031E @ADDFF |
052E SHT25_get_hum |
0800 MAIN |
0004 @const107 |
00D2 @PSTRINGC7_69 |
001D @const109 |
011A @PSTRINGCN7_69 |
0715 @FTOSD |
06AC @DIV3232 |
06EE @PRINTF_L32D_69FPFPF |
07D5 @PRINTF_X_69 |
0800 @cinit |
User Memory space: |
User Memory space: |
Project Directory: |
Z:\home\kaklik\svnMLAB\Modules\Sensors\SHT25V01A\SW\PIC16F887\ |
Project Files: |
main.c |
main.h |
C:\Program Files (x86)\PICC\devices\16F887.h |
SHT25.h |
SHT25.c |
Units: |
Z:\home\kaklik\svnMLAB\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,85 |
ÀÄmain |
ÀÄMAIN 1/281 Ram=11 |
ÃÄ??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/36 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PSTRINGCN7_69 0/79 Ram=4 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PSTRINGCN7_69 0/79 Ram=4 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/36 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 |
ÃÄ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 |
ÃÄ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 |
ÃÄ@PRINTF_L32D_69FPFPF 0/231 Ram=13 |
³ ÃÄ@MULFF 0/117 Ram=13 |
³ ÃÄ@FTOSD (Inline) Ram=5 |
³ ÃÄ@DIV3232 0/66 Ram=13 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÀÄ@DIV3232 0/66 Ram=13 |
ÃÄ@PUTCHAR_1_ 0/36 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/36 Ram=1 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÀÄ@DIV3232 0/66 Ram=13 |
ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PRINTF_X_69 0/33 Ram=2 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PRINTF_X_69 0/33 Ram=2 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÀÄ@delay_ms1 0/20 Ram=1 |
/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++; |
} |
} |