/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.bak
8,22 → 8,40
i2c_stop(); // Stop condition
}
 
unsigned int8 SHT25_setup()
#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
 
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(0x80); // Device address
i2c_write(SHT25_ADDR); // Device address
i2c_write(0xE7); // Device command
 
i2c_start(); // Start condition
i2c_write(0x81); // Device address
reg=i2c_read(0); // Device command
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(0xE7); // Write to status register
i2c_write(reg); // Device command
i2c_stop(); // Stop condition
return (reg);
 
return (reg);
}
 
 
float SHT25_get_temp()
{
unsigned int8 MSB, LSB, Check;
30,7 → 48,7
unsigned int16 data;
 
i2c_start();
I2C_Write(0x80);
I2C_Write(SHT25_ADDR);
I2C_write(0xE3);
i2c_stop();
37,7 → 55,7
delay_ms(100);
i2c_start();
I2C_Write(0x81);
I2C_Write(SHT25_ADDR+1);
MSB=i2c_read(1);
LSB=i2c_read(1);
Check=i2c_read(0);
55,7 → 73,7
unsigned int16 data;
 
i2c_start(); //RH
I2C_Write(0x80);
I2C_Write(SHT25_ADDR);
I2C_write(0xE5);
// i2c_stop();
 
62,7 → 80,7
delay_ms(100);
 
i2c_start();
I2C_Write(0x81);
I2C_Write(SHT25_ADDR+1);
MSB=i2c_read(1);
LSB=i2c_read(1);
Check=i2c_read(0);
79,6 → 97,7
 
void main()
{
unsigned int8 i=0;
 
setup_adc_ports(NO_ANALOGS|VSS_VDD);
setup_adc(ADC_CLOCK_DIV_2);
89,18 → 108,25
setup_ccp1(CCP_OFF);
setup_comparator(NC_NC_NC_NC);
 
void SHT25_soft_reset();
SHT25_soft_reset();
printf("SHT25 humidity and temperature sensor example \r\n",);
delay_ms (500);
 
while(TRUE)
{
printf("setup: %X \r\n",SHT25_setup());
if (TRUE)
printf("setup: %X \r\n",SHT25_setup(SHT25_RH12_T14 | SHT25_HEATER_OFF));
else
{
printf("setup: %X \r\n",SHT25_setup(SHT25_RH12_T14 | SHT25_HEATER_ON));
i = 0;
}
delay_ms (500);
printf("Temp: %f \r\n",SHT25_get_temp());
delay_ms (500);
printf("Hum: %f \r\n",SHT25_get_hum());
delay_ms (1000);
i++;
}
}
 
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.c
8,24 → 8,40
i2c_stop(); // Stop condition
}
 
SHT_
#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
 
unsigned int8 SHT25_setup()
#define SHT25_ADDR 0x80
 
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(0x80); // Device address
i2c_write(SHT25_ADDR); // Device address
i2c_write(0xE7); // Device command
 
i2c_start(); // Start condition
i2c_write(0x81); // Device address
reg=i2c_read(0); // Device command
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(0xE7); // Write to status register
i2c_write(reg); // Device command
i2c_stop(); // Stop condition
return (reg);
 
