No changes between revisions
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.bak
0,0 → 1,20
#include "C:\Users\Honza\Documents\pic\I2C_vlhkost\main.h"
 
 
 
 
void main()
{
 
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);// This device COMP currently not supported by the PICWizard
 
//TODO: User Code
 
}
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.c
0,0 → 1,81
#include "C:\Users\Honza\Documents\pic\I2C_vlhkost\main.h"
 
#define EEPROM_SDA PIN_B0
#define EEPROM_SCL PIN_B1
#use i2c(master, sda=EEPROM_SDA, scl=EEPROM_SCL)
#use rs232(baud=9600,parity=N,xmit=PIN_B3,rcv=PIN_B2,bits=8) //rcv TXD xmit RXD
 
 
void main()
{
 
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);// This device COMP currently not supported by the PICWizard
 
printf("Simple Thermomether \r\n",);
 
int16 data1, data2, data3;
 
int XL,XH,YL,YH,ZL,ZH;
while(TRUE)
{
 
data1=0;
data2=0 ;
 
 
//akcelerometr
int1 ack;
i2c_start(); // If the write command is acknowledged,
ack = i2c_write(0x81);//hen the device is ready.
i2c_stop();
ack=!ack;
i2c_stop(); //T
 
i2c_start();
I2C_Write(0x80);
I2C_write(0xF3);
// i2c_stop();
i2c_start();
I2C_Write(0x81);
XH=i2c_read(0);
XL=i2c_read(0);
i2c_stop();
 
i2c_start(); //RH
I2C_Write(0x80);
I2C_write(0xF5);
// i2c_stop();
i2c_start();
I2C_Write(0x81);
YH=i2c_read(0);
YL=i2c_read(0);
i2c_stop();
 
data1 = (((unsigned int16) XH << 8) + XL>>2 );
data2 = (((unsigned int16) YH << 8) + YL>>2);
 
 
printf("Stav: %d (procenta)\r\n", ack);
 
printf("Stav: %Ld(procenta)\r\n", data1);
printf("Stav: %Ld(procenta)\r\n", data2);
 
delay_ms (2000);
 
}
}
 
/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,5
>>> Warning 202 "main.c" Line 23(21,26): Variable never used: data3
>>> Warning 202 "main.c" Line 25(17,19): Variable never used: ZL
>>> Warning 202 "main.c" Line 25(20,22): Variable never used: ZH
Memory usage: ROM=12% RAM=2% - 8%
0 Errors, 3 Warnings.
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.esym
0,0 → 1,428
D G "__PCM__" 0 98 ""4.106""
D G "__DEVICE__" 0 98 "887"
D G "__DATE__" 0 98 ""03-4-13""
D G "__TIME__" 0 98 ""09:45:34"" "Standard Header file for the PIC16F887 device ////////////////"
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 "EEPROM_SDA" 0 3 "PIN_B0"
D G "EEPROM_SCL" 0 4 "PIN_B1"
F G "main" 0 9 "void()"
C L "main" 0 19 1 "FUNCTION"
V L "data1" 0 23 "int16"
V L "data2" 0 23 "int16"
V L "data3" 0 23 "int16"
V L "XL" 0 25 "int8"
V L "XH" 0 25 "int8"
V L "YL" 0 25 "int8"
V L "YH" 0 25 "int8"
V L "ZL" 0 25 "int8"
V L "ZH" 0 25 "int8"
C L "main" 0 19 1 "FUNCTION"
V L "ack" 0 35 "int1"
C L "main" 0 19 1 "FUNCTION"
C L "main" 0 19 1 "FUNCTION"
C L "main" 0 19 1 "FUNCTION"
C L "main" 0 19 1 "FUNCTION"
C L "main" 0 19 1 "FUNCTION"
C L "main" 0 19 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,19
#include <16F887.h>
#device adc=8
 
#FUSES NOWDT //No Watch Dog Timer
#FUSES INTRC //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)
 
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.hex
0,0 → 1,132
:1000000002308A00632A0000D3346D38EC32202A93
:10001000E832F236EF36653AE8327210A0060A008E
:10002000533A613B3A10253220147039EF3165376D
:10003000F430A9060A00533A613B3A1025266414AD
:100040007039EF316537F430A9060A00533A613B45
:100050003A10252664147039EF316537F430A9065B
:100060000A0083168611831286110830F80038289A
:100070000000F8174928F813B70C03188615031C5D
:100080008611781749287813F80B3C284728000078
:1000900086153F308400840B4B280000F81B3B285A
:1000A000781B43280800831603178C170C140000D4
:1000B000000083120C087F39031997280313AE0040
:1000C00003170D080313AF0003170F080313B00045
:1000D0002E08B70031202F0803178D0003133008B6
:1000E00003178F0083168C170C1400000000831276
:1000F0000C0D0E0D7F39031997280313AE0003175B
:100100000D080313AF0003170F080313B0002E08E8
:10011000B70031202F0803178D0003133008031791
:100120008F008D0A03198F0A031353280317031333
:100130008A110A12CB2A0830F800000086108316B4
:10014000861000008312AE0D0610031CAA28831629
:10015000061483120318AF28831606108312831621
:1001600086148312861CB228F80B9D280000861086
:100170008316861000000614000000008614831207
:10018000861CC028F8010000061878148610831613
:10019000861083120610831606108312080008309A
:1001A000AF007708B000831606140000861483128F
:1001B000861CD82806180314061C0310F80D00002E
:1001C0008316861083128610AF0BD328831606146D
:1001D00000008312061030080319F1288316061058
:1001E00083120000831686148312861CF5280000F3
:1001F00086108316861000008312061083160610E0
:1002000083120800831603178C170C1400000000DB
:100210000318312983120C087F390313B000031728
:100220000D080313B10003170F080313B2003008C1
:10023000B7003120310803178D000313320803176C
:100240008F0083168C170C14000000008312031318
:10025000AF0B2B292E29831603173129502983161A
:10026000031783120C0D0E0D7F390313B000031713
:100270000D080313B10003170F080313B200300871
:10028000B7003120310803178D000313320803171C
:100290008F008D0A03198F0A03100313AF0B022975
:1002A00008003608F8013502031859293508F70007
:1002B0006529F7010830B700B50DF70D360877024C
:1002C0000318F700F80DB70B5C2908002030301E2A
:1002D0003030B1002F08F700AF1F7529F709F70A72
:1002E0007708AF002D30B100B0172F08B50064308B
:1002F000B60051217708AF0030307807B2002F08E0
:10030000B5000A30B600512130307707B4003030E4
:100310007807B3003108F700B01D9029B01F3011E5
:10032000301A9D29B01FB8293019B8297708B200B2
:10033000B018B8297708B300B82930303202031D4D
:10034000B8297708B2002030B100B01DAB293011B8
:10035000B014B01FB01030303302031DB829770835
:10036000B3002030B200B01DAB29B010B01F301068
:10037000301DBD293108B7003120B01CC229320818
:10038000B7003120301CC7293308B70031203408AA
:10039000B70031208A110A12B22BB6010408B50049
:1003A0003610831B3614AF1FDD29B517351EB50A6D
:1003B000AE09AF09AE0A0319AF0A2F0EF038B1002B
:1003C000B107E23EB200323EB4002F080F39B20747
:1003D000B207B407E93EB300B307B3072E0E0F39D7
:1003E000B307B407B30DB40DB409B40D2E080F391B
:1003F000B407B10D0730B0000A30B407B303031CD3
:10040000FD29B307B203031C012AB207B103031C81
:10041000052AB107B003031C092A30308400831376
:1004200007303505351384033505031D1E2A351A9B
:10043000840A351A1E2A2030F7003B2A84073430FC
:100440000402031935170008F700031D2F2A351B76
:100450002F2A351A492AB5192F2A20303A2AB51FD2
:10046000372A2D30F70084033513B5133B2AB51511
:1004700035123030F707AF010408AE002F10831B90
:100480002F147708B70031202E08840083132F180B
:100490008317840A351F1F2A08002F308400831316
:1004A00000080319602A0230F800F701F70B562AFA
:1004B000F80B552A9730F700F70B5C2A800B532A6C
:1004C0008A110A12F72B840183131F3083057130C0
:1004D00083168F000F088611831286158316031763
:1004E0000908C039890003131F129F120030031737
:1004F00088008312870188018901FF300313A0005F
:10050000831603170908C039890003131F129F12AD
:10051000003003178800831203131F139F138316E1
:100520009F1383121F149412A012200883168700B1
:10053000831220162008831687008312A01120083A
:1005400083168700013083129400003083169400D4
:100550000108C73908388100831290010030F80083
:100560009200003083169200831220152008831613
:1005700087008312970183169B019C0101309D0027
:100580008312031787018801890104308D00003030
:100590008F0003135328A201A101A401A301831614
:1005A000061400008614000083120610831606103D
:1005B0000000831286108316861081308312AE00ED
:1005C0009B2078082D1078182D1483160610000033
:1005D00086148312861CEA2A0000EE2A0000831685
:1005E0000614000001308312AD06831606100000C9
:1005F00086148312861CFA2A0000FE2A0000831645
:100600000614000006140000861400008312061071
:100610008316061000008312861083168610803021
:100620008312AE009B20F330AE009B20831606148D
:100630000000861400008312861C1C2B06108316F3
:1006400006100000831286108316861081308312F4
:10065000AE009B20F701CF207808A800F701CF203B
:100660007808A70083160610000086148312861CE3
:10067000372B00003B2B00008316061400000614E5
:100680000000861400008312061083160610000076
:10069000831286108316861080308312AE009B2052
:1006A000F530AE009B20831606140000861400006F
:1006B0008312861C592B0610831606100000831225
:1006C00086108316861081308312AE009B20F701BE
:1006D000CF207808AA00F701CF207808A900831658
:1006E0000610000086148312861C742B0000782BE1
:1006F00000008316061400008312AF012808AE0024
:10070000AF00AE012708AE070318AF0A2F0CA200F6
:100710002E0CA100A20CA10C3F30A205AF012A08AB
:10072000AE00AF00AE012908AE070318AF0A2F0CC8
:10073000A4002E0CA300A40CA30C3F30A405003091
:100740002D180130AE00103003178D0000308F00DF
:10075000031006300313AF0002212E08AF001F3034
:10076000B0006629143003178D0000308F0003108D
:100770000D300313AF0002211B3003178D00003032
:100780008F00031006300313AF00022110308400E5
:100790002208AF002108AE00CD211F3003178D00C5
:1007A00000308F0003140C300313AF0002212630F9
:1007B00003178D0000308F00031006300313AF00C5
:1007C0000221103084002408AF002308AE00CD21A0
:1007D0002A3003178D0000308F0003140C300313F0
:1007E000AF0002210830AE00FA30AF004D2AAE0B48
:0607F000F42BCB2A63008C
:04400E00F52CFF3F4F
:00000001FF
;PIC16F887
;CRC=524E CREATED="03-4-13 09:45"
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.lst
0,0 → 1,693
CCS PCM C Compiler, Version 4.106, 47914 03-4-13 09:45
 