return (reg);
}
 
 
float SHT25_get_temp()
{
unsigned int8 MSB, LSB, Check;
32,7 → 48,7
unsigned int16 data;
 
i2c_start();
I2C_Write(0x80);
I2C_Write(SHT25_ADDR);
I2C_write(0xE3);
i2c_stop();
39,7 → 55,7
delay_ms(100);
i2c_start();
I2C_Write(0x81);
I2C_Write(SHT25_ADDR+1);
MSB=i2c_read(1);
LSB=i2c_read(1);
Check=i2c_read(0);
57,7 → 73,7
unsigned int16 data;
 
i2c_start(); //RH
I2C_Write(0x80);
I2C_Write(SHT25_ADDR);
I2C_write(0xE5);
// i2c_stop();
 
64,7 → 80,7
delay_ms(100);
 
i2c_start();
I2C_Write(0x81);
I2C_Write(SHT25_ADDR+1);
MSB=i2c_read(1);
LSB=i2c_read(1);
Check=i2c_read(0);
81,6 → 97,7
 
void main()
{
unsigned int8 i=0;
 
setup_adc_ports(NO_ANALOGS|VSS_VDD);
setup_adc(ADC_CLOCK_DIV_2);
91,18 → 108,25
setup_ccp1(CCP_OFF);
setup_comparator(NC_NC_NC_NC);
 
void SHT25_soft_reset();
SHT25_soft_reset();
printf("SHT25 humidity and temperature sensor example \r\n",);
delay_ms (500);
 
while(TRUE)
{
printf("setup: %X \r\n",SHT25_setup());
if (i<10)
printf("setup: %X \r\n",SHT25_setup(SHT25_RH12_T14 | SHT25_HEATER_OFF));
else
{
printf("setup: %X \r\n",SHT25_setup(SHT25_RH12_T14 | SHT25_HEATER_ON));
i = 0;
}
delay_ms (500);
printf("Temp: %f \r\n",SHT25_get_temp());
delay_ms (500);
printf("Hum: %f \r\n",SHT25_get_hum());
delay_ms (1000);
i++;
}
}
 
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.cof
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.err
1,2 → 1,2
Memory usage: ROM=26% RAM=3% - 10%
Memory usage: ROM=28% RAM=3% - 10%
0 Errors, 0 Warnings.
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.esym
1,7 → 1,7
D G "__PCM__" 0 109 ""4.106""
D G "__DEVICE__" 0 109 "887"
D G "__DATE__" 0 109 ""14-IV-13""
D G "__TIME__" 0 109 ""10:31:42"" "Standard Header file for the PIC16F887 device ////////////////"
D G "__PCM__" 0 134 ""4.106""
D G "__DEVICE__" 0 134 "887"
D G "__DATE__" 0 134 ""14-IV-13""
D G "__TIME__" 0 134 ""13:34:10"" "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"
278,8 → 278,17
C L "SHT25_soft_reset" 0 5 1 "FUNCTION"
C L "SHT25_soft_reset" 0 5 1 "FUNCTION"
C L "SHT25_soft_reset" 0 5 1 "FUNCTION"
F G "SHT25_setup" 0 11 "int8()"
V L "reg" 0 13 "int8"
D G "SHT25_HEATER_ON" 0 11 "0x04"
D G "SHT25_HEATER_OFF" 0 12 "0x00"
D G "SHT25_OTP_reload_off" 0 13 "0x02"
D G "SHT25_RH12_T14" 0 14 "0x00"
D G "SHT25_RH8_T12" 0 15 "0x01"
D G "SHT25_RH10_T13" 0 16 "0x80"
D G "SHT25_RH11_T11" 0 17 "0x81"
D G "SHT25_ADDR" 0 19 "0x80"
F G "SHT25_setup" 0 21 "int8(int8 setup_reg)"
V L "setup_reg" 0 21 "int8" "writes to status register and returns its value"
V L "reg" 0 23 "int8"
C L "SHT25_setup" 0 5 1 "FUNCTION"
C L "SHT25_setup" 0 5 1 "FUNCTION"
C L "SHT25_setup" 0 5 1 "FUNCTION"
287,23 → 296,27
C L "SHT25_setup" 0 5 1 "FUNCTION"
C L "SHT25_setup" 0 5 1 "FUNCTION"
C L "SHT25_setup" 0 5 1 "FUNCTION"
F G "SHT25_get_temp" 0 27 "float()"
V L "MSB" 0 29 "int8"
V L "LSB" 0 29 "int8"
V L "Check" 0 29 "int8"
V L "data" 0 30 "int16"
C L "SHT25_setup" 0 5 1 "FUNCTION"
C L "SHT25_setup" 0 5 1 "FUNCTION"
C L "SHT25_setup" 0 5 1 "FUNCTION"
C L "SHT25_setup" 0 5 1 "FUNCTION"
F G "SHT25_get_temp" 0 45 "float()"
V L "MSB" 0 47 "int8"
V L "LSB" 0 47 "int8"
V L "Check" 0 47 "int8"
V L "data" 0 48 "int16"
C L "SHT25_get_temp" 0 5 1 "FUNCTION"
F G "SHT25_get_hum" 0 52 "float()"
V L "MSB" 0 54 "int8"
V L "LSB" 0 54 "int8"
V L "Check" 0 54 "int8"
V L "data" 0 55 "int16"
F G "SHT25_get_hum" 0 70 "float()"
V L "MSB" 0 72 "int8"
V L "LSB" 0 72 "int8"
V L "Check" 0 72 "int8"
V L "data" 0 73 "int16"
C L "SHT25_get_hum" 0 5 1 "FUNCTION"
C L "SHT25_get_hum" 0 5 1 "FUNCTION"
C L "SHT25_get_hum" 0 5 1 "FUNCTION"
C L "SHT25_get_hum" 0 5 1 "FUNCTION"
F G "MAIN" 0 80 "void()"
F G "SHT25_soft_reset" 0 92 "void()"
F G "MAIN" 0 98 "void()"
V L "i" 0 100 "int8"
F B "reset_cpu" 0 0
F B "abs" 1 0
F B "sleep_ulpwu" 1 0
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.hex
2,275 → 2,293
:10001000ED34E434F43CA0306E32203AE536F03270
:10002000F230F43AF232A0396537F3377210653C9A
:10003000E136703665100D050000F332F43A701D9C
:10004000A01258100D050000D4326D383A10253337
:10005000A0060A00C83A6D1DA01266100D0500002A
:1000600083168613831286130830F80037280000A1
:10007000F8174828F813B20C03188617031C8613C8
:10008000781748287813F80B3B2846280000861775
:100090003F308400840B4A280000F81B3A28781B64
:1000A00042280800831603178C170C140000000068
:1000B00083120C087F39031996280313A100031734
:1000C0000D080313A20003170F080313A300210850
:1000D000B2003020220803178D00031323080317F2
:1000E0008F0083168C170C140000000083120C0D77
:1000F0000E0D7F39031996280313A10003170D086D
:100100000313A20003170F080313A3002108B20072
:100110003020220803178D000313230803178F00D4
:100120008D0A03198F0A03135228031703138A1524
:100130000A12692826308400831300080319AD28A9
:100140000230F800F701F70BA328F80BA22897302C
:10015000F700F70BA928800BA02808000830F8004A
:1001600000008711A0112008831687000000831269
:10017000A60D0712031CC22820162008831687002C
:10018000C6288312201220088316870000008312DD
:10019000A0152008831687008312871DCD28F80B31
:1001A000B02800008711A0112008831687000000E6
:1001B0008312201620088316870000000000831297
:1001C000A0152008831687008312871DE528F801F3
:1001D0000000071A78148711A011200883168700E1
:1001E000831207122012200883168700831208004A
:1001F0000830A7007708A80020162008831687007B
:1002000000008312A0152008831687008312871D23
:100210000729071A0314071E0310F80D0000A01188
:1002200020088316870083128711A70BFC2820164D
:10023000200883168700000083120712280803197C
:100240002629201220088316870083120000A0159B
:100250002008831687008312871D2C290000871130
:10026000A0112008831687000000831207122012B5
:1002700020088316870083120800201620088316A2
:10028000870000008312A015200883168700000055
:1002900083120712201220088316870000008312A1
:1002A0008711A01120088316870080308312A600D2
:1002B000AE20E730A600AE20201620088316870067
:1002C00000008312A0152008831687000000831207
:1002D000871D682907122012200883168700000056
:1002E00083128711A01120088316870081308312A2
:1002F000A600AE20F701F8207808A10020122008FF
:100300008316870000008312A0152008831687003B
:100310008312871D892900008D29000020162008DE
:1003200083168700000083122108F8008A150A123C
:100330007528831603178C170C140000000003188F
:10034000C82983120C087F390313A60003170D0870
:100350000313A70003170F080313A8002608B20011
:100360003020270803178D000313280803178F0078
:1003700083168C170C140000000083120313A50BC6
:10038000C229C52983160317C829E729831603172D
:1003900083120C0D0E0D7F390313A60003170D08F1
:1003A0000313A70003170F080313A8002608B200C1
:1003B0003020270803178D000313280803178F0028
:1003C0008D0A03198F0A03100313A50B992908003E
:1003D000A31BFA290F30F700220EF7050A30770227
:1003E0000318F5293030F707F7292308F7077708AE
:1003F000B20030200F30A2050A3022020318022A70
:100400003030042AA3132308A2072208B2003020A8
:100410008A150A128A288E30F7002708F800260865
:10042000F900FA01F808031D1F2A7908F800F901FC
:100430000830F702F808031D1F2AF701272A0310C6
:10044000F81B262AF90DF80DF7031F2AF8130800E8
:100450002A080319ED2AB6002E080319ED2AB60260
:10046000031C372A7F30B6070318ED2A3D2A813056
:10047000B602031CED2A0319ED2A3608F700F8012D
:10048000F901FA01B5012B08B400B4172C08B30028
:100490002D08B2001930B6003108B2020318602AE4
:1004A0000130B3020318602AB4020318602AB502AF
:1004B0000318602AB50AB40AB30A3108B207922AAF
:1004C0003008B30203187B2A0130B40203187B2AD8
:1004D000B50203187B2AB50AB40A3008B3073108FD
:1004E000B207031C922AB30A031D922AB40A031D01
:1004F000922AB50A922A2F088038B4020318912A4A
:100500000130B5020318912AB50A2F088038B407C4
:100510003008B307031C6F2AB40A031D6F2AB50AFB
:100520006F2A7A14B60B952AA02A0310B20DB30DC8
:10053000B40DB50D0310FA0DF90DF80DB70D4C2AD9
:10054000371CA82A0310F80CF90CFA0CB70CAB2ACC
:10055000F7030319ED2AB71BD42A0310B20DB30D0C
:10056000B40DB50D3108B2020318C02A0130B30230
:100570000318C02AB4020318C02AB502031CE32AD8
:100580003008B3020318CB2A0130B4020318CB2A77
:10059000B502031CE32A2F088038B4020318D42ABA
:1005A0000130B502031CE32AFA0A031DE32AF90A03
:1005B000031DE32AF80A031DE32AF70A0319ED2AAB
:1005C000F80CF90CFA0C2B08B6002F08B606B61F6B
:1005D000EB2AF817F12AF813F12AF701F801F901CB
:1005E000FA01080032080319622BBA003608031911
:1005F000622BBA070318032B7F30BA02031C622B4D
:100600000319622B072B8130BA070318622B3A08B3
:10061000F700F801F901FA013308BE00BE173408EB
:10062000BD003508BC001830BA00BB013C1C302BA3
:100630003908FA07031C222BF90A031D222BF80A9A
:100640000319BB173808F907031C292BF80A0319EB
:10065000BB173708B400B4173408F8070318BB17E2
:10066000BB0DF80CF90CFA0CBE0CBD0CBC0C031045
:10067000BA0B152B0130F7070318622BF81B472B19
:10068000BE0DFA0DF90DF80DF7030319622BBE1F0D
:10069000582BFA0A031D582BF90A031D582BF80A88
:1006A000031D582BF80CF90CFA0CF70A0319622BEE
:1006B0003308BB003708BB06BB1F602BF817662B3F
:1006C000F813662BF701F801F901FA0108008030F0
:1006D0008318AB06B001B1012708AF002B08AF06A5
:1006E00026080319572CAE00F7002A080319602CBE
:1006F000AE020319FC2B031CBA2B2B08B400B41751
:100700002C08B3002D08B200B1010310B40CB30CD7
:10071000B20CB10CAE0B842BAF1F912B3014742C88
:1007200030102E103016293084008313892C30129B
:10073000AF1BA42B2E1CAF2BB40CB30CB20CB10C02
:10074000F70A03196F2CAF2BB41BB22B0310B10D9A
:10075000B20DB30DB40DF70303196F2CA42B301792
:100760001C2C30132708AF00AF1FB82BB417682C10
:10077000B413682C2A08AE00F7002608AE0227083A
:10078000B400B4172808B3002908B200B10103105F
:10079000B40CB30CB20CB10CAE0BC62BAF1FD32BE9
:1007A000B014742CB0102E10B0162D3084008313AA
:1007B000892CB012AF1BE62B2E1CF12BB40CB30C02
:1007C000B20CB10CF70A03196F2CF12BB41BF42BEC
:1007D0000310B10DB20DB30DB40DF70303196F2C57
:1007E000E62BB0171C2CB0132B08AF00AF1FFA2B51
:1007F000B417682CB413682C2B08B400B4172C0859
:10080000B3002D08B200AF1F092CB4133015742C9F
:100810003011B1012E10293084008313892CAF1BB5
:10082000322C2708AF002E1C1C2CB40CB30CB20CBD
:10083000B10CF70A03196F2CB11F2D2CB20A031D3E
:100840002D2CB30A031D2D2CB40A031D2D2CB40C22
:10085000B30CB20CF70A03196F2C301BB12BB01B71
:10086000F32B512C8030B406B41F3A2C742C2B0877
:10087000AF00472C2708AF00B408031D472CB3086E
:10088000031D472CB208031D472CF701682CB41B2D
:10089000512C0310B10DB20DB30DB40DF70B472C55
:1008A0006F2CAF1F552CB417682CB413682C2A0872
:1008B000F7002B08B4002C08B3002D08B200682CF8
:1008C0002608F7002708B4002808B3002908B2005A
:1008D0003408F8003308F9003208FA00A72CF701B1
:1008E000F801F901FA01A72CB101B209B309B40961
:1008F000B109B10A031D822CB20A031D822CB30A6E
:100900000319B40A3018902BB018D22B3019082CC8
:10091000372C0008B207031C932CB30A031D932C39
:10092000B40A03192E1484030008B307031C9B2C7C
:10093000B40A03192E1484030008801F803AB407F8
:1009400003182E14301A972BB01AD92B0F2C08002D
:10095000201620088316870000008312A0152008A7
:1009600083168700000083120712201220088316C6
:100970008700000083128711A011200883168700CA
:1009800080308312A600AE20E330A600AE202012F5
:1009900020088316870000008312A0152008831604
:1009A00087008312871DD22C0000D62C0000201651
:1009B000200883168700000064308312A6009A2066
:1009C000201620088316870000008312A015200837
:1009D0008316870000008312071220122008831656
:1009E0008700000083128711A0112008831687005A
:1009F00081308312A600AE200130F700F82078087D
:100A0000A1000130F700F8207808A200F701F820D3
:100A10007808A300201220088316870000008312A4
:100A2000A0152008831687008312871D152D00004E
:100A3000192D00002016200883168700000083125D
:100A4000A20CA20C3F30A205A7012108A600A70016
:100A5000A601220EF700F030F70577082607A4005C
:100A60002708A5000318A50A2508A7002408A60042
:100A70000B227708A6007808A7007908A8007A0852
:100A8000A900AD007908AC007808AB007708AA008F
:100A9000B101FF30B0007F30AF008E30AE002822B1
:100AA0005230B500B830B4002F30B3008630B200F9
:100AB0007A08B9007908B8007808B7007708B60056
:100AC000F22283106630A900A800BB30A700843052
:100AD000A6007A08AD007908AC007808AB0077086A
:100AE000AA0067238A150A12A528F701F801F9015F
:100AF000FA01BA01BB01BC01BD0139083804370451
:100B000036040319B32D2030BE000310B20DB30D0F
:100B1000B40DB50DBA0DBB0DBC0DBD0D39083D02B0
:100B2000031D9C2D38083C02031D9C2D37083B02F9
:100B3000031D9C2D36083A02031CAD2D3608BA025F
:100B40003708031C370FBB023808031C380FBC02E0
:100B50003908031C390FBD020314F70DF80DF90D08
:100B6000FA0DBE0B852D3A3084008313080004086B
:100B7000AA002908AC000319D62D2808B5002708BB
:100B8000B4002608B3002508B200B901B80120302E
:100B9000B7008230B600F2227A08A8007908A700D0
:100BA0007808A6007708A500AC0BBD2D2808B50075
:100BB0002708B4002608B3002508B2003208B63C66
:100BC000B200FA013308B600B3170310B30CB40C2B
:100BD000B50CFA0CF90CF80CF70CB20BE52DB61F9E
:100BE000FC2DF709F809F909FA09F70A0319F80AB7
:100BF0000319F90A0319FA0A7A08A8007908A70064
:100C00007808A6007708A500A81F132EAA03AA1625
:100C1000A509A609A709A809A50A0319A60A03197F
:100C2000A70A0319A80A3B30B1009A30B000CA30B5
:100C3000AF00AE010A30AC0029080319AA0A28083F
:100C4000B5002708B4002608B3002508B200310813
:100C5000B9003008B8002F08B7002E08B600752577
:100C60000008A500840A0008A600840A0008A7005E
:100C7000840A0008A800FD308407F708031D532EDE
:100C8000290A2C020319532E2A080319552E0F394D
:100C90002C0203194D2E0318852EAA1B852E2A1B04
:100CA000552E2030812E2030AA05AA1E632EAA12AE
:100CB0002908031DAA037708AA002D30B2003020AE
:100CC0002A08F700AA0129082C02031D712E7708B3
:100CD000AA002E30B20030202A08F7002030AA05E2
:100CE00000303030AA1E812EAA122908031DAA0343
:100CF0007708AA002D30B20030202A08F700AA0198
:100D00003030F7077708B20030203108B5003008DE
:100D1000B4002F08B3002E08B200B901B801B70122
:100D20000A30B60075257A08B1007908B000780855
:100D3000AF007708AE00AC0B1F2E0800201620086D
:100D40008316870000008312A015200883168700F1
:100D5000000083120712201220088316870000006B
:100D600083128711A0112008831687008030831218
:100D7000A600AE20E530A600AE206430A6009A2082
:100D8000201620088316870000008312A015200873
:100D90008316870000008312871DCC2E07122012B5
:100DA000200883168700000083128711A0112008F5
:100DB0008316870081308312A600AE200130F70031
:100DC000F8207808A1000130F700F8207808A20088
:100DD000F701F8207808A300201220088316870066
:100DE00000008312A0152008831687008312871D38
:100DF000F72E0000FB2E0000201620088316870027
:100E000000008312A20CA20C3F30A205A70121080A
:100E1000A600A700A601220EF700F030F70577081C
:100E20002607A4002708A5000318A50A2508A7007F
:100E30002408A6000B227708A6007808A7007908E6
:100E4000A8007A08A900AD007908AC007808AB00CA
:100E50007708AA00B101FF30B0007F30AF008E30BC
:100E6000AE002822B501B4017A30B3008530B2005B
:100E70007A08B9007908B8007808B7007708B60092
:100E8000F2228310A901A801C030A7008130A6007A
:100E90007A08AD007908AC007808AB007708AA00A2
:080EA00067238A150A12E328FA
:10004000A01258100D050000F332F43A701DA012F2
:1000500058100D050001D4326D383A102533A00632
:100060000A00C83A6D1DA01266100D050000083088
:10007000F80000008711A0112008831687000000F7
:100080008312A70D0712031C4B2820162008831685
:1000900087004F2883122012200883168700000053
:1000A0008312A0152008831687008312871D562807
:1000B000F80B392800008711A0112008831687004B
:1000C000000083122016200883168700000000001D
:1000D0008312A0152008831687008312871D6E28BF
:1000E000F8010000071A78148711A0112008831660
:1000F00087008312071220122008831687008312BC
:100100000800201620088316870000008312A0151F
:10011000200883168700000083120712201220088F
:1001200083168700000083128711A0112008831610
:10013000870080308312A7003720FE30A7003720C9
:10014000201220088316870000008312A0152008C3
:10015000831687008312871DAB280000AF2800009C
:100160002016200883168700000083128A150A12C1
:10017000662883168613831286130830F800C02879
:100180000000F817D128F813B30C03188617031CC6
:1001900086137817D1287813F80BC428CF280000CD
:1001A00086173F308400840BD3280000F81BC32837
:1001B000781BCB280800831603178C170C1400003B
:1001C000000083120C087F3903191F290313A200B2
:1001D00003170D080313A30003170F080313A4004C
:1001E0002208B300B920230803178D000313240845
:1001F00003178F0083168C170C1400000000831265
:100200000C0D0E0D7F3903191F290313A2000317CC
:100210000D080313A30003170F080313A4002208FB
:10022000B300B920230803178D0003132408031714
:100230008F008D0A03198F0A0313DB28031703139A
:100240008A150A126F2827308400831300080319C7
:1002500036290230F800F701F70B2C29F80B2B296F
:100260009730F700F70B3229800B29290800083056
:10027000A8007708A9002016200883168700000030
:100280008312A0152008831687008312871D462934
:10029000071A0314071E0310F80D0000A011200810
:1002A0008316870083128711A80B3B29201620088C
:1002B0008316870000008312071229080319652995
:1002C000201220088316870083120000A015200842
:1002D000831687008312871D6B2900008711A011E8
:1002E00020088316870000008312071220122008BE
:1002F00083168700831208002016200883168700C3
:1003000000008312A01520088316870000008312C6
:10031000071220122008831687000000831287111D
:10032000A01120088316870080308312A700372091
:10033000E730A7003720201620088316870000002A
:100340008312A01520088316870000008312871DE2
:10035000A7290712201220088316870000008312A5
:100360008711A01120088316870081308312A7000F
:100370003720F70137217808A30023083A392204EF
:10038000A300201620088316870000008312A01502
:1003900020088316870000008312871DCD290712CD
:1003A0002012200883168700000083128711A011F5
:1003B00020088316870080308312A7003720E7309B
:1003C000A70037202308A700372020122008831613
:1003D000870000008312A01520088316870083126F
:1003E000871DF0290000F42900002016200883163C
:1003F0008700000083122308F80008008316031703
:100400008C170C140000000003182D2A83120C080E
:100410007F390313A70003170D080313A800031760
:100420000F080313A9002708B300B92028080317F1
:100430008D000313290803178F0083168C170C14E3
:100440000000000083120313A60B272A2A2A831612
:1004500003172D2A4C2A8316031783120C0D0E0D39
:100460007F390313A70003170D080313A800031710
:100470000F080313A9002708B300B92028080317A1
:100480008D000313290803178F008D0A03198F0AA3
:1004900003100313A60BFE290800A41B5F2A0F30CC
:1004A000F700230EF7050A30770203185A2A303076
:1004B000F7075C2A2408F7077708B300B9200F3044
:1004C000A3050A3023020318672A3030692AA413CF
:1004D0002408A3072308B300B92008008E30F700D2
:1004E0002808F8002708F900FA01F808031D822AF5
:1004F0007908F800F9010830F702F808031D822A8C
:10050000F7018A2A0310F81B892AF90DF80DF70361
:10051000822AF81308002B080319502BB7002F0864
:100520000319502BB702031C9A2A7F30B707031810
:10053000502BA02A8130B702031C502B0319502BDB
:100540003708F700F801F901FA01B6012C08B500E7
:10055000B5172D08B4002E08B3001930B7003208C3
:10056000B3020318C32A0130B4020318C32AB50228
:100570000318C32AB6020318C32AB60AB50AB40A76
:100580003208B307F52A3108B4020318DE2A013015
:10059000B5020318DE2AB6020318DE2AB60AB50A27
:1005A0003108B4073208B307031CF52AB40A031D47
:1005B000F52AB50A031DF52AB60AF52A300880384F
:1005C000B5020318F42A0130B6020318F42AB60A59
:1005D00030088038B5073108B407031CD22AB50AA1
:1005E000031DD22AB60AD22A7A14B70BF82A032B93
:1005F0000310B30DB40DB50DB60D0310FA0DF90DC2
:10060000F80DB80DAF2A381C0B2B0310F80CF90CA1
:10061000FA0CB80C0E2BF7030319502BB81B372B11
:100620000310B30DB40DB50DB60D3208B3020318A7
:10063000232B0130B4020318232BB5020318232BFC
:10064000B602031C462B3108B40203182E2B0130CE
:10065000B50203182E2BB602031C462B3008803837
:10066000B5020318372B0130B602031C462BFA0AD9
:10067000031D462BF90A031D462BF80A031D462BC2
:10068000F70A0319502BF80CF90CFA0C2C08B700D8
:100690003008B706B71F4E2BF817542BF813542BFE
:1006A000F701F801F901FA01080033080319C52B15
:1006B000BB0037080319C52BBB070318662B7F3017
:1006C000BB02031CC52B0319C52B6A2B8130BB074A
:1006D0000318C52B3B08F700F801F901FA013408AB
:1006E000BF00BF173508BE003608BD001830BB007C
:1006F000BC013D1C932B3A08FA07031C852BF90A11
:10070000031D852BF80A0319BC173908F907031CC8
:100710008C2BF80A0319BC173808B500B517350833
:10072000F8070318BC17BC0DF80CF90CFA0CBF0C39
:10073000BE0CBD0C0310BB0B782B0130F707031860
:10074000C52BF81BAA2BBF0DFA0DF90DF80DF703F9
:100750000319C52BBF1FBB2BFA0A031DBB2BF90ABC
:10076000031DBB2BF80A031DBB2BF80CF90CFA0C6C
:10077000F70A0319C52B3408BC003808BC06BC1F97
:10078000C32BF817C92BF813C92BF701F801F9018E
:10079000FA01080080308318AC06B101B2012808C4
:1007A000B0002C08B00627080319BA2CAF00F700D8
:1007B0002B080319C32CAF0203195F2C031C1D2C3B
:1007C0002C08B500B5172D08B4002E08B300B201EF
:1007D0000310B50CB40CB30CB20CAF0BE72BB01F6D
:1007E000F42B3114D72C31102F1031162A308400FD
:1007F0008313EC2C3112B01B072C2F1C122CB50CC0
:10080000B40CB30CB20CF70A0319D22C122CB51B82
:10081000152C0310B20DB30DB40DB50DF70303196C
:10082000D22C072C31177F2C31132808B000B01FB1
:100830001B2CB517CB2CB513CB2C2B08AF00F70016
:100840002708AF022808B500B5172908B4002A0800
:10085000B300B2010310B50CB40CB30CB20CAF0B67
:10086000292CB01F362CB114D72CB1102F10B11673
:100870002E3084008313EC2CB112B01B492C2F1C9A
:10088000542CB50CB40CB30CB20CF70A0319D22CCF
:10089000542CB51B572C0310B20DB30DB40DB50D70
:1008A000F7030319D22C492CB1177F2CB1132C0854
:1008B000B000B01F5D2CB517CB2CB513CB2C2C087A
:1008C000B500B5172D08B4002E08B300B01F6C2C6E
:1008D000B5133115D72C3111B2012F102A308400F5
:1008E0008313EC2CB01B952C2808B0002F1C7F2CF8
:1008F000B50CB40CB30CB20CF70A0319D22CB21F0E
:10090000902CB30A031D902CB40A031D902CB50A39
:10091000031D902CB50CB40CB30CF70A0319D22CA0
:10092000311B142CB11B562CB42C8030B506B51FCE
:100930009D2CD72C2C08B000AA2C2808B000B50894
:10094000031DAA2CB408031DAA2CB308031DAA2C4E
:10095000F701CB2CB51BB42C0310B20DB30DB40DA5
:10096000B50DF70BAA2CD22CB01FB82CB517CB2C79
:10097000B513CB2C2B08F7002C08B5002D08B400BC
:100980002E08B300CB2C2708F7002808B50029084B
:10099000B4002A08B3003508F8003408F900330819
:1009A000FA000A2DF701F801F901FA010A2DB20146
:1009B000B309B409B509B209B20A031DE52CB30A9B
:1009C000031DE52CB40A0319B50A3118F32BB1182D
:1009D000352C31196B2C9A2C0008B307031CF62C0C
:1009E000B40A031DF62CB50A03192F14840300085A
:1009F000B407031CFE2CB50A03192F148403000846
:100A0000801F803AB50703182F14311AFA2BB11A38
:100A10003C2C722C0800201620088316870000004A
:100A20008312A01520088316870000008312071286
:100A30002012200883168700000083128711A0115E
:100A400020088316870080308312A7003720E33008
:100A5000A700372020122008831687000000831289
:100A6000A0152008831687008312871D352D0000EE
:100A7000392D0000201620088316870000006430FE
:100A80008312A70023212016200883168700000068
:100A90008312A01520088316870000008312071216
:100AA0002012200883168700000083128711A011EE
:100AB00020088316870081308312A7003720013079
:100AC000F70037217808A2000130F70037217808B5
:100AD000A300F70137217808A4002012200883160C
:100AE000870000008312A015200883168700831258
:100AF000871D782D00007C2D00002016200883160D
:100B0000870000008312A30CA30C3F30A305A801AB
:100B10002208A700A800A701230EF700F030F70570
:100B200077082707A5002808A6000318A60A2608A4
:100B3000A8002508A7006E227708A7007808A8005B
:100B40007908A9007A08AA00AE007908AD007808F3
:100B5000AC007708AB00B201FF30B1007F30B000CD
:100B60008E30AF008B225230B600B830B5002F3037
:100B7000B4008630B3007A08BA007908B900780862
:100B8000B8007708B700552383106630AA00A90083
:100B9000BB30A8008430A7007A08AE007908AD0009
:100BA0007808AC007708AB00CA238A150A12DB2844
:100BB000F701F801F901FA01BB01BC01BD01BE0159
:100BC0003A083904380437040319162E2030BF00C0
:100BD0000310B30DB40DB50DB60DBB0DBC0DBD0DA1
:100BE000BE0D3A083E02031DFF2D39083D02031DCC
:100BF000FF2D38083C02031DFF2D37083B02031C64
:100C0000102E3708BB023808031C380FBC02390805
:100C1000031C390FBD023A08031C3A0FBE0203142D
:100C2000F70DF80DF90DFA0DBF0BE82D3B308400E0
:100C3000831308000408AB002A08AD000319392EFD
:100C40002908B6002808B5002708B4002608B30014
:100C5000BA01B9012030B8008230B70055237A08B4
:100C6000A9007908A8007808A7007708A600AD0BAE
:100C7000202E2908B6002808B5002708B400260849
:100C8000B3003308B63CB300FA013408B700B41718
:100C90000310B40CB50CB60CFA0CF90CF80CF70CEC
:100CA000B30B482EB71F5F2EF709F809F909FA09A7
:100CB000F70A0319F80A0319F90A0319FA0A7A0854
:100CC000A9007908A8007808A7007708A600A91F3E
:100CD000762EAB03AB16A609A709A809A909A60A8F
:100CE0000319A70A0319A80A0319A90A3B30B2007D
:100CF0009A30B100CA30B000AF010A30AD002A0806
:100D00000319AB0A2908B6002808B5002708B40063
:100D10002608B3003208BA003108B9003008B8001C
:100D20002F08B700D8250008A600840A0008A700ED
:100D3000840A0008A800840A0008A900FD3084077E
:100D4000F708031DB62E2A0A2D020319B62E2B080A
:100D50000319B82E0F392D020319B02E0318E82EEF
:100D6000AB1BE82E2B1BB82E2030E42E2030AB0519
:100D7000AB1EC62EAB122A08031DAB037708AB00CF
:100D80002D30B300B9202B08F700AB012A082D0243
:100D9000031DD42E7708AB002E30B300B9202B08EA
:100DA000F7002030AB0500303030AB1EE42EAB1224
:100DB0002A08031DAB037708AB002D30B300B92020
:100DC0002B08F700AB013030F7077708B300B920E4
:100DD0003208B6003108B5003008B4002F08B3005F
:100DE000BA01B901B8010A30B700D8257A08B200B3
:100DF0007908B1007808B0007708AF00AD0B822EFB
:100E00000800201620088316870000008312A01512
:100E10002008831687000000831207122012200882
:100E200083168700000083128711A0112008831603
:100E3000870080308312A7003720E530A7003720D5
:100E40006430A700232120162008831687000000A5
:100E50008312A01520088316870000008312871DC7
:100E60002F2F0712201220088316870000008312FC
:100E70008711A01120088316870081308312A700F4
:100E800037200130F70037217808A2000130F70041
:100E900037217808A300F70137217808A400201231
:100EA00020088316870000008312A01520088316EF
:100EB00087008312871D5A2F00005E2F0000201626
:100EC00020088316870000008312A30CA30C3F3078
:100ED000A305A8012208A700A800A701230EF70078
:100EE000F030F70577082707A5002808A6000318A3
:100EF000A60A2608A8002508A7006E227708A700E2
:100F00007808A8007908A9007A08AA00AE00790834
:100F1000AD007808AC007708AB00B201FF30B1003B
:100F20007F30B0008E30AF008B22B601B5017A3031
:100F3000B4008530B3007A08BA007908B90078089F
:100F4000B8007708B70055238310AA01A901C03063
:100F5000A8008130A7007A08AE007908AD007808B3
:0E0F6000AC007708AB00CA238A150A121929C3
:10100000840183131F308305713083168F000F080E
:10101000861383128617831603170908C0398900BF
:1010200003131F129F1200300317880083128701D9
:1010300088018901FF300313A000831603170908F4
:10104000C039890003131F129F1200300317880054
:10105000831203131F139F1383169F1383121F14EE
:101060009412A012200883168700831220162008ED
:10107000831687008312A011200883168700013091
:10108000831294000030831694000108C739083891
:101090008100831290010030F80092000030831626
:1010A000920083122015200883168700831297016F
:1010B00083169B019C0101309D0083120317870159
:1010C0008801890104308D0000308F008A110313DC
:1010D00052288A150230A100FA30A6008A119A20FF
:1010E0008A15A10B6C288A113D298A157808A10060
:1010F0001D3003178D0000308F00031007300313DD
:10110000A5008A1199218A152108A2003730A30071
:101110008A11E8298A152030B2008A1130208A15F8
:101120000D30B2008A1130208A150A30B2008A11BF
:1011300030208A150230A100FA30A6008A119A20C8
:101140008A15A10B9C288A11A82C8A157708A10062
:101150007808A2007908A3007A08A40024300317B5
:101160008D0000308F00031006300313A5008A1194
:1011700099218A15893084002408A8002308A70033
:101180002208A6002108A5000230A9008A11B7256F
:101190008A152030B2008A1130208A150D30B20035
:1011A0008A1130208A150A30B2008A1130208A153F
:1011B0000230A100FA30A6008A119A208A15A10BEC
:1011C000DA288A119E2E8A157708A1007808A200D5
:1011D0007908A3007A08A4002A3003178D00003094
:1011E0008F00031005300313A5008A1199218A1579
:1011F000893084002408A8002308A7002208A6003C
:101200002108A5000230A9008A11B7258A152030CF
:10121000B2008A1130208A150D30B2008A113020B8
:101220008A150A30B2008A1130208A150430A100D4
:10123000FA30A6008A119A208A15A10B1829732862
:02124000630049
:1010300088018901FF300313A000A1018316031763
:101040000908C039890003131F129F1200300317CB
:101050008800831203131F139F1383169F13831299
:101060001F149412A01220088316870083122016E2
:101070002008831687008312A0112008831687009A
:101080000130831294000030831694000108C739A0
:1010900008388100831290010030F800920000307F
:1010A000831692008312201520088316870083126E
:1010B000970183169B019C0101309D008312031749
:1010C0008701880189018A11031381288A15043058
:1010D00003178D0000308F008A110313DB288A1557
:1010E0000230A200FA30A7008A1123218A15A20B30
:1010F00072282108093C031CA628A2018A117C2120
:101100008A157808A2001D3003178D0000308F006B
:10111000031007300313A6008A11FE218A15220846
:10112000A3003730A4008A114D228A152030B30065
:101130008A11B9208A150D30B3008A11B9208A1599
:101140000A30B3008A11B9208A15D0280430A200D1
:101150008A117C218A157808A200243003178D009B
:1011600000308F00031007300313A6008A11FE2100
:101170008A152208A3003730A4008A114D228A154F
:101180002030B3008A11B9208A150D30B3008A11BE
:10119000B9208A150A30B3008A11B9208A15A10135
:1011A0000230A200FA30A7008A1123218A15A20B6F
:1011B000D2288A110B2D8A157708A2007808A3007F
:1011C0007908A4007A08A5002B3003178D000030A1
:1011D0008F00031006300313A6008A11FE218A1522
:1011E000893084002508A9002408A8002308A70046
:1011F0002208A6000230AA008A111A268A15203079
:10120000B3008A11B9208A150D30B3008A11B920B4
:101210008A150A30B3008A11B9208A150230A2005B
:10122000FA30A7008A1123218A15A20B10298A11EE
:10123000012F8A157708A2007808A3007908A40076
:101240007A08A500313003178D0000308F0003109D
:1012500005300313A6008A11FE218A158930840007
:101260002508A9002408A8002308A7002208A60032
:101270000230AA008A111A268A152030B3008A117A
:10128000B9208A150D30B3008A11B9208A150A30A9
:10129000B3008A11B9208A150430A200FA30A700E1
:1012A0008A1123218A15A20B4E29A10A79286300ED
:04400E00F42CFF3F50
:00000001FF
;PIC16F887
;CRC=90A5 CREATED="14-IV-13 10:31"
;CRC=B39D CREATED="14-IV-13 13:34"
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.lst
1,11 → 1,11
CCS PCM C Compiler, Version 4.106, 47914 14-IV-13 10:31
CCS PCM C Compiler, Version 4.106, 47914 14-IV-13 13:34
 
Filename: D:\MLAB\Modules\Sensors\SHT25V01A\SW\PIC16F887\main.lst
Filename: Z:\home\kaklik\MLAB\Modules\Sensors\SHT25V01A\SW\PIC16F887\main.lst
 
ROM used: 2165 words (26%)
ROM used: 2319 words (28%)
Largest free fragment is 2048
RAM used: 10 (3%) at main() level
36 (10%) worst case
RAM used: 11 (3%) at main() level
37 (10%) worst case
Stack: 2 locations
 
*
37,207 → 37,209
....................
.................... #use delay(clock=8000000)
*
009A: MOVLW 26
009B: MOVWF 04
009C: BCF 03.7
009D: MOVF 00,W
009E: BTFSC 03.2
009F: GOTO 0AD
00A0: MOVLW 02
00A1: MOVWF 78
00A2: CLRF 77
00A3: DECFSZ 77,F
00A4: GOTO 0A3
00A5: DECFSZ 78,F
00A6: GOTO 0A2
00A7: MOVLW 97
00A8: MOVWF 77
00A9: DECFSZ 77,F
00AA: GOTO 0A9
00AB: DECFSZ 00,F
00AC: GOTO 0A0
00AD: RETURN
0123: MOVLW 27
0124: MOVWF 04
0125: BCF 03.7
0126: MOVF 00,W
0127: BTFSC 03.2
0128: GOTO 136
0129: MOVLW 02
012A: MOVWF 78
012B: CLRF 77
012C: DECFSZ 77,F
012D: GOTO 12C
012E: DECFSZ 78,F
012F: GOTO 12B
0130: MOVLW 97
0131: MOVWF 77
0132: DECFSZ 77,F
0133: GOTO 132
0134: DECFSZ 00,F
0135: GOTO 129
0136: RETURN
....................
.................... #use i2c(master, sda=PIN_C4, scl=PIN_C3)
00AE: MOVLW 08
00AF: MOVWF 78
00B0: NOP
00B1: BCF 07.3
00B2: BCF 20.3
00B3: MOVF 20,W
00B4: BSF 03.5
00B5: MOVWF 07
00B6: NOP
00B7: BCF 03.5
00B8: RLF 26,F
00B9: BCF 07.4
00BA: BTFSS 03.0
00BB: GOTO 0C2
00BC: BSF 20.4
00BD: MOVF 20,W
00BE: BSF 03.5
00BF: MOVWF 07
00C0: GOTO 0C6
00C1: BCF 03.5
00C2: BCF 20.4
00C3: MOVF 20,W
00C4: BSF 03.5
00C5: MOVWF 07
00C6: NOP
00C7: BCF 03.5
00C8: BSF 20.3
00C9: MOVF 20,W
00CA: BSF 03.5
00CB: MOVWF 07
00CC: BCF 03.5
00CD: BTFSS 07.3
00CE: GOTO 0CD
00CF: DECFSZ 78,F
00D0: GOTO 0B0
00D1: NOP
00D2: BCF 07.3
00D3: BCF 20.3
00D4: MOVF 20,W
00D5: BSF 03.5
00D6: MOVWF 07
00D7: NOP
00D8: BCF 03.5
00D9: BSF 20.4
00DA: MOVF 20,W
00DB: BSF 03.5
00DC: MOVWF 07
00DD: NOP
00DE: NOP
00DF: BCF 03.5
00E0: BSF 20.3
00E1: MOVF 20,W
00E2: BSF 03.5
00E3: MOVWF 07
00E4: BCF 03.5
00E5: BTFSS 07.3
00E6: GOTO 0E5
00E7: CLRF 78
00E8: NOP
00E9: BTFSC 07.4
00EA: BSF 78.0
00EB: BCF 07.3
00EC: BCF 20.3
00ED: MOVF 20,W
00EE: BSF 03.5
00EF: MOVWF 07
00F0: BCF 03.5
00F1: BCF 07.4
00F2: BCF 20.4
00F3: MOVF 20,W
00F4: BSF 03.5
00F5: MOVWF 07
00F6: BCF 03.5
00F7: RETURN
00F8: MOVLW 08
00F9: MOVWF 27
00FA: MOVF 77,W
00FB: MOVWF 28
00FC: BSF 20.4
00FD: MOVF 20,W
00FE: BSF 03.5
00FF: MOVWF 07
0100: NOP
0101: BCF 03.5
0102: BSF 20.3
0103: MOVF 20,W
0104: BSF 03.5
0105: MOVWF 07
0106: BCF 03.5
0107: BTFSS 07.3
0108: GOTO 107
0109: BTFSC 07.4
010A: BSF 03.0
010B: BTFSS 07.4
010C: BCF 03.0
010D: RLF 78,F
010E: NOP
010F: BCF 20.3
0110: MOVF 20,W
0111: BSF 03.5
0112: MOVWF 07
0113: BCF 03.5
0114: BCF 07.3
0115: DECFSZ 27,F
0116: GOTO 0FC
0117: BSF 20.4
0118: MOVF 20,W
0119: BSF 03.5
011A: MOVWF 07
011B: NOP
011C: BCF 03.5
011D: BCF 07.4
011E: MOVF 28,W
011F: BTFSC 03.2
0120: GOTO 126
0121: BCF 20.4
0122: MOVF 20,W
0123: BSF 03.5
0124: MOVWF 07
0125: BCF 03.5
0126: NOP
0127: BSF 20.3
0128: MOVF 20,W
0129: BSF 03.5
012A: MOVWF 07
012B: BCF 03.5
012C: BTFSS 07.3
012D: GOTO 12C
012E: NOP
012F: BCF 07.3
0130: BCF 20.3
0131: MOVF 20,W
0132: BSF 03.5
0133: MOVWF 07
0134: NOP
0135: BCF 03.5
0136: BCF 07.4
0137: BCF 20.4
0138: MOVF 20,W
0139: BSF 03.5
013A: MOVWF 07
013B: BCF 03.5
013C: RETURN
*
0037: MOVLW 08
0038: MOVWF 78
0039: NOP
003A: BCF 07.3
003B: BCF 20.3
003C: MOVF 20,W
003D: BSF 03.5
003E: MOVWF 07
003F: NOP
0040: BCF 03.5
0041: RLF 27,F
0042: BCF 07.4
0043: BTFSS 03.0
0044: GOTO 04B
0045: BSF 20.4
0046: MOVF 20,W
0047: BSF 03.5
0048: MOVWF 07
0049: GOTO 04F
004A: BCF 03.5
004B: BCF 20.4
004C: MOVF 20,W
004D: BSF 03.5
004E: MOVWF 07
004F: NOP
0050: BCF 03.5
0051: BSF 20.3
0052: MOVF 20,W
0053: BSF 03.5
0054: MOVWF 07
0055: BCF 03.5
0056: BTFSS 07.3
0057: GOTO 056
0058: DECFSZ 78,F
0059: GOTO 039
005A: NOP
005B: BCF 07.3
005C: BCF 20.3
005D: MOVF 20,W
005E: BSF 03.5
005F: MOVWF 07
0060: NOP
0061: BCF 03.5
0062: BSF 20.4
0063: MOVF 20,W
0064: BSF 03.5
0065: MOVWF 07
0066: NOP
0067: NOP
0068: BCF 03.5
0069: BSF 20.3
006A: MOVF 20,W
006B: BSF 03.5
006C: MOVWF 07
006D: BCF 03.5
006E: BTFSS 07.3
006F: GOTO 06E
0070: CLRF 78
0071: NOP
0072: BTFSC 07.4
0073: BSF 78.0
0074: BCF 07.3
0075: BCF 20.3
0076: MOVF 20,W
0077: BSF 03.5
0078: MOVWF 07
0079: BCF 03.5
007A: BCF 07.4
007B: BCF 20.4
007C: MOVF 20,W
007D: BSF 03.5
007E: MOVWF 07
007F: BCF 03.5
0080: RETURN
*
0137: MOVLW 08
0138: MOVWF 28
0139: MOVF 77,W
013A: MOVWF 29
013B: BSF 20.4
013C: MOVF 20,W
013D: BSF 03.5
013E: MOVWF 07
013F: NOP
0140: BCF 03.5
0141: BSF 20.3
0142: MOVF 20,W
0143: BSF 03.5
0144: MOVWF 07
0145: BCF 03.5
0146: BTFSS 07.3
0147: GOTO 146
0148: BTFSC 07.4
0149: BSF 03.0
014A: BTFSS 07.4
014B: BCF 03.0
014C: RLF 78,F
014D: NOP
014E: BCF 20.3
014F: MOVF 20,W
0150: BSF 03.5
0151: MOVWF 07
0152: BCF 03.5
0153: BCF 07.3
0154: DECFSZ 28,F
0155: GOTO 13B
0156: BSF 20.4
0157: MOVF 20,W
0158: BSF 03.5
0159: MOVWF 07
015A: NOP
015B: BCF 03.5
015C: BCF 07.4
015D: MOVF 29,W
015E: BTFSC 03.2
015F: GOTO 165
0160: BCF 20.4
0161: MOVF 20,W
0162: BSF 03.5
0163: MOVWF 07
0164: BCF 03.5
0165: NOP
0166: BSF 20.3
0167: MOVF 20,W
0168: BSF 03.5
0169: MOVWF 07
016A: BCF 03.5
016B: BTFSS 07.3
016C: GOTO 16B
016D: NOP
016E: BCF 07.3
016F: BCF 20.3
0170: MOVF 20,W
0171: BSF 03.5
0172: MOVWF 07
0173: NOP
0174: BCF 03.5
0175: BCF 07.4
0176: BCF 20.4
0177: MOVF 20,W
0178: BSF 03.5
0179: MOVWF 07
017A: BCF 03.5
017B: RETURN
.................... #use rs232(baud=9600,parity=N,xmit=PIN_B7,rcv=PIN_B6,bits=8) //rcv TXD xmit RXD
*
0030: BSF 03.5
0031: BCF 06.7
0032: BCF 03.5
0033: BCF 06.7
0034: MOVLW 08
0035: MOVWF 78
0036: GOTO 037
0037: NOP
0038: BSF 78.7
0039: GOTO 048
003A: BCF 78.7
003B: RRF 32,F
003C: BTFSC 03.0
003D: BSF 06.7
003E: BTFSS 03.0
003F: BCF 06.7
0040: BSF 78.6
0041: GOTO 048
0042: BCF 78.6
0043: DECFSZ 78,F
0044: GOTO 03B
0045: GOTO 046
0046: NOP
0047: BSF 06.7
0048: MOVLW 3F
0049: MOVWF 04
004A: DECFSZ 04,F
004B: GOTO 04A
004C: NOP
004D: BTFSC 78.7
004E: GOTO 03A
004F: BTFSC 78.6
0050: GOTO 042
0051: RETURN
00B9: BSF 03.5
00BA: BCF 06.7
00BB: BCF 03.5
00BC: BCF 06.7
00BD: MOVLW 08
00BE: MOVWF 78
00BF: GOTO 0C0
00C0: NOP
00C1: BSF 78.7
00C2: GOTO 0D1
00C3: BCF 78.7
00C4: RRF 33,F
00C5: BTFSC 03.0
00C6: BSF 06.7
00C7: BTFSS 03.0
00C8: BCF 06.7
00C9: BSF 78.6
00CA: GOTO 0D1
00CB: BCF 78.6
00CC: DECFSZ 78,F
00CD: GOTO 0C4
00CE: GOTO 0CF
00CF: NOP
00D0: BSF 06.7
00D1: MOVLW 3F
00D2: MOVWF 04
00D3: DECFSZ 04,F
00D4: GOTO 0D3
00D5: NOP
00D6: BTFSC 78.7
00D7: GOTO 0C3
00D8: BTFSC 78.6
00D9: GOTO 0CB
00DA: RETURN
....................
....................
....................
244,120 → 246,233
.................... void SHT25_soft_reset()
.................... {
.................... i2c_start(); // Start condition
*
0081: BSF 20.4
0082: MOVF 20,W
0083: BSF 03.5
0084: MOVWF 07
0085: NOP
0086: BCF 03.5
0087: BSF 20.3
0088: MOVF 20,W
0089: BSF 03.5
008A: MOVWF 07
008B: NOP
008C: BCF 03.5
008D: BCF 07.4
008E: BCF 20.4
008F: MOVF 20,W
0090: BSF 03.5
0091: MOVWF 07
0092: NOP
0093: BCF 03.5
0094: BCF 07.3
0095: BCF 20.3
0096: MOVF 20,W
0097: BSF 03.5
0098: MOVWF 07
.................... i2c_write(0x80); // Device address
0099: MOVLW 80
009A: BCF 03.5
009B: MOVWF 27
009C: CALL 037
.................... i2c_write(0xFE); // Device command
009D: MOVLW FE
009E: MOVWF 27
009F: CALL 037
.................... i2c_stop(); // Stop condition
00A0: BCF 20.4
00A1: MOVF 20,W
00A2: BSF 03.5
00A3: MOVWF 07
00A4: NOP
00A5: BCF 03.5
00A6: BSF 20.3
00A7: MOVF 20,W
00A8: BSF 03.5
00A9: MOVWF 07
00AA: BCF 03.5
00AB: BTFSS 07.3
00AC: GOTO 0AB
00AD: NOP
00AE: GOTO 0AF
00AF: NOP
00B0: BSF 20.4
00B1: MOVF 20,W
00B2: BSF 03.5
00B3: MOVWF 07
00B4: NOP
.................... }
00B5: BCF 03.5
00B6: BSF 0A.3
00B7: BCF 0A.4
00B8: GOTO 066 (RETURN)
....................
.................... unsigned int8 SHT25_setup()
.................... #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
....................
.................... unsigned int8 SHT25_setup(unsigned int8 setup_reg ) // writes to status register and returns its value
.................... {
.................... unsigned int8 reg;
....................
.................... i2c_start(); // Start condition
*
013D: BSF 20.4
013E: MOVF 20,W
013F: BSF 03.5
0140: MOVWF 07
0141: NOP
0142: BCF 03.5
0143: BSF 20.3
0144: MOVF 20,W
0145: BSF 03.5
0146: MOVWF 07
0147: NOP
0148: BCF 03.5
0149: BCF 07.4
014A: BCF 20.4
014B: MOVF 20,W
014C: BSF 03.5
014D: MOVWF 07
014E: NOP
014F: BCF 03.5
0150: BCF 07.3
0151: BCF 20.3
0152: MOVF 20,W
0153: BSF 03.5
0154: MOVWF 07
.................... i2c_write(0x80); // Device address
0155: MOVLW 80
0156: BCF 03.5
0157: MOVWF 26
0158: CALL 0AE
017C: BSF 20.4
017D: MOVF 20,W
017E: BSF 03.5
017F: MOVWF 07
0180: NOP
0181: BCF 03.5
0182: BSF 20.3
0183: MOVF 20,W
0184: BSF 03.5
0185: MOVWF 07
0186: NOP
0187: BCF 03.5
0188: BCF 07.4
0189: BCF 20.4
018A: MOVF 20,W
018B: BSF 03.5
018C: MOVWF 07
018D: NOP
018E: BCF 03.5
018F: BCF 07.3
0190: BCF 20.3
0191: MOVF 20,W
0192: BSF 03.5
0193: MOVWF 07
.................... i2c_write(SHT25_ADDR); // Device address
0194: MOVLW 80
0195: BCF 03.5
0196: MOVWF 27
0197: CALL 037
.................... i2c_write(0xE7); // Device command
0159: MOVLW E7
015A: MOVWF 26
015B: CALL 0AE
0198: MOVLW E7
0199: MOVWF 27
019A: CALL 037
....................
.................... i2c_start(); // Start condition
015C: BSF 20.4
015D: MOVF 20,W
015E: BSF 03.5
015F: MOVWF 07
0160: NOP
0161: BCF 03.5
0162: BSF 20.3
0163: MOVF 20,W
0164: BSF 03.5
0165: MOVWF 07
0166: NOP
0167: BCF 03.5
0168: BTFSS 07.3
0169: GOTO 168
016A: BCF 07.4
016B: BCF 20.4
016C: MOVF 20,W
016D: BSF 03.5
016E: MOVWF 07
016F: NOP
0170: BCF 03.5
0171: BCF 07.3
0172: BCF 20.3
0173: MOVF 20,W
0174: BSF 03.5
0175: MOVWF 07
.................... i2c_write(0x81); // Device address
0176: MOVLW 81
0177: BCF 03.5
0178: MOVWF 26
0179: CALL 0AE
.................... reg=i2c_read(0); // Device command
017A: CLRF 77
017B: CALL 0F8
017C: MOVF 78,W
017D: MOVWF 21
019B: BSF 20.4
019C: MOVF 20,W
019D: BSF 03.5
019E: MOVWF 07
019F: NOP
01A0: BCF 03.5
01A1: BSF 20.3
01A2: MOVF 20,W
01A3: BSF 03.5
01A4: MOVWF 07
01A5: NOP
01A6: BCF 03.5
01A7: BTFSS 07.3
01A8: GOTO 1A7
01A9: BCF 07.4
01AA: BCF 20.4
01AB: MOVF 20,W
01AC: BSF 03.5
01AD: MOVWF 07
01AE: NOP
01AF: BCF 03.5
01B0: BCF 07.3
01B1: BCF 20.3
01B2: MOVF 20,W
01B3: BSF 03.5
01B4: MOVWF 07
.................... i2c_write(SHT25_ADDR+1); // Device address
01B5: MOVLW 81
01B6: BCF 03.5
01B7: MOVWF 27
01B8: CALL 037
.................... reg=i2c_read(0); // Read status actual status register
01B9: CLRF 77
01BA: CALL 137
01BB: MOVF 78,W
01BC: MOVWF 23
....................
.................... reg = (reg & 0x3A) | setup_reg;
01BD: MOVF 23,W
01BE: ANDLW 3A
01BF: IORWF 22,W
01C0: MOVWF 23
....................
.................... i2c_start(); // Start condition
01C1: BSF 20.4
01C2: MOVF 20,W
01C3: BSF 03.5
01C4: MOVWF 07
01C5: NOP
01C6: BCF 03.5
01C7: BSF 20.3
01C8: MOVF 20,W
01C9: BSF 03.5
01CA: MOVWF 07
01CB: NOP
01CC: BCF 03.5
01CD: BTFSS 07.3
01CE: GOTO 1CD
01CF: BCF 07.4
01D0: BCF 20.4
01D1: MOVF 20,W
01D2: BSF 03.5
01D3: MOVWF 07
01D4: NOP
01D5: BCF 03.5
01D6: BCF 07.3
01D7: BCF 20.3
01D8: MOVF 20,W
01D9: BSF 03.5
01DA: MOVWF 07
.................... i2c_write(SHT25_ADDR); // Device address
01DB: MOVLW 80
01DC: BCF 03.5
01DD: MOVWF 27
01DE: CALL 037
.................... i2c_write(0xE7); // Write to status register
01DF: MOVLW E7
01E0: MOVWF 27
01E1: CALL 037
.................... i2c_write(reg); // Device command
01E2: MOVF 23,W
01E3: MOVWF 27
01E4: CALL 037
.................... i2c_stop(); // Stop condition
017E: BCF 20.4
017F: MOVF 20,W
0180: BSF 03.5
0181: MOVWF 07
0182: NOP
0183: BCF 03.5
0184: BSF 20.3
0185: MOVF 20,W
0186: BSF 03.5
0187: MOVWF 07
0188: BCF 03.5
0189: BTFSS 07.3
018A: GOTO 189
018B: NOP
018C: GOTO 18D
018D: NOP
018E: BSF 20.4
018F: MOVF 20,W
0190: BSF 03.5
0191: MOVWF 07
0192: NOP
....................
.................... return (reg);
0193: BCF 03.5
0194: MOVF 21,W
0195: MOVWF 78
01E5: BCF 20.4
01E6: MOVF 20,W
01E7: BSF 03.5
01E8: MOVWF 07
01E9: NOP
01EA: BCF 03.5
01EB: BSF 20.3
01EC: MOVF 20,W
01ED: BSF 03.5
01EE: MOVWF 07
01EF: BCF 03.5
01F0: BTFSS 07.3
01F1: GOTO 1F0
01F2: NOP
01F3: GOTO 1F4
01F4: NOP
01F5: BSF 20.4
01F6: MOVF 20,W
01F7: BSF 03.5
01F8: MOVWF 07
01F9: NOP
....................
.................... return (reg);
01FA: BCF 03.5
01FB: MOVF 23,W
01FC: MOVWF 78
.................... }
0196: BSF 0A.3
0197: BCF 0A.4
0198: GOTO 075 (RETURN)
01FD: RETURN
....................
....................
.................... float SHT25_get_temp()
.................... {
.................... unsigned int8 MSB, LSB, Check;
365,229 → 480,229
....................
.................... i2c_start();
*
04A8: BSF 20.4
04A9: MOVF 20,W
04AA: BSF 03.5
04AB: MOVWF 07
04AC: NOP
04AD: BCF 03.5
04AE: BSF 20.3
04AF: MOVF 20,W
04B0: BSF 03.5
04B1: MOVWF 07
04B2: NOP
04B3: BCF 03.5
04B4: BCF 07.4
04B5: BCF 20.4
04B6: MOVF 20,W
04B7: BSF 03.5
04B8: MOVWF 07
04B9: NOP
04BA: BCF 03.5
04BB: BCF 07.3
04BC: BCF 20.3
04BD: MOVF 20,W
04BE: BSF 03.5
04BF: MOVWF 07
.................... I2C_Write(0x80);
04C0: MOVLW 80
04C1: BCF 03.5
04C2: MOVWF 26
04C3: CALL 0AE
050B: BSF 20.4
050C: MOVF 20,W
050D: BSF 03.5
050E: MOVWF 07
050F: NOP
0510: BCF 03.5
0511: BSF 20.3
0512: MOVF 20,W
0513: BSF 03.5
0514: MOVWF 07
0515: NOP
0516: BCF 03.5
0517: BCF 07.4
0518: BCF 20.4
0519: MOVF 20,W
051A: BSF 03.5
051B: MOVWF 07
051C: NOP
051D: BCF 03.5
051E: BCF 07.3
051F: BCF 20.3
0520: MOVF 20,W
0521: BSF 03.5
0522: MOVWF 07
.................... I2C_Write(SHT25_ADDR);
0523: MOVLW 80
0524: BCF 03.5
0525: MOVWF 27
0526: CALL 037
.................... I2C_write(0xE3);
04C4: MOVLW E3
04C5: MOVWF 26
04C6: CALL 0AE
0527: MOVLW E3
0528: MOVWF 27
0529: CALL 037
.................... i2c_stop();
04C7: BCF 20.4
04C8: MOVF 20,W
04C9: BSF 03.5
04CA: MOVWF 07
04CB: NOP
04CC: BCF 03.5
04CD: BSF 20.3
04CE: MOVF 20,W
04CF: BSF 03.5
04D0: MOVWF 07
04D1: BCF 03.5
04D2: BTFSS 07.3
04D3: GOTO 4D2
04D4: NOP
04D5: GOTO 4D6
04D6: NOP
04D7: BSF 20.4
04D8: MOVF 20,W
04D9: BSF 03.5
04DA: MOVWF 07
04DB: NOP
052A: BCF 20.4
052B: MOVF 20,W
052C: BSF 03.5
052D: MOVWF 07
052E: NOP
052F: BCF 03.5
0530: BSF 20.3
0531: MOVF 20,W
0532: BSF 03.5
0533: MOVWF 07
0534: BCF 03.5
0535: BTFSS 07.3
0536: GOTO 535
0537: NOP
0538: GOTO 539
0539: NOP
053A: BSF 20.4
053B: MOVF 20,W
053C: BSF 03.5
053D: MOVWF 07
053E: NOP
....................
.................... delay_ms(100);
04DC: MOVLW 64
04DD: BCF 03.5
04DE: MOVWF 26
04DF: CALL 09A
053F: MOVLW 64
0540: BCF 03.5
0541: MOVWF 27
0542: CALL 123
....................
.................... i2c_start();
04E0: BSF 20.4
04E1: MOVF 20,W
04E2: BSF 03.5
04E3: MOVWF 07
04E4: NOP
04E5: BCF 03.5
04E6: BSF 20.3
04E7: MOVF 20,W
04E8: BSF 03.5
04E9: MOVWF 07
04EA: NOP
04EB: BCF 03.5
04EC: BCF 07.4
04ED: BCF 20.4
04EE: MOVF 20,W
04EF: BSF 03.5
04F0: MOVWF 07
04F1: NOP
04F2: BCF 03.5
04F3: BCF 07.3
04F4: BCF 20.3
04F5: MOVF 20,W
04F6: BSF 03.5
04F7: MOVWF 07
.................... I2C_Write(0x81);
04F8: MOVLW 81
04F9: BCF 03.5
04FA: MOVWF 26
04FB: CALL 0AE
0543: BSF 20.4
0544: MOVF 20,W
0545: BSF 03.5
0546: MOVWF 07
0547: NOP
0548: BCF 03.5
0549: BSF 20.3
054A: MOVF 20,W
054B: BSF 03.5
054C: MOVWF 07
054D: NOP
054E: BCF 03.5
054F: BCF 07.4
0550: BCF 20.4
0551: MOVF 20,W
0552: BSF 03.5
0553: MOVWF 07
0554: NOP
0555: BCF 03.5
0556: BCF 07.3
0557: BCF 20.3
0558: MOVF 20,W
0559: BSF 03.5
055A: MOVWF 07
.................... I2C_Write(SHT25_ADDR+1);
055B: MOVLW 81
055C: BCF 03.5
055D: MOVWF 27
055E: CALL 037
.................... MSB=i2c_read(1);
04FC: MOVLW 01
04FD: MOVWF 77
04FE: CALL 0F8
04FF: MOVF 78,W
0500: MOVWF 21
055F: MOVLW 01
0560: MOVWF 77
0561: CALL 137
0562: MOVF 78,W
0563: MOVWF 22
.................... LSB=i2c_read(1);
0501: MOVLW 01
0502: MOVWF 77
0503: CALL 0F8
0504: MOVF 78,W
0505: MOVWF 22
0564: MOVLW 01
0565: MOVWF 77
0566: CALL 137
0567: MOVF 78,W
0568: MOVWF 23
.................... Check=i2c_read(0);
0506: CLRF 77
0507: CALL 0F8
0508: MOVF 78,W
0509: MOVWF 23
0569: CLRF 77
056A: CALL 137
056B: MOVF 78,W
056C: MOVWF 24
.................... i2c_stop();
050A: BCF 20.4
050B: MOVF 20,W
050C: BSF 03.5
050D: MOVWF 07
050E: NOP
050F: BCF 03.5
0510: BSF 20.3
0511: MOVF 20,W
0512: BSF 03.5
0513: MOVWF 07
0514: BCF 03.5
0515: BTFSS 07.3
0516: GOTO 515
0517: NOP
0518: GOTO 519
0519: NOP
051A: BSF 20.4
051B: MOVF 20,W
051C: BSF 03.5
051D: MOVWF 07
051E: NOP
056D: BCF 20.4
056E: MOVF 20,W
056F: BSF 03.5
0570: MOVWF 07
0571: NOP
0572: BCF 03.5
0573: BSF 20.3
0574: MOVF 20,W
0575: BSF 03.5
0576: MOVWF 07
0577: BCF 03.5
0578: BTFSS 07.3
0579: GOTO 578
057A: NOP
057B: GOTO 57C
057C: NOP
057D: BSF 20.4
057E: MOVF 20,W
057F: BSF 03.5
0580: MOVWF 07
0581: NOP
....................
.................... LSB = LSB >> 2; // trow out status bits
051F: BCF 03.5
0520: RRF 22,F
0521: RRF 22,F
0522: MOVLW 3F
0523: ANDWF 22,F
0582: BCF 03.5
0583: RRF 23,F
0584: RRF 23,F
0585: MOVLW 3F
0586: ANDWF 23,F
....................
.................... data = (((unsigned int16) MSB << 8) + (LSB << 4));
0524: CLRF 27
0525: MOVF 21,W
0526: MOVWF 26
0527: MOVWF 27
0528: CLRF 26
0529: SWAPF 22,W
052A: MOVWF 77
052B: MOVLW F0
052C: ANDWF 77,F
052D: MOVF 77,W
052E: ADDWF 26,W
052F: MOVWF 24
0530: MOVF 27,W
0531: MOVWF 25
0532: BTFSC 03.0
0533: INCF 25,F
0587: CLRF 28
0588: MOVF 22,W
0589: MOVWF 27
058A: MOVWF 28
058B: CLRF 27
058C: SWAPF 23,W
058D: MOVWF 77
058E: MOVLW F0
058F: ANDWF 77,F
0590: MOVF 77,W
0591: ADDWF 27,W
0592: MOVWF 25
0593: MOVF 28,W
0594: MOVWF 26
0595: BTFSC 03.0
0596: INCF 26,F
.................... return(-46.85 + 175.72*((float)data/0xFFFF));
0534: MOVF 25,W
0535: MOVWF 27
0536: MOVF 24,W
0537: MOVWF 26
0538: CALL 20B
0539: MOVF 77,W
053A: MOVWF 26
053B: MOVF 78,W
053C: MOVWF 27
053D: MOVF 79,W
053E: MOVWF 28
053F: MOVF 7A,W
0540: MOVWF 29
0541: MOVWF 2D
0542: MOVF 79,W
0543: MOVWF 2C
0544: MOVF 78,W
0545: MOVWF 2B
0546: MOVF 77,W
0547: MOVWF 2A
0548: CLRF 31
0549: MOVLW FF
054A: MOVWF 30
054B: MOVLW 7F
054C: MOVWF 2F
054D: MOVLW 8E
054E: MOVWF 2E
054F: CALL 228
0550: MOVLW 52
0551: MOVWF 35
0552: MOVLW B8
0553: MOVWF 34
0554: MOVLW 2F
0555: MOVWF 33
0556: MOVLW 86
0557: MOVWF 32
0558: MOVF 7A,W
0559: MOVWF 39
055A: MOVF 79,W
055B: MOVWF 38
055C: MOVF 78,W
055D: MOVWF 37
055E: MOVF 77,W
055F: MOVWF 36
0560: CALL 2F2
0561: BCF 03.1
0562: MOVLW 66
0563: MOVWF 29
0564: MOVWF 28
0565: MOVLW BB
0566: MOVWF 27
0567: MOVLW 84
0568: MOVWF 26
0569: MOVF 7A,W
056A: MOVWF 2D
056B: MOVF 79,W
056C: MOVWF 2C
056D: MOVF 78,W
056E: MOVWF 2B
056F: MOVF 77,W
0570: MOVWF 2A
0571: CALL 367
0597: MOVF 26,W
0598: MOVWF 28
0599: MOVF 25,W
059A: MOVWF 27
059B: CALL 26E
059C: MOVF 77,W
059D: MOVWF 27
059E: MOVF 78,W
059F: MOVWF 28
05A0: MOVF 79,W
05A1: MOVWF 29
05A2: MOVF 7A,W
05A3: MOVWF 2A
05A4: MOVWF 2E
05A5: MOVF 79,W
05A6: MOVWF 2D
05A7: MOVF 78,W
05A8: MOVWF 2C
05A9: MOVF 77,W
05AA: MOVWF 2B
05AB: CLRF 32
05AC: MOVLW FF
05AD: MOVWF 31
05AE: MOVLW 7F
05AF: MOVWF 30
05B0: MOVLW 8E
05B1: MOVWF 2F
05B2: CALL 28B
05B3: MOVLW 52
05B4: MOVWF 36
05B5: MOVLW B8
05B6: MOVWF 35
05B7: MOVLW 2F
05B8: MOVWF 34
05B9: MOVLW 86
05BA: MOVWF 33
05BB: MOVF 7A,W
05BC: MOVWF 3A
05BD: MOVF 79,W
05BE: MOVWF 39
05BF: MOVF 78,W
05C0: MOVWF 38
05C1: MOVF 77,W
05C2: MOVWF 37
05C3: CALL 355
05C4: BCF 03.1
05C5: MOVLW 66
05C6: MOVWF 2A
05C7: MOVWF 29
05C8: MOVLW BB
05C9: MOVWF 28
05CA: MOVLW 84
05CB: MOVWF 27
05CC: MOVF 7A,W
05CD: MOVWF 2E
05CE: MOVF 79,W
05CF: MOVWF 2D
05D0: MOVF 78,W
05D1: MOVWF 2C
05D2: MOVF 77,W
05D3: MOVWF 2B
05D4: CALL 3CA
.................... }
0572: BSF 0A.3
0573: BCF 0A.4
0574: GOTO 0A5 (RETURN)
05D5: BSF 0A.3
05D6: BCF 0A.4
05D7: GOTO 0DB (RETURN)
....................
.................... float SHT25_get_hum()
.................... {
596,214 → 711,214
....................
.................... i2c_start(); //RH
*
069E: BSF 20.4
069F: MOVF 20,W
06A0: BSF 03.5
06A1: MOVWF 07
06A2: NOP
06A3: BCF 03.5
06A4: BSF 20.3
06A5: MOVF 20,W
06A6: BSF 03.5
06A7: MOVWF 07
06A8: NOP
06A9: BCF 03.5
06AA: BCF 07.4
06AB: BCF 20.4
06AC: MOVF 20,W
06AD: BSF 03.5
06AE: MOVWF 07
06AF: NOP
06B0: BCF 03.5
06B1: BCF 07.3
06B2: BCF 20.3
06B3: MOVF 20,W
06B4: BSF 03.5
06B5: MOVWF 07
.................... I2C_Write(0x80);
06B6: MOVLW 80
06B7: BCF 03.5
06B8: MOVWF 26
06B9: CALL 0AE
0701: BSF 20.4
0702: MOVF 20,W
0703: BSF 03.5
0704: MOVWF 07
0705: NOP
0706: BCF 03.5
0707: BSF 20.3
0708: MOVF 20,W
0709: BSF 03.5
070A: MOVWF 07
070B: NOP
070C: BCF 03.5
070D: BCF 07.4
070E: BCF 20.4
070F: MOVF 20,W
0710: BSF 03.5
0711: MOVWF 07
0712: NOP
0713: BCF 03.5
0714: BCF 07.3
0715: BCF 20.3
0716: MOVF 20,W
0717: BSF 03.5
0718: MOVWF 07
.................... I2C_Write(SHT25_ADDR);
0719: MOVLW 80
071A: BCF 03.5
071B: MOVWF 27
071C: CALL 037
.................... I2C_write(0xE5);
06BA: MOVLW E5
06BB: MOVWF 26
06BC: CALL 0AE
071D: MOVLW E5
071E: MOVWF 27
071F: CALL 037
.................... // i2c_stop();
....................
.................... delay_ms(100);
06BD: MOVLW 64
06BE: MOVWF 26
06BF: CALL 09A
0720: MOVLW 64
0721: MOVWF 27
0722: CALL 123
....................
.................... i2c_start();
06C0: BSF 20.4
06C1: MOVF 20,W
06C2: BSF 03.5
06C3: MOVWF 07
06C4: NOP
06C5: BCF 03.5
06C6: BSF 20.3
06C7: MOVF 20,W
06C8: BSF 03.5
06C9: MOVWF 07
06CA: NOP
06CB: BCF 03.5
06CC: BTFSS 07.3
06CD: GOTO 6CC
06CE: BCF 07.4
06CF: BCF 20.4
06D0: MOVF 20,W
06D1: BSF 03.5
06D2: MOVWF 07
06D3: NOP
06D4: BCF 03.5
06D5: BCF 07.3
06D6: BCF 20.3
06D7: MOVF 20,W
06D8: BSF 03.5
06D9: MOVWF 07
.................... I2C_Write(0x81);
06DA: MOVLW 81
06DB: BCF 03.5
06DC: MOVWF 26
06DD: CALL 0AE
0723: BSF 20.4
0724: MOVF 20,W
0725: BSF 03.5
0726: MOVWF 07
0727: NOP
0728: BCF 03.5
0729: BSF 20.3
072A: MOVF 20,W
072B: BSF 03.5
072C: MOVWF 07
072D: NOP
072E: BCF 03.5
072F: BTFSS 07.3
0730: GOTO 72F
0731: BCF 07.4
0732: BCF 20.4
0733: MOVF 20,W
0734: BSF 03.5
0735: MOVWF 07
0736: NOP
0737: BCF 03.5
0738: BCF 07.3
0739: BCF 20.3
073A: MOVF 20,W
073B: BSF 03.5
073C: MOVWF 07
.................... I2C_Write(SHT25_ADDR+1);
073D: MOVLW 81
073E: BCF 03.5
073F: MOVWF 27
0740: CALL 037
.................... MSB=i2c_read(1);
06DE: MOVLW 01
06DF: MOVWF 77
06E0: CALL 0F8
06E1: MOVF 78,W
06E2: MOVWF 21
0741: MOVLW 01
0742: MOVWF 77
0743: CALL 137
0744: MOVF 78,W
0745: MOVWF 22
.................... LSB=i2c_read(1);
06E3: MOVLW 01
06E4: MOVWF 77
06E5: CALL 0F8
06E6: MOVF 78,W
06E7: MOVWF 22
0746: MOVLW 01
0747: MOVWF 77
0748: CALL 137
0749: MOVF 78,W
074A: MOVWF 23
.................... Check=i2c_read(0);
06E8: CLRF 77
06E9: CALL 0F8
06EA: MOVF 78,W
06EB: MOVWF 23
074B: CLRF 77
074C: CALL 137
074D: MOVF 78,W
074E: MOVWF 24
.................... i2c_stop();
06EC: BCF 20.4
06ED: MOVF 20,W
06EE: BSF 03.5
06EF: MOVWF 07
06F0: NOP
06F1: BCF 03.5
06F2: BSF 20.3
06F3: MOVF 20,W
06F4: BSF 03.5
06F5: MOVWF 07
06F6: BCF 03.5
06F7: BTFSS 07.3
06F8: GOTO 6F7
06F9: NOP
06FA: GOTO 6FB
06FB: NOP
06FC: BSF 20.4
06FD: MOVF 20,W
06FE: BSF 03.5
06FF: MOVWF 07
0700: NOP
074F: BCF 20.4
0750: MOVF 20,W
0751: BSF 03.5
0752: MOVWF 07
0753: NOP
0754: BCF 03.5
0755: BSF 20.3
0756: MOVF 20,W
0757: BSF 03.5
0758: MOVWF 07
0759: BCF 03.5
075A: BTFSS 07.3
075B: GOTO 75A
075C: NOP
075D: GOTO 75E
075E: NOP
075F: BSF 20.4
0760: MOVF 20,W
0761: BSF 03.5
0762: MOVWF 07
0763: NOP
....................
.................... // printf("%X %X %X\r\n",MSB, LSB, Check);
....................
.................... LSB = LSB >> 2; // trow out status bits
0701: BCF 03.5
0702: RRF 22,F
0703: RRF 22,F
0704: MOVLW 3F
0705: ANDWF 22,F
0764: BCF 03.5
0765: RRF 23,F
0766: RRF 23,F
0767: MOVLW 3F
0768: ANDWF 23,F
....................
.................... data = (((unsigned int16) MSB << 8) + (LSB << 4) );
0706: CLRF 27
0707: MOVF 21,W
0708: MOVWF 26
0709: MOVWF 27
070A: CLRF 26
070B: SWAPF 22,W
070C: MOVWF 77
070D: MOVLW F0
070E: ANDWF 77,F
070F: MOVF 77,W
0710: ADDWF 26,W
0711: MOVWF 24
0712: MOVF 27,W
0713: MOVWF 25
0714: BTFSC 03.0
0715: INCF 25,F
0769: CLRF 28
076A: MOVF 22,W
076B: MOVWF 27
076C: MOVWF 28
076D: CLRF 27
076E: SWAPF 23,W
076F: MOVWF 77
0770: MOVLW F0
0771: ANDWF 77,F
0772: MOVF 77,W
0773: ADDWF 27,W
0774: MOVWF 25
0775: MOVF 28,W
0776: MOVWF 26
0777: BTFSC 03.0
0778: INCF 26,F
.................... return( -6.0 + 125.0*((float)data/0xFFFF));
0716: MOVF 25,W
0717: MOVWF 27
0718: MOVF 24,W
0719: MOVWF 26
071A: CALL 20B
071B: MOVF 77,W
071C: MOVWF 26
071D: MOVF 78,W
071E: MOVWF 27
071F: MOVF 79,W
0720: MOVWF 28
0721: MOVF 7A,W
0722: MOVWF 29
0723: MOVWF 2D
0724: MOVF 79,W
0725: MOVWF 2C
0726: MOVF 78,W
0727: MOVWF 2B
0728: MOVF 77,W
0729: MOVWF 2A
072A: CLRF 31
072B: MOVLW FF
072C: MOVWF 30
072D: MOVLW 7F
072E: MOVWF 2F
072F: MOVLW 8E
0730: MOVWF 2E
0731: CALL 228
0732: CLRF 35
0733: CLRF 34
0734: MOVLW 7A
0735: MOVWF 33
0736: MOVLW 85
0737: MOVWF 32
0738: MOVF 7A,W
0739: MOVWF 39
073A: MOVF 79,W
073B: MOVWF 38
073C: MOVF 78,W
073D: MOVWF 37
073E: MOVF 77,W
073F: MOVWF 36
0740: CALL 2F2
0741: BCF 03.1
0742: CLRF 29
0743: CLRF 28
0744: MOVLW C0
0745: MOVWF 27
0746: MOVLW 81
0747: MOVWF 26
0748: MOVF 7A,W
0749: MOVWF 2D
074A: MOVF 79,W
074B: MOVWF 2C
074C: MOVF 78,W
074D: MOVWF 2B
074E: MOVF 77,W
074F: MOVWF 2A
0750: CALL 367
0779: MOVF 26,W
077A: MOVWF 28
077B: MOVF 25,W
077C: MOVWF 27
077D: CALL 26E
077E: MOVF 77,W
077F: MOVWF 27
0780: MOVF 78,W
0781: MOVWF 28
0782: MOVF 79,W
0783: MOVWF 29
0784: MOVF 7A,W
0785: MOVWF 2A
0786: MOVWF 2E
0787: MOVF 79,W
0788: MOVWF 2D
0789: MOVF 78,W
078A: MOVWF 2C
078B: MOVF 77,W
078C: MOVWF 2B
078D: CLRF 32
078E: MOVLW FF
078F: MOVWF 31
0790: MOVLW 7F
0791: MOVWF 30
0792: MOVLW 8E
0793: MOVWF 2F
0794: CALL 28B
0795: CLRF 36
0796: CLRF 35
0797: MOVLW 7A
0798: MOVWF 34
0799: MOVLW 85
079A: MOVWF 33
079B: MOVF 7A,W
079C: MOVWF 3A
079D: MOVF 79,W
079E: MOVWF 39
079F: MOVF 78,W
07A0: MOVWF 38
07A1: MOVF 77,W
07A2: MOVWF 37
07A3: CALL 355
07A4: BCF 03.1
07A5: CLRF 2A
07A6: CLRF 29
07A7: MOVLW C0
07A8: MOVWF 28
07A9: MOVLW 81
07AA: MOVWF 27
07AB: MOVF 7A,W
07AC: MOVWF 2E
07AD: MOVF 79,W
07AE: MOVWF 2D
07AF: MOVF 78,W
07B0: MOVWF 2C
07B1: MOVF 77,W
07B2: MOVWF 2B
07B3: CALL 3CA
.................... }
0751: BSF 0A.3
0752: BCF 0A.4
0753: GOTO 0E3 (RETURN)
07B4: BSF 0A.3
07B5: BCF 0A.4
07B6: GOTO 119 (RETURN)
....................
....................
.................... void main()
.................... {
*
002F: DATA 00,00
0036: DATA 00,00
*
0800: CLRF 04
0801: BCF 03.7
831,292 → 946,355
0817: CLRF 07
0818: CLRF 08
0819: CLRF 09
*
081D: CLRF 21
.................... unsigned int8 i=0;
....................
.................... setup_adc_ports(NO_ANALOGS|VSS_VDD);
*
081D: BSF 03.5
081E: BSF 03.6
081F: MOVF 09,W
0820: ANDLW C0
0821: MOVWF 09
0822: BCF 03.6
0823: BCF 1F.4
0824: BCF 1F.5
0825: MOVLW 00
0826: BSF 03.6
0827: MOVWF 08
081E: BSF 03.5
081F: BSF 03.6
0820: MOVF 09,W
0821: ANDLW C0
0822: MOVWF 09
0823: BCF 03.6
0824: BCF 1F.4
0825: BCF 1F.5
0826: MOVLW 00
0827: BSF 03.6
0828: MOVWF 08
.................... setup_adc(ADC_CLOCK_DIV_2);
0828: BCF 03.5
0829: BCF 03.6
082A: BCF 1F.6
082B: BCF 1F.7
082C: BSF 03.5
082D: BCF 1F.7
082E: BCF 03.5
082F: BSF 1F.0
0829: BCF 03.5
082A: BCF 03.6
082B: BCF 1F.6
082C: BCF 1F.7
082D: BSF 03.5
082E: BCF 1F.7
082F: BCF 03.5
0830: BSF 1F.0
.................... setup_spi(SPI_SS_DISABLED);
0830: BCF 14.5
0831: BCF 20.5
0832: MOVF 20,W
0833: BSF 03.5
0834: MOVWF 07
0835: BCF 03.5
0836: BSF 20.4
0837: MOVF 20,W
0838: BSF 03.5
0839: MOVWF 07
083A: BCF 03.5
083B: BCF 20.3
083C: MOVF 20,W
083D: BSF 03.5
083E: MOVWF 07
083F: MOVLW 01
0840: BCF 03.5
0841: MOVWF 14
0842: MOVLW 00
0843: BSF 03.5
0844: MOVWF 14
0831: BCF 14.5
0832: BCF 20.5
0833: MOVF 20,W
0834: BSF 03.5
0835: MOVWF 07
0836: BCF 03.5
0837: BSF 20.4
0838: MOVF 20,W
0839: BSF 03.5
083A: MOVWF 07
083B: BCF 03.5
083C: BCF 20.3
083D: MOVF 20,W
083E: BSF 03.5
083F: MOVWF 07
0840: MOVLW 01
0841: BCF 03.5
0842: MOVWF 14
0843: MOVLW 00
0844: BSF 03.5
0845: MOVWF 14
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
0845: MOVF 01,W
0846: ANDLW C7
0847: IORLW 08
0848: MOVWF 01
0846: MOVF 01,W
0847: ANDLW C7
0848: IORLW 08
0849: MOVWF 01
.................... setup_timer_1(T1_DISABLED);
0849: BCF 03.5
084A: CLRF 10
084A: BCF 03.5
084B: CLRF 10
.................... setup_timer_2(T2_DISABLED,0,1);
084B: MOVLW 00
084C: MOVWF 78
084D: MOVWF 12
084E: MOVLW 00
084F: BSF 03.5
0850: MOVWF 12
084C: MOVLW 00
084D: MOVWF 78
084E: MOVWF 12
084F: MOVLW 00
0850: BSF 03.5
0851: MOVWF 12
.................... setup_ccp1(CCP_OFF);
0851: BCF 03.5
0852: BSF 20.2
0853: MOVF 20,W
0854: BSF 03.5
0855: MOVWF 07
0856: BCF 03.5
0857: CLRF 17
0858: BSF 03.5
0859: CLRF 1B
085A: CLRF 1C
085B: MOVLW 01
085C: MOVWF 1D
0852: BCF 03.5
0853: BSF 20.2
0854: MOVF 20,W
0855: BSF 03.5
0856: MOVWF 07
0857: BCF 03.5
0858: CLRF 17
0859: BSF 03.5
085A: CLRF 1B
085B: CLRF 1C
085C: MOVLW 01
085D: MOVWF 1D
.................... setup_comparator(NC_NC_NC_NC);
085D: BCF 03.5
085E: BSF 03.6
085F: CLRF 07
0860: CLRF 08
0861: CLRF 09
085E: BCF 03.5
085F: BSF 03.6
0860: CLRF 07
0861: CLRF 08
0862: CLRF 09
....................
.................... void SHT25_soft_reset();
.................... SHT25_soft_reset();
0863: BCF 0A.3
0864: BCF 03.6
0865: GOTO 081
0866: BSF 0A.3
.................... printf("SHT25 humidity and temperature sensor example \r\n",);
0862: MOVLW 04
0863: MOVWF 0D
0864: MOVLW 00
0865: MOVWF 0F
0866: BCF 0A.3
0867: BCF 03.6
0868: GOTO 052
0869: BSF 0A.3
0867: MOVLW 04
0868: BSF 03.6
0869: MOVWF 0D
086A: MOVLW 00
086B: MOVWF 0F
086C: BCF 0A.3
086D: BCF 03.6
086E: GOTO 0DB
086F: BSF 0A.3
.................... delay_ms (500);
086A: MOVLW 02
086B: MOVWF 21
086C: MOVLW FA
086D: MOVWF 26
086E: BCF 0A.3
086F: CALL 09A
0870: BSF 0A.3
0871: DECFSZ 21,F
0872: GOTO 06C
0870: MOVLW 02
0871: MOVWF 22
0872: MOVLW FA
0873: MOVWF 27
0874: BCF 0A.3
0875: CALL 123
0876: BSF 0A.3
0877: DECFSZ 22,F
0878: GOTO 072
....................
.................... while(TRUE)
.................... {
.................... printf("setup: %X \r\n",SHT25_setup());
0873: BCF 0A.3
0874: GOTO 13D
0875: BSF 0A.3
0876: MOVF 78,W
0877: MOVWF 21
0878: MOVLW 1D
0879: BSF 03.6
087A: MOVWF 0D
087B: MOVLW 00
087C: MOVWF 0F
087D: BCF 03.0
087E: MOVLW 07
087F: BCF 03.6
0880: MOVWF 25
0881: BCF 0A.3
0882: CALL 199
0883: BSF 0A.3
0884: MOVF 21,W
0885: MOVWF 22
0886: MOVLW 37
0887: MOVWF 23
0888: BCF 0A.3
0889: GOTO 1E8
088A: BSF 0A.3
088B: MOVLW 20
088C: MOVWF 32
088D: BCF 0A.3
088E: CALL 030
088F: BSF 0A.3
0890: MOVLW 0D
0891: MOVWF 32
0892: BCF 0A.3
0893: CALL 030
0894: BSF 0A.3
0895: MOVLW 0A
0896: MOVWF 32
0897: BCF 0A.3
0898: CALL 030
0899: BSF 0A.3
.................... if (i<10)
0879: MOVF 21,W
087A: SUBLW 09
087B: BTFSS 03.0
087C: GOTO 0A6
.................... printf("setup: %X \r\n",SHT25_setup(SHT25_RH12_T14 | SHT25_HEATER_OFF));
087D: CLRF 22
087E: BCF 0A.3
087F: CALL 17C
0880: BSF 0A.3
0881: MOVF 78,W
0882: MOVWF 22
0883: MOVLW 1D
0884: BSF 03.6
0885: MOVWF 0D
0886: MOVLW 00
0887: MOVWF 0F
0888: BCF 03.0
0889: MOVLW 07
088A: BCF 03.6
088B: MOVWF 26
088C: BCF 0A.3
088D: CALL 1FE
088E: BSF 0A.3
088F: MOVF 22,W
0890: MOVWF 23
0891: MOVLW 37
0892: MOVWF 24
0893: BCF 0A.3
0894: CALL 24D
0895: BSF 0A.3
0896: MOVLW 20
0897: MOVWF 33
0898: BCF 0A.3
0899: CALL 0B9
089A: BSF 0A.3
089B: MOVLW 0D
089C: MOVWF 33
089D: BCF 0A.3
089E: CALL 0B9
089F: BSF 0A.3
08A0: MOVLW 0A
08A1: MOVWF 33
08A2: BCF 0A.3
08A3: CALL 0B9
08A4: BSF 0A.3
.................... else
08A5: GOTO 0D0
.................... {
.................... printf("setup: %X \r\n",SHT25_setup(SHT25_RH12_T14 | SHT25_HEATER_ON));
08A6: MOVLW 04
08A7: MOVWF 22
08A8: BCF 0A.3
08A9: CALL 17C
08AA: BSF 0A.3
08AB: MOVF 78,W
08AC: MOVWF 22
08AD: MOVLW 24
08AE: BSF 03.6
08AF: MOVWF 0D
08B0: MOVLW 00
08B1: MOVWF 0F
08B2: BCF 03.0
08B3: MOVLW 07
08B4: BCF 03.6
08B5: MOVWF 26
08B6: BCF 0A.3
08B7: CALL 1FE
08B8: BSF 0A.3
08B9: MOVF 22,W
08BA: MOVWF 23
08BB: MOVLW 37
08BC: MOVWF 24
08BD: BCF 0A.3
08BE: CALL 24D
08BF: BSF 0A.3
08C0: MOVLW 20
08C1: MOVWF 33
08C2: BCF 0A.3
08C3: CALL 0B9
08C4: BSF 0A.3
08C5: MOVLW 0D
08C6: MOVWF 33
08C7: BCF 0A.3
08C8: CALL 0B9
08C9: BSF 0A.3
08CA: MOVLW 0A
08CB: MOVWF 33
08CC: BCF 0A.3
08CD: CALL 0B9
08CE: BSF 0A.3
.................... i = 0;
08CF: CLRF 21
.................... }
.................... delay_ms (500);
089A: MOVLW 02
089B: MOVWF 21
089C: MOVLW FA
089D: MOVWF 26
089E: BCF 0A.3
089F: CALL 09A
08A0: BSF 0A.3
08A1: DECFSZ 21,F
08A2: GOTO 09C
08D0: MOVLW 02
08D1: MOVWF 22
08D2: MOVLW FA
08D3: MOVWF 27
08D4: BCF 0A.3
08D5: CALL 123
08D6: BSF 0A.3
08D7: DECFSZ 22,F
08D8: GOTO 0D2
.................... printf("Temp: %f \r\n",SHT25_get_temp());
08A3: BCF 0A.3
08A4: GOTO 4A8
08A5: BSF 0A.3
08A6: MOVF 77,W
08A7: MOVWF 21
08A8: MOVF 78,W
08A9: MOVWF 22
08AA: MOVF 79,W
08AB: MOVWF 23
08AC: MOVF 7A,W
08AD: MOVWF 24
08AE: MOVLW 24
08AF: BSF 03.6
08B0: MOVWF 0D
08B1: MOVLW 00
08B2: MOVWF 0F
08B3: BCF 03.0
08B4: MOVLW 06
08B5: BCF 03.6
08B6: MOVWF 25
08B7: BCF 0A.3
08B8: CALL 199
08B9: BSF 0A.3
08BA: MOVLW 89
08BB: MOVWF 04
08BC: MOVF 24,W
08BD: MOVWF 28
08BE: MOVF 23,W
08BF: MOVWF 27
08C0: MOVF 22,W
08C1: MOVWF 26
08C2: MOVF 21,W
08C3: MOVWF 25
08C4: MOVLW 02
08C5: MOVWF 29
08C6: BCF 0A.3
08C7: CALL 5B7
08C8: BSF 0A.3
08C9: MOVLW 20
08CA: MOVWF 32
08CB: BCF 0A.3
08CC: CALL 030
08CD: BSF 0A.3
08CE: MOVLW 0D
08CF: MOVWF 32
08D0: BCF 0A.3
08D1: CALL 030
08D2: BSF 0A.3
08D3: MOVLW 0A
08D4: MOVWF 32
08D5: BCF 0A.3
08D6: CALL 030
08D7: BSF 0A.3
08D9: BCF 0A.3
08DA: GOTO 50B
08DB: BSF 0A.3
08DC: MOVF 77,W
08DD: MOVWF 22
08DE: MOVF 78,W
08DF: MOVWF 23
08E0: MOVF 79,W
08E1: MOVWF 24
08E2: MOVF 7A,W
08E3: MOVWF 25
08E4: MOVLW 2B
08E5: BSF 03.6
08E6: MOVWF 0D
08E7: MOVLW 00
08E8: MOVWF 0F
08E9: BCF 03.0
08EA: MOVLW 06
08EB: BCF 03.6
08EC: MOVWF 26
08ED: BCF 0A.3
08EE: CALL 1FE
08EF: BSF 0A.3
08F0: MOVLW 89
08F1: MOVWF 04
08F2: MOVF 25,W
08F3: MOVWF 29
08F4: MOVF 24,W
08F5: MOVWF 28
08F6: MOVF 23,W
08F7: MOVWF 27
08F8: MOVF 22,W
08F9: MOVWF 26
08FA: MOVLW 02
08FB: MOVWF 2A
08FC: BCF 0A.3
08FD: CALL 61A
08FE: BSF 0A.3
08FF: MOVLW 20
0900: MOVWF 33
0901: BCF 0A.3
0902: CALL 0B9
0903: BSF 0A.3
0904: MOVLW 0D
0905: MOVWF 33
0906: BCF 0A.3
0907: CALL 0B9
0908: BSF 0A.3
0909: MOVLW 0A
090A: MOVWF 33
090B: BCF 0A.3
090C: CALL 0B9
090D: BSF 0A.3
.................... delay_ms (500);
08D8: MOVLW 02
08D9: MOVWF 21
08DA: MOVLW FA
08DB: MOVWF 26
08DC: BCF 0A.3
08DD: CALL 09A
08DE: BSF 0A.3
08DF: DECFSZ 21,F
08E0: GOTO 0DA
090E: MOVLW 02
090F: MOVWF 22
0910: MOVLW FA
0911: MOVWF 27
0912: BCF 0A.3
0913: CALL 123
0914: BSF 0A.3
0915: DECFSZ 22,F
0916: GOTO 110
.................... printf("Hum: %f \r\n",SHT25_get_hum());
08E1: BCF 0A.3
08E2: GOTO 69E
08E3: BSF 0A.3
08E4: MOVF 77,W
08E5: MOVWF 21
08E6: MOVF 78,W
08E7: MOVWF 22
08E8: MOVF 79,W
08E9: MOVWF 23
08EA: MOVF 7A,W
08EB: MOVWF 24
08EC: MOVLW 2A
08ED: BSF 03.6
08EE: MOVWF 0D
08EF: MOVLW 00
08F0: MOVWF 0F
08F1: BCF 03.0
08F2: MOVLW 05
08F3: BCF 03.6
08F4: MOVWF 25
08F5: BCF 0A.3
08F6: CALL 199
08F7: BSF 0A.3
08F8: MOVLW 89
08F9: MOVWF 04
08FA: MOVF 24,W
08FB: MOVWF 28
08FC: MOVF 23,W
08FD: MOVWF 27
08FE: MOVF 22,W
08FF: MOVWF 26
0900: MOVF 21,W
0901: MOVWF 25
0902: MOVLW 02
0903: MOVWF 29
0904: BCF 0A.3
0905: CALL 5B7
0906: BSF 0A.3
0907: MOVLW 20
0908: MOVWF 32
0909: BCF 0A.3
090A: CALL 030
090B: BSF 0A.3
090C: MOVLW 0D
090D: MOVWF 32
090E: BCF 0A.3
090F: CALL 030
0910: BSF 0A.3
0911: MOVLW 0A
0912: MOVWF 32
0913: BCF 0A.3
0914: CALL 030
0915: BSF 0A.3
0917: BCF 0A.3
0918: GOTO 701
0919: BSF 0A.3
091A: MOVF 77,W
091B: MOVWF 22
091C: MOVF 78,W
091D: MOVWF 23
091E: MOVF 79,W
091F: MOVWF 24
0920: MOVF 7A,W
0921: MOVWF 25
0922: MOVLW 31
0923: BSF 03.6
0924: MOVWF 0D
0925: MOVLW 00
0926: MOVWF 0F
0927: BCF 03.0
0928: MOVLW 05
0929: BCF 03.6
092A: MOVWF 26
092B: BCF 0A.3
092C: CALL 1FE
092D: BSF 0A.3
092E: MOVLW 89
092F: MOVWF 04
0930: MOVF 25,W
0931: MOVWF 29
0932: MOVF 24,W
0933: MOVWF 28
0934: MOVF 23,W
0935: MOVWF 27
0936: MOVF 22,W
0937: MOVWF 26
0938: MOVLW 02
0939: MOVWF 2A
093A: BCF 0A.3
093B: CALL 61A
093C: BSF 0A.3
093D: MOVLW 20
093E: MOVWF 33
093F: BCF 0A.3
0940: CALL 0B9
0941: BSF 0A.3
0942: MOVLW 0D
0943: MOVWF 33
0944: BCF 0A.3
0945: CALL 0B9
0946: BSF 0A.3
0947: MOVLW 0A
0948: MOVWF 33
0949: BCF 0A.3
094A: CALL 0B9
094B: BSF 0A.3
.................... delay_ms (1000);
0916: MOVLW 04
0917: MOVWF 21
0918: MOVLW FA
0919: MOVWF 26
091A: BCF 0A.3
091B: CALL 09A
091C: BSF 0A.3
091D: DECFSZ 21,F
091E: GOTO 118
094C: MOVLW 04
094D: MOVWF 22
094E: MOVLW FA
094F: MOVWF 27
0950: BCF 0A.3
0951: CALL 123
0952: BSF 0A.3
0953: DECFSZ 22,F
0954: GOTO 14E
.................... i++;
0955: INCF 21,F
.................... }
091F: GOTO 073
0956: GOTO 079
.................... }
....................
0920: SLEEP
0957: SLEEP
 
Configuration Fuses:
Word 1: 2CF4 INTRC_IO NOWDT NOPUT MCLR NOPROTECT NOCPD NOBROWNOUT IESO FCMEN NOLVP NODEBUG
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.pjt
22,7 → 22,7
4=
[Target Data]
OptionString=-p +FM
FileList=D:\MLAB\Modules\Sensors\SHT25V01A\SW\PIC16F887\main.c
FileList=Z:\home\kaklik\MLAB\Modules\Sensors\SHT25V01A\SW\PIC16F887\main.c
[Units]
Count=1
1=main (main)
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.sta
1,22 → 1,22
 
ROM used: 2165 (26%)
2337 (29%) including unused fragments
ROM used: 2319 (28%)
2392 (29%) including unused fragments
 
4 Average locations per line
37 Average locations per statement
34 Average locations per statement
 
RAM used: 10 (3%) at main() level
36 (10%) worst case
RAM used: 11 (3%) at main() level
37 (10%) worst case
 
Stack used: 2 worst case (out of 8 total available)
 
Lines Stmts % Files
----- ----- --- -----
107 58 100 main.c
133 68 100 main.c
23 0 0 main.h
423 0 0 C:\Program Files\PICC\devices\16F887.h
423 0 0 C:\Program Files (x86)\PICC\devices\16F887.h
----- -----
553 58 Total
579 68 Total
 
Page ROM % RAM Vol Diff Functions:
---- --- --- --- --- ---- ----------
23,43 → 23,45
0 20 1 1 @delay_ms1
0 69 3 3 @I2C_READ_1
0 74 3 1 @I2C_WRITE_1
0 34 2 1 @PUTCHAR_1_
0 92 4 1 167 2.2 SHT25_setup
0 205 9 9 558 6.0 SHT25_get_temp
0 34 1 1 @PUTCHAR_1_
0 56 2 0 68 0.6 SHT25_soft_reset
0 130 6 3 349 4.0 SHT25_setup
0 205 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 15 16 @ADDFF
0 182 8 9 538 6.0 SHT25_get_hum
1 289 13 4 231 2.2 MAIN
0 25 1 0 @const102
0 321 14 16 @ADDFF
0 182 8 9 552 6.0 SHT25_get_hum
1 344 15 5 763 5.2 MAIN
0 25 1 0 @const104
0 72 3 3 @PSTRINGC7_69
0 7 0 0 @const104
0 79 4 4 @PSTRINGCN7_69
0 35 2 2 @PRINTF_X_69
0 6 0 0 @const110
0 7 0 0 @const106
0 79 3 4 @PSTRINGCN7_69
0 33 1 2 @PRINTF_X_69
0 7 0 0 @const112
0 6 0 0 @const113
Inline 5 @FTOSD
0 66 3 13 @DIV3232
0 231 11 13 @PRINTF_L32D_69FPFPF
0 6 0 0 @const119
0 231 10 13 @PRINTF_L32D_69FPFPF
0 6 0 0 @const122
 
Program metrics:
Functions 4
Statements 58
Comments 99
Volume (V) 2053
Difficilty (D) 14.3
Effort to implement (E) 29400
Time to implement (T) 27 minutes
Est Delivered Bugs (B) 0
Functions 5
Statements 68
Comments 104
Volume (V) 3203
Difficilty (D) 19.6
Effort to implement (E) 62707
Time to implement (T) 58 minutes
Est Delivered Bugs (B) 1
Cyclomatic Complexity 1
Maintainability (MI) 145
Maintainability (MI) 130
 
Segment Used Free
----------- ---- ----
00000-00003 4 0
00004-007FF 1872 172
00800-00FFF 289 1759
00004-007FF 1971 73
00800-00FFF 344 1704
01000-017FF 0 2048
01800-01FFF 0 2048
 
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.sym
1,93 → 1,96
004 @WRITE_PROGRAM_MEMORY8.P1
004-005 @READ_PROGRAM_MEMORY8.P2
015 CCP_1_LOW
015 CCP_1
015 CCP_1_LOW
016 CCP_1_HIGH
01B CCP_2_LOW
01B CCP_2
01B CCP_2_LOW
01C CCP_2_HIGH
020 @TRIS_C
021 SHT25_get_hum.MSB
021 SHT25_get_temp.MSB
021 SHT25_setup.reg
021 MAIN.@SCRATCH1
021 @PSTRINGC7_69.@SCRATCH1
022 SHT25_get_hum.LSB
022 SHT25_get_temp.LSB
022 @PRINTF_X_69.P1
022 MAIN.@SCRATCH2
022 @PSTRINGC7_69.@SCRATCH2
023 SHT25_get_hum.Check
023 SHT25_get_temp.Check
021 MAIN.i
022 SHT25_setup.setup_reg
022 SHT25_get_hum.MSB
022 SHT25_get_temp.MSB
022 MAIN.@SCRATCH1
022 @PSTRINGC7_69.@SCRATCH1
023 @PRINTF_X_69.P1
023 MAIN.@SCRATCH3
023 @PSTRINGC7_69.@SCRATCH3
024-025 SHT25_get_temp.data
024-025 SHT25_get_hum.data
024 MAIN.@SCRATCH4
025-028 @PRINTF_L32D_69FPFPF.P1
025 @PSTRINGCN7_69.P2
026 @I2C_WRITE_1.P1
026-029 @ADDFF.P2
026-027 @ITOF.P3
026 @delay_ms1.P4
026 @I2C_READ_1.P5
026 SHT25_get_temp.@SCRATCH1
026 SHT25_get_hum.@SCRATCH1
026 @PSTRINGCN7_69.@SCRATCH1
027 @I2C_READ_1.@SCRATCH1
027 SHT25_get_temp.@SCRATCH2
027 SHT25_get_hum.@SCRATCH2
027 @PSTRINGCN7_69.@SCRATCH2
028 @I2C_READ_1.@SCRATCH2
028 SHT25_get_temp.@SCRATCH3
028 SHT25_get_hum.@SCRATCH3
028 @PSTRINGCN7_69.@SCRATCH3
029 @PRINTF_L32D_69FPFPF.P1
029 SHT25_get_temp.@SCRATCH4
029 SHT25_get_hum.@SCRATCH4
02A-02D @ADDFF.P1
02A-02D @DIVFF.P2
02A @PRINTF_L32D_69FPFPF.@SCRATCH1
02B @PRINTF_L32D_69FPFPF.@SCRATCH2
02C @PRINTF_L32D_69FPFPF.@SCRATCH3
02D @PRINTF_L32D_69FPFPF.@SCRATCH4
02E-031 @DIVFF.P1
02E @ADDFF.@SCRATCH1
02E @PRINTF_L32D_69FPFPF.@SCRATCH5
02F @ADDFF.@SCRATCH2
02F @PRINTF_L32D_69FPFPF.@SCRATCH6
030 @ADDFF.@SCRATCH3
030 @PRINTF_L32D_69FPFPF.@SCRATCH7
031 @ADDFF.@SCRATCH4
031 @PRINTF_L32D_69FPFPF.@SCRATCH8
032-035 @DIV3232.P1
032-035 @FTOSD.P2
032 @PUTCHAR_1_.P3
032-035 @MULFF.P4
032 @DIVFF.@SCRATCH1
032 @ADDFF.@SCRATCH5
033 @DIVFF.@SCRATCH2
033 @ADDFF.@SCRATCH6
034 @DIVFF.@SCRATCH3
034 @ADDFF.@SCRATCH7
035 @DIVFF.@SCRATCH4
035 @ADDFF.@SCRATCH8
036-039 @MULFF.P1
036-039 @DIV3232.P2
036 @DIVFF.@SCRATCH5
036 @FTOSD.@SCRATCH1
037 @DIVFF.@SCRATCH6
03A @MULFF.@SCRATCH1
03A @DIV3232.@SCRATCH1
03B @MULFF.@SCRATCH2
03B @DIV3232.@SCRATCH2
03C @MULFF.@SCRATCH3
03C @DIV3232.@SCRATCH3
03D @MULFF.@SCRATCH4
03D @DIV3232.@SCRATCH4
03E @MULFF.@SCRATCH5
03E @DIV3232.@SCRATCH5
023 SHT25_setup.reg
023 SHT25_get_hum.LSB
023 SHT25_get_temp.LSB
023 MAIN.@SCRATCH2
023 @PSTRINGC7_69.@SCRATCH2
024 SHT25_get_hum.Check
024 SHT25_get_temp.Check
024 @PRINTF_X_69.P1
024 SHT25_setup.@SCRATCH1
024 MAIN.@SCRATCH3
024 @PSTRINGC7_69.@SCRATCH3
025-026 SHT25_get_temp.data
025-026 SHT25_get_hum.data
025 MAIN.@SCRATCH4
026 @PSTRINGCN7_69.P1
026-029 @PRINTF_L32D_69FPFPF.P2
027 @I2C_READ_1.P1
027 @I2C_WRITE_1.P2
027-02A @ADDFF.P3
027-028 @ITOF.P4
027 @delay_ms1.P5
027 SHT25_get_temp.@SCRATCH1
027 SHT25_get_hum.@SCRATCH1
027 @PSTRINGCN7_69.@SCRATCH1
028 @I2C_READ_1.@SCRATCH1
028 SHT25_get_temp.@SCRATCH2
028 SHT25_get_hum.@SCRATCH2
028 @PSTRINGCN7_69.@SCRATCH2
029 @I2C_READ_1.@SCRATCH2
029 SHT25_get_temp.@SCRATCH3
029 SHT25_get_hum.@SCRATCH3
029 @PSTRINGCN7_69.@SCRATCH3
02A @PRINTF_L32D_69FPFPF.P1
02A SHT25_get_temp.@SCRATCH4
02A SHT25_get_hum.@SCRATCH4
02B-02E @ADDFF.P1
02B-02E @DIVFF.P2
02B @PRINTF_L32D_69FPFPF.@SCRATCH1
02C @PRINTF_L32D_69FPFPF.@SCRATCH2
02D @PRINTF_L32D_69FPFPF.@SCRATCH3
02E @PRINTF_L32D_69FPFPF.@SCRATCH4
02F-032 @DIVFF.P1
02F @ADDFF.@SCRATCH1
02F @PRINTF_L32D_69FPFPF.@SCRATCH5
030 @ADDFF.@SCRATCH2
030 @PRINTF_L32D_69FPFPF.@SCRATCH6
031 @ADDFF.@SCRATCH3
031 @PRINTF_L32D_69FPFPF.@SCRATCH7
032 @ADDFF.@SCRATCH4
032 @PRINTF_L32D_69FPFPF.@SCRATCH8
033-036 @DIV3232.P1
033-036 @FTOSD.P2
033-036 @MULFF.P3
033 @PUTCHAR_1_.P4
033 @DIVFF.@SCRATCH1
033 @ADDFF.@SCRATCH5
034 @DIVFF.@SCRATCH2
034 @ADDFF.@SCRATCH6
035 @DIVFF.@SCRATCH3
035 @ADDFF.@SCRATCH7
036 @DIVFF.@SCRATCH4
036 @ADDFF.@SCRATCH8
037-03A @MULFF.P1
037-03A @DIV3232.P2
037 @DIVFF.@SCRATCH5
037 @FTOSD.@SCRATCH1
038 @DIVFF.@SCRATCH6
03B @MULFF.@SCRATCH1
03B @DIV3232.@SCRATCH1
03C @MULFF.@SCRATCH2
03C @DIV3232.@SCRATCH2
03D @MULFF.@SCRATCH3
03D @DIV3232.@SCRATCH3
03E @MULFF.@SCRATCH4
03E @DIV3232.@SCRATCH4
03F @MULFF.@SCRATCH5
03F @DIV3232.@SCRATCH5
077 @SCRATCH
078 @SCRATCH
078 _RETURN_
99,28 → 102,30
10D-10E @WRITE_PROGRAM_MEMORY8.P2
 
ROM Allocation:
009A @delay_ms1
00F8 @I2C_READ_1
00AE @I2C_WRITE_1
0030 @PUTCHAR_1_
013D SHT25_setup
04A8 SHT25_get_temp
020B @ITOF
0228 @DIVFF
02F2 @MULFF
0367 @ADDFF
069E SHT25_get_hum
0123 @delay_ms1
0137 @I2C_READ_1
0037 @I2C_WRITE_1
00B9 @PUTCHAR_1_
0081 SHT25_soft_reset
017C SHT25_setup
050B SHT25_get_temp
026E @ITOF
028B @DIVFF
0355 @MULFF
03CA @ADDFF
0701 SHT25_get_hum
0800 MAIN
0004 @const102
0052 @PSTRINGC7_69
001D @const104
0199 @PSTRINGCN7_69
01E8 @PRINTF_X_69
0024 @const110
05DE @FTOSD
0575 @DIV3232
05B7 @PRINTF_L32D_69FPFPF
002A @const119
0004 @const104
00DB @PSTRINGC7_69
001D @const106
01FE @PSTRINGCN7_69
024D @PRINTF_X_69
0024 @const112
002B @const113
0641 @FTOSD
05D8 @DIV3232
061A @PRINTF_L32D_69FPFPF
0031 @const122
0800 @cinit
 
 
129,15 → 134,15
User Memory space:
 
Project Directory:
D:\MLAB\Modules\Sensors\SHT25V01A\SW\PIC16F887\
Z:\home\kaklik\MLAB\Modules\Sensors\SHT25V01A\SW\PIC16F887\
 
Project Files:
main.c
main.h
C:\Program Files\PICC\devices\16F887.h
C:\Program Files (x86)\PICC\devices\16F887.h
 
Units:
D:\MLAB\Modules\Sensors\SHT25V01A\SW\PIC16F887\main (main)
Z:\home\kaklik\MLAB\Modules\Sensors\SHT25V01A\SW\PIC16F887\main (main)
 
Compiler Settings:
Processor: PIC16F887
/Modules/Sensors/SHT25V01A/SW/PIC16F887/main.tre
1,24 → 1,47
ÀÄmain
ÀÄMAIN 1/289 Ram=4
ÀÄMAIN 1/344 Ram=5
ÃÄ??0??
ÃÄSHT25_soft_reset 0/56 Ram=0
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÀÄ@I2C_WRITE_1 0/74 Ram=1
ÃÄ@PSTRINGC7_69 0/72 Ram=3
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@delay_ms1 0/20 Ram=1
ÃÄSHT25_setup 0/92 Ram=1
ÃÄSHT25_setup 0/130 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_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
ÃÄ@PSTRINGCN7_69 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PRINTF_X_69 0/35 Ram=2
ÃÄ@PRINTF_X_69 0/33 Ram=2
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄSHT25_setup 0/130 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
ÃÄ@PSTRINGCN7_69 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PRINTF_X_69 0/33 Ram=2
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@delay_ms1 0/20 Ram=1
ÃÄSHT25_get_temp 0/205 Ram=9
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
/Modules/Sensors/SHT25V01A/TODO.txt
6,3 → 6,9
 
BZV55C-3,6V (minimelf)
 
SW:
 
Implementavat check sum
Implementovat self test
Implementovat no hold metodu cteni cidla