Filename: C:\Users\Honza\Documents\pic\I2C_vlhkost\main.lst
 
ROM used: 1019 words (12%)
Largest free fragment is 2048
RAM used: 8 (2%) at main() level
29 (8%) worst case
Stack: 2 locations
 
*
0000: MOVLW 02
0001: MOVWF 0A
0002: GOTO 263
0003: NOP
.................... #include "C:\Users\Honza\Documents\pic\I2C_vlhkost\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 //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)
*
024D: MOVLW 2F
024E: MOVWF 04
024F: BCF 03.7
0250: MOVF 00,W
0251: BTFSC 03.2
0252: GOTO 260
0253: MOVLW 02
0254: MOVWF 78
0255: CLRF 77
0256: DECFSZ 77,F
0257: GOTO 256
0258: DECFSZ 78,F
0259: GOTO 255
025A: MOVLW 97
025B: MOVWF 77
025C: DECFSZ 77,F
025D: GOTO 25C
025E: DECFSZ 00,F
025F: GOTO 253
0260: BCF 0A.3
0261: BCF 0A.4
0262: GOTO 3F7 (RETURN)
....................
....................
....................
.................... #define EEPROM_SDA PIN_B0
.................... #define EEPROM_SCL PIN_B1
.................... #use i2c(master, sda=EEPROM_SDA, scl=EEPROM_SCL)
*
009B: MOVLW 08
009C: MOVWF 78
009D: NOP
009E: BCF 06.1
009F: BSF 03.5
00A0: BCF 06.1
00A1: NOP
00A2: BCF 03.5
00A3: RLF 2E,F
00A4: BCF 06.0
00A5: BTFSS 03.0
00A6: GOTO 0AA
00A7: BSF 03.5
00A8: BSF 06.0
00A9: BCF 03.5
00AA: BTFSC 03.0
00AB: GOTO 0AF
00AC: BSF 03.5
00AD: BCF 06.0
00AE: BCF 03.5
00AF: BSF 03.5
00B0: BSF 06.1
00B1: BCF 03.5
00B2: BTFSS 06.1
00B3: GOTO 0B2
00B4: DECFSZ 78,F
00B5: GOTO 09D
00B6: NOP
00B7: BCF 06.1
00B8: BSF 03.5
00B9: BCF 06.1
00BA: NOP
00BB: BSF 06.0
00BC: NOP
00BD: NOP
00BE: BSF 06.1
00BF: BCF 03.5
00C0: BTFSS 06.1
00C1: GOTO 0C0
00C2: CLRF 78
00C3: NOP
00C4: BTFSC 06.0
00C5: BSF 78.0
00C6: BCF 06.1
00C7: BSF 03.5
00C8: BCF 06.1
00C9: BCF 03.5
00CA: BCF 06.0
00CB: BSF 03.5
00CC: BCF 06.0
00CD: BCF 03.5
00CE: RETURN
00CF: MOVLW 08
00D0: MOVWF 2F
00D1: MOVF 77,W
00D2: MOVWF 30
00D3: BSF 03.5
00D4: BSF 06.0
00D5: NOP
00D6: BSF 06.1
00D7: BCF 03.5
00D8: BTFSS 06.1
00D9: GOTO 0D8
00DA: BTFSC 06.0
00DB: BSF 03.0
00DC: BTFSS 06.0
00DD: BCF 03.0
00DE: RLF 78,F
00DF: NOP
00E0: BSF 03.5
00E1: BCF 06.1
00E2: BCF 03.5
00E3: BCF 06.1
00E4: DECFSZ 2F,F
00E5: GOTO 0D3
00E6: BSF 03.5
00E7: BSF 06.0
00E8: NOP
00E9: BCF 03.5
00EA: BCF 06.0
00EB: MOVF 30,W
00EC: BTFSC 03.2
00ED: GOTO 0F1
00EE: BSF 03.5
00EF: BCF 06.0
00F0: BCF 03.5
00F1: NOP
00F2: BSF 03.5
00F3: BSF 06.1
00F4: BCF 03.5
00F5: BTFSS 06.1
00F6: GOTO 0F5
00F7: NOP
00F8: BCF 06.1
00F9: BSF 03.5
00FA: BCF 06.1
00FB: NOP
00FC: BCF 03.5
00FD: BCF 06.0
00FE: BSF 03.5
00FF: BCF 06.0
0100: BCF 03.5
0101: RETURN
.................... #use rs232(baud=9600,parity=N,xmit=PIN_B3,rcv=PIN_B2,bits=8) //rcv TXD xmit RXD
*
0031: BSF 03.5
0032: BCF 06.3
0033: BCF 03.5
0034: BCF 06.3
0035: MOVLW 08
0036: MOVWF 78
0037: GOTO 038
0038: NOP
0039: BSF 78.7
003A: GOTO 049
003B: BCF 78.7
003C: RRF 37,F
003D: BTFSC 03.0
003E: BSF 06.3
003F: BTFSS 03.0
0040: BCF 06.3
0041: BSF 78.6
0042: GOTO 049
0043: BCF 78.6
0044: DECFSZ 78,F
0045: GOTO 03C
0046: GOTO 047
0047: NOP
0048: BSF 06.3
0049: MOVLW 3F
004A: MOVWF 04
004B: DECFSZ 04,F
004C: GOTO 04B
004D: NOP
004E: BTFSC 78.7
004F: GOTO 03B
0050: BTFSC 78.6
0051: GOTO 043
0052: RETURN
....................
....................
.................... void main()
.................... {
*
0263: CLRF 04
0264: BCF 03.7
0265: MOVLW 1F
0266: ANDWF 03,F
0267: MOVLW 71
0268: BSF 03.5
0269: MOVWF 0F
026A: MOVF 0F,W
026B: BCF 06.3
026C: BCF 03.5
026D: BSF 06.3
026E: BSF 03.5
026F: BSF 03.6
0270: MOVF 09,W
0271: ANDLW C0
0272: MOVWF 09
0273: BCF 03.6
0274: BCF 1F.4
0275: BCF 1F.5
0276: MOVLW 00
0277: BSF 03.6
0278: MOVWF 08
0279: BCF 03.5
027A: CLRF 07
027B: CLRF 08
027C: CLRF 09
....................
.................... setup_adc_ports(NO_ANALOGS|VSS_VDD);
*
0280: BSF 03.5
0281: BSF 03.6
0282: MOVF 09,W
0283: ANDLW C0
0284: MOVWF 09
0285: BCF 03.6
0286: BCF 1F.4
0287: BCF 1F.5
0288: MOVLW 00
0289: BSF 03.6
028A: MOVWF 08
.................... setup_adc(ADC_CLOCK_DIV_2);
028B: BCF 03.5
028C: BCF 03.6
028D: BCF 1F.6
028E: BCF 1F.7
028F: BSF 03.5
0290: BCF 1F.7
0291: BCF 03.5
0292: BSF 1F.0
.................... setup_spi(SPI_SS_DISABLED);
0293: BCF 14.5
0294: BCF 20.5
0295: MOVF 20,W
0296: BSF 03.5
0297: MOVWF 07
0298: BCF 03.5
0299: BSF 20.4
029A: MOVF 20,W
029B: BSF 03.5
029C: MOVWF 07
029D: BCF 03.5
029E: BCF 20.3
029F: MOVF 20,W
02A0: BSF 03.5
02A1: MOVWF 07
02A2: MOVLW 01
02A3: BCF 03.5
02A4: MOVWF 14
02A5: MOVLW 00
02A6: BSF 03.5
02A7: MOVWF 14
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
02A8: MOVF 01,W
02A9: ANDLW C7
02AA: IORLW 08
02AB: MOVWF 01
.................... setup_timer_1(T1_DISABLED);
02AC: BCF 03.5
02AD: CLRF 10
.................... setup_timer_2(T2_DISABLED,0,1);
02AE: MOVLW 00
02AF: MOVWF 78
02B0: MOVWF 12
02B1: MOVLW 00
02B2: BSF 03.5
02B3: MOVWF 12
.................... setup_ccp1(CCP_OFF);
02B4: BCF 03.5
02B5: BSF 20.2
02B6: MOVF 20,W
02B7: BSF 03.5
02B8: MOVWF 07
02B9: BCF 03.5
02BA: CLRF 17
02BB: BSF 03.5
02BC: CLRF 1B
02BD: CLRF 1C
02BE: MOVLW 01
02BF: MOVWF 1D
.................... setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard
02C0: BCF 03.5
02C1: BSF 03.6
02C2: CLRF 07
02C3: CLRF 08
02C4: CLRF 09
....................
.................... printf("Simple Thermomether \r\n",);
02C5: MOVLW 04
02C6: MOVWF 0D
02C7: MOVLW 00
02C8: MOVWF 0F
02C9: BCF 03.6
02CA: GOTO 053
....................
.................... int16 data1, data2, data3;
....................
.................... int XL,XH,YL,YH,ZL,ZH;
....................
.................... while(TRUE)
.................... {
....................
.................... data1=0;
02CB: CLRF 22
02CC: CLRF 21
.................... data2=0 ;
02CD: CLRF 24
02CE: CLRF 23
....................
....................
.................... //akcelerometr
.................... int1 ack;
.................... i2c_start(); // If the write command is acknowledged,
02CF: BSF 03.5
02D0: BSF 06.0
02D1: NOP
02D2: BSF 06.1
02D3: NOP
02D4: BCF 03.5
02D5: BCF 06.0
02D6: BSF 03.5
02D7: BCF 06.0
02D8: NOP
02D9: BCF 03.5
02DA: BCF 06.1
02DB: BSF 03.5
02DC: BCF 06.1
.................... ack = i2c_write(0x81);//hen the device is ready.
02DD: MOVLW 81
02DE: BCF 03.5
02DF: MOVWF 2E
02E0: CALL 09B
02E1: MOVF 78,W
02E2: BCF 2D.0
02E3: BTFSC 78.0
02E4: BSF 2D.0
.................... i2c_stop();
02E5: BSF 03.5
02E6: BCF 06.0
02E7: NOP
02E8: BSF 06.1
02E9: BCF 03.5
02EA: BTFSS 06.1
02EB: GOTO 2EA
02EC: NOP
02ED: GOTO 2EE
02EE: NOP
02EF: BSF 03.5
02F0: BSF 06.0
02F1: NOP
.................... ack=!ack;
02F2: MOVLW 01
02F3: BCF 03.5
02F4: XORWF 2D,F
....................
....................
....................
.................... i2c_stop(); //T
02F5: BSF 03.5
02F6: BCF 06.0
02F7: NOP
02F8: BSF 06.1
02F9: BCF 03.5
02FA: BTFSS 06.1
02FB: GOTO 2FA
02FC: NOP
02FD: GOTO 2FE
02FE: NOP
02FF: BSF 03.5
0300: BSF 06.0
0301: NOP
....................
.................... i2c_start();
0302: BSF 06.0
0303: NOP
0304: BSF 06.1
0305: NOP
0306: BCF 03.5
0307: BCF 06.0
0308: BSF 03.5
0309: BCF 06.0
030A: NOP
030B: BCF 03.5
030C: BCF 06.1
030D: BSF 03.5
030E: BCF 06.1
.................... I2C_Write(0x80);
030F: MOVLW 80
0310: BCF 03.5
0311: MOVWF 2E
0312: CALL 09B
.................... I2C_write(0xF3);
0313: MOVLW F3
0314: MOVWF 2E
0315: CALL 09B
.................... // i2c_stop();
.................... i2c_start();
0316: BSF 03.5
0317: BSF 06.0
0318: NOP
0319: BSF 06.1
031A: NOP
031B: BCF 03.5
031C: BTFSS 06.1
031D: GOTO 31C
031E: BCF 06.0
031F: BSF 03.5
0320: BCF 06.0
0321: NOP
0322: BCF 03.5
0323: BCF 06.1
0324: BSF 03.5
0325: BCF 06.1
.................... I2C_Write(0x81);
0326: MOVLW 81
0327: BCF 03.5
0328: MOVWF 2E
0329: CALL 09B
.................... XH=i2c_read(0);
032A: CLRF 77
032B: CALL 0CF
032C: MOVF 78,W
032D: MOVWF 28
.................... XL=i2c_read(0);
032E: CLRF 77
032F: CALL 0CF
0330: MOVF 78,W
0331: MOVWF 27
.................... i2c_stop();
0332: BSF 03.5
0333: BCF 06.0
0334: NOP
0335: BSF 06.1
0336: BCF 03.5
0337: BTFSS 06.1
0338: GOTO 337
0339: NOP
033A: GOTO 33B
033B: NOP
033C: BSF 03.5
033D: BSF 06.0
033E: NOP
....................
....................
.................... i2c_start(); //RH
033F: BSF 06.0
0340: NOP
0341: BSF 06.1
0342: NOP
0343: BCF 03.5
0344: BCF 06.0
0345: BSF 03.5
0346: BCF 06.0
0347: NOP
0348: BCF 03.5
0349: BCF 06.1
034A: BSF 03.5
034B: BCF 06.1
.................... I2C_Write(0x80);
034C: MOVLW 80
034D: BCF 03.5
034E: MOVWF 2E
034F: CALL 09B
.................... I2C_write(0xF5);
0350: MOVLW F5
0351: MOVWF 2E
0352: CALL 09B
.................... // i2c_stop();
.................... i2c_start();
0353: BSF 03.5
0354: BSF 06.0
0355: NOP
0356: BSF 06.1
0357: NOP
0358: BCF 03.5
0359: BTFSS 06.1
035A: GOTO 359
035B: BCF 06.0
035C: BSF 03.5
035D: BCF 06.0
035E: NOP
035F: BCF 03.5
0360: BCF 06.1
0361: BSF 03.5
0362: BCF 06.1
.................... I2C_Write(0x81);
0363: MOVLW 81
0364: BCF 03.5
0365: MOVWF 2E
0366: CALL 09B
.................... YH=i2c_read(0);
0367: CLRF 77
0368: CALL 0CF
0369: MOVF 78,W
036A: MOVWF 2A
.................... YL=i2c_read(0);
036B: CLRF 77
036C: CALL 0CF
036D: MOVF 78,W
036E: MOVWF 29
.................... i2c_stop();
036F: BSF 03.5
0370: BCF 06.0
0371: NOP
0372: BSF 06.1
0373: BCF 03.5
0374: BTFSS 06.1
0375: GOTO 374
0376: NOP
0377: GOTO 378
0378: NOP
0379: BSF 03.5
037A: BSF 06.0
037B: NOP
....................
....................
....................
.................... data1 = (((unsigned int16) XH << 8) + XL>>2 );
037C: BCF 03.5
037D: CLRF 2F
037E: MOVF 28,W
037F: MOVWF 2E
0380: MOVWF 2F
0381: CLRF 2E
0382: MOVF 27,W
0383: ADDWF 2E,F
0384: BTFSC 03.0
0385: INCF 2F,F
0386: RRF 2F,W
0387: MOVWF 22
0388: RRF 2E,W
0389: MOVWF 21
038A: RRF 22,F
038B: RRF 21,F
038C: MOVLW 3F
038D: ANDWF 22,F
.................... data2 = (((unsigned int16) YH << 8) + YL>>2);
038E: CLRF 2F
038F: MOVF 2A,W
0390: MOVWF 2E
0391: MOVWF 2F
0392: CLRF 2E
0393: MOVF 29,W
0394: ADDWF 2E,F
0395: BTFSC 03.0
0396: INCF 2F,F
0397: RRF 2F,W
0398: MOVWF 24
0399: RRF 2E,W
039A: MOVWF 23
039B: RRF 24,F
039C: RRF 23,F
039D: MOVLW 3F
039E: ANDWF 24,F
....................
....................
.................... printf("Stav: %d (procenta)\r\n", ack);
039F: MOVLW 00
03A0: BTFSC 2D.0
03A1: MOVLW 01
03A2: MOVWF 2E
03A3: MOVLW 10
03A4: BSF 03.6
03A5: MOVWF 0D
03A6: MOVLW 00
03A7: MOVWF 0F
03A8: BCF 03.0
03A9: MOVLW 06
03AA: BCF 03.6
03AB: MOVWF 2F
03AC: CALL 102
03AD: MOVF 2E,W
03AE: MOVWF 2F
03AF: MOVLW 1F
03B0: MOVWF 30
03B1: GOTO 166
03B2: MOVLW 14
03B3: BSF 03.6
03B4: MOVWF 0D
03B5: MOVLW 00
03B6: MOVWF 0F
03B7: BCF 03.0
03B8: MOVLW 0D
03B9: BCF 03.6
03BA: MOVWF 2F
03BB: CALL 102
....................
.................... printf("Stav: %Ld(procenta)\r\n", data1);
03BC: MOVLW 1B
03BD: BSF 03.6
03BE: MOVWF 0D
03BF: MOVLW 00
03C0: MOVWF 0F
03C1: BCF 03.0
03C2: MOVLW 06
03C3: BCF 03.6
03C4: MOVWF 2F
03C5: CALL 102
03C6: MOVLW 10
03C7: MOVWF 04
03C8: MOVF 22,W
03C9: MOVWF 2F
03CA: MOVF 21,W
03CB: MOVWF 2E
03CC: CALL 1CD
03CD: MOVLW 1F
03CE: BSF 03.6
03CF: MOVWF 0D
03D0: MOVLW 00
03D1: MOVWF 0F
03D2: BSF 03.0
03D3: MOVLW 0C
03D4: BCF 03.6
03D5: MOVWF 2F
03D6: CALL 102
.................... printf("Stav: %Ld(procenta)\r\n", data2);
03D7: MOVLW 26
03D8: BSF 03.6
03D9: MOVWF 0D
03DA: MOVLW 00
03DB: MOVWF 0F
03DC: BCF 03.0
03DD: MOVLW 06
03DE: BCF 03.6
03DF: MOVWF 2F
03E0: CALL 102
03E1: MOVLW 10
03E2: MOVWF 04
03E3: MOVF 24,W
03E4: MOVWF 2F
03E5: MOVF 23,W
03E6: MOVWF 2E
03E7: CALL 1CD
03E8: MOVLW 2A
03E9: BSF 03.6
03EA: MOVWF 0D
03EB: MOVLW 00
03EC: MOVWF 0F
03ED: BSF 03.0
03EE: MOVLW 0C
03EF: BCF 03.6
03F0: MOVWF 2F
03F1: CALL 102
....................
.................... delay_ms (2000);
03F2: MOVLW 08
03F3: MOVWF 2E
03F4: MOVLW FA
03F5: MOVWF 2F
03F6: GOTO 24D
03F7: DECFSZ 2E,F
03F8: GOTO 3F4
....................
.................... }
03F9: GOTO 2CB
.................... }
....................
03FA: SLEEP
 
Configuration Fuses:
Word 1: 2CF5 INTRC 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,24
[PROJECT]
Target=C:\Users\Honza\Documents\pic\I2C_vlhkost\main.hex
Development_Mode=
Processor_Text=PIC16F887
ToolSuite=CCS
Processor=0x887F
[C:\Users\Honza\Documents\pic\I2C_vlhkost\main]
Type=4
Path=
FileList=
BuildTool=
OptionString=
AdditionalOptionString=
[mru-list]
1=C:\Users\Honza\Documents\pic\I2C_vlhkost\main.c
[Windows]
0=0000 %S 0 0 796 451 3 0
[Units]
Link=0
Count=1
1=C:\Users\Honza\Documents\pic\I2C_vlhkost\main
[Opened Files]
1=main.c
2=
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.sta
0,0 → 1,59
 
ROM used: 1019 (12%)
1019 (12%) including unused fragments
 
2 Average locations per line
24 Average locations per statement
 
RAM used: 8 (2%) at main() level
29 (8%) worst case
 
Stack used: 2 worst case (out of 8 total available)
 
Lines Stmts % Files
----- ----- --- -----
82 42 100 main.c
20 0 0 main.h
423 0 0 ..\..\..\..\..\Program Files (x86)\PICC\devices\16F887.h
----- -----
525 42 Total
 
Page ROM % RAM Vol Diff Functions:
---- --- --- --- --- ---- ----------
0 22 2 1 @delay_ms1
0 51 5 3 @I2C_READ_1
0 52 5 1 @I2C_WRITE_1
0 34 3 1 @PUTCHAR_1_
0 408 40 2 1503 5.5 main
0 12 1 0 @const78
0 72 7 3 @PSTRINGC7_68
0 11 1 0 @const90
0 79 8 4 @PSTRINGCN7_68
0 21 2 3 @DIV88
0 103 10 6 @PRINTF_D_68
0 11 1 0 @const99
0 128 13 9 @PRINTF_LD_68
0 11 1 0 @const102
 
Program metrics:
Functions 1
Statements 42
Comments 91
Volume (V) 1538
Difficilty (D) 4.9
Effort to implement (E) 7509
Time to implement (T) 7 minutes
Est Delivered Bugs (B) 0
Cyclomatic Complexity 1
Maintainability (MI) 112
 
Segment Used Free
----------- ---- ----
00000-00003 4 0
00004-007FF 1015 1029
00800-00FFF 0 2048
01000-017FF 0 2048
01800-01FFF 0 2048
 
 
 
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.sym
0,0 → 1,112
004-005 @READ_PROGRAM_MEMORY8.P1
004 @WRITE_PROGRAM_MEMORY8.P2
015 CCP_1
015 CCP_1_LOW
016 CCP_1_HIGH
01B CCP_2_LOW
01B CCP_2
01C CCP_2_HIGH
020 @TRIS_C
021-022 main.data1
023-024 main.data2
025-026 main.data3
027 main.XL
028 main.XH
029 main.YL
02A main.YH
02B main.ZL
02C main.ZH
02D.0 ack
02E-02F @PRINTF_LD_68.P1
02E @I2C_READ_1.P2
02E @I2C_WRITE_1.P3
02E main.@SCRATCH1
02E @PSTRINGC7_68.@SCRATCH1
02F @PRINTF_D_68.P1
02F @delay_ms1.P2
02F @PSTRINGCN7_68.P3
02F @I2C_READ_1.@SCRATCH1
02F main.@SCRATCH2
02F @PSTRINGC7_68.@SCRATCH2
030 @PRINTF_D_68.P1
030 @I2C_READ_1.@SCRATCH2
030 @PSTRINGC7_68.@SCRATCH3
030 @PSTRINGCN7_68.@SCRATCH1
030 @PRINTF_LD_68.@SCRATCH1
031 @PSTRINGCN7_68.@SCRATCH2
031 @PRINTF_D_68.@SCRATCH1
031 @PRINTF_LD_68.@SCRATCH2
032 @PSTRINGCN7_68.@SCRATCH3
032 @PRINTF_D_68.@SCRATCH2
032 @PRINTF_LD_68.@SCRATCH3
033 @PRINTF_D_68.@SCRATCH3
033 @PRINTF_LD_68.@SCRATCH4
034 @PRINTF_D_68.@SCRATCH4
034 @PRINTF_LD_68.@SCRATCH5
035 @DIV88.P1
035 @PRINTF_LD_68.@SCRATCH6
036 @DIV88.P1
036 @PRINTF_LD_68.@SCRATCH7
037 @PUTCHAR_1_.P1
037 @DIV88.@SCRATCH1
077 @SCRATCH
078 @SCRATCH
078 _RETURN_
079 @SCRATCH
07A @SCRATCH
107.6 C1OUT
108.6 C2OUT
10D-10E @WRITE_PROGRAM_MEMORY8.P1
10D-10E @READ_PROGRAM_MEMORY8.P2
 
ROM Allocation:
024D @delay_ms1
00CF @I2C_READ_1
009B @I2C_WRITE_1
0031 @PUTCHAR_1_
0263 main
0004 @const78
0053 @PSTRINGC7_68
0010 @const90
0102 @PSTRINGCN7_68
0151 @DIV88
0166 @PRINTF_D_68
001B @const99
01CD @PRINTF_LD_68
0026 @const102
0263 @cinit
 
 
User Memory space:
 
User Memory space:
 
Project Directory:
C:\Users\Honza\Documents\pic\I2C_vlhkost\
 
Project Files:
main.c
main.h
..\..\..\..\..\Program Files (x86)\PICC\devices\16F887.h
 
Units:
C:\Users\Honza\Documents\pic\I2C_vlhkost\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,47
ÀÄmain
ÀÄmain 0/408 Ram=2
ÃÄ??0??
ÃÄ@PSTRINGC7_68 0/72 Ram=3
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@I2C_WRITE_1 0/52 Ram=1
ÃÄ@I2C_WRITE_1 0/52 Ram=1
ÃÄ@I2C_WRITE_1 0/52 Ram=1
ÃÄ@I2C_WRITE_1 0/52 Ram=1
ÃÄ@I2C_READ_1 0/51 Ram=3
ÃÄ@I2C_READ_1 0/51 Ram=3
ÃÄ@I2C_WRITE_1 0/52 Ram=1
ÃÄ@I2C_WRITE_1 0/52 Ram=1
ÃÄ@I2C_WRITE_1 0/52 Ram=1
ÃÄ@I2C_READ_1 0/51 Ram=3
ÃÄ@I2C_READ_1 0/51 Ram=3
ÃÄ@PSTRINGCN7_68 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PRINTF_D_68 0/103 Ram=6
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PSTRINGCN7_68 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PSTRINGCN7_68 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PRINTF_LD_68 0/128 Ram=9
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PSTRINGCN7_68 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PSTRINGCN7_68 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PRINTF_LD_68 0/128 Ram=9
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PSTRINGCN7_68 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÀÄ@delay_ms1 0/22 Ram=1