Problem with comparison.
/Designs/Measuring_instruments/GeoMet01A/SW/PIC16F887/main.c
0,0 → 1,68
#include "main.h"
 
#define LCD_ENABLE_PIN PIN_E0 ////
#define LCD_RS_PIN PIN_E1 ////
#define LCD_RW_PIN PIN_E2 ////
#define LCD_DATA4 PIN_D4 ////
#define LCD_DATA5 PIN_D5 ////
#define LCD_DATA6 PIN_D6 ////
#define LCD_DATA7 PIN_D7
#include <lcd.c>
 
#include "../SHT25.h"
#include "../LTS01.h"
#include "./HMC5883L.h"
#include <math.h>
 
 
void main()
{
float temp1, temp2, humidity;
int16 i=0;
 
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
setup_oscillator(OSC_8MHZ);
 
 
printf("GeoMet01A\r\n");
printf("(c) Kaklik 2013\r\n");
printf("www.mlab.cz\r\n");
// Init the HMC5883L. Set Mode register for
// continuous measurements.
hmc5883l_write_reg(HMC5883L_CFG_A_REG, 0x18); // no average, maximal update range
hmc5883l_write_reg(HMC5883L_CFG_B_REG, 0x00); // minimal range
hmc5883l_write_reg(HMC5883L_MODE_REG, 0x00);
 
lcd_init();
lcd_putc("(c) Kaklik 2013");
lcd_gotoxy(3,2);
lcd_putc("www.mlab.cz");
Delay_ms(2000);
lcd_init();
 
while (TRUE)
{
lcd_gotoxy(1,1);
temp1 = SHT25_get_temp();
humidity = SHT25_get_hum();
temp2= LTS01_get_temp();
hmc5883l_read_data();
printf(lcd_putc,"%f C %f \%%",temp1, humidity);
lcd_gotoxy(1,2);
printf(lcd_putc," %f C",temp2);
printf("%ld %f %f %f ",i, temp1, humidity, temp2);
printf("%Ld %Ld %Ld \n\r", compass.x, compass.y, compass.z);
i++;
Delay_ms(100);
}
 
}
/Designs/Measuring_instruments/GeoMet01A/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
/Designs/Measuring_instruments/GeoMet01A/SW/PIC16F887/main.err
0,0 → 1,2
Memory usage: ROM=39% RAM=7% - 14%
0 Errors, 0 Warnings.
/Designs/Measuring_instruments/GeoMet01A/SW/PIC16F887/main.esym
0,0 → 1,701
D G "__PCM__" 0 70 ""4.106""
D G "__DEVICE__" 0 70 "887"
D G "__DATE__" 0 70 ""03-IX-13""
D G "__TIME__" 0 70 ""00:32:19"" "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 "LCD_ENABLE_PIN" 0 3 "PIN_E0"
D G "LCD_RS_PIN" 0 4 "PIN_E1"
D G "LCD_RW_PIN" 0 5 "PIN_E2"
D G "LCD_DATA4" 0 6 "PIN_D4"
D G "LCD_DATA5" 0 7 "PIN_D5"
D G "LCD_DATA6" 0 8 "PIN_D6"
D G "LCD_DATA7" 0 9 "PIN_D7"
T G "LCD_PIN_MAP" 3 81 "{int1 enable,int1 rs,int1 rw,int1 unused,int4 data}" "this is to improve compatability with previous LCD drivers that accepted"
D G "lcd_output_enable" 3 103 "(x) output_bit(LCD_ENABLE_PIN, x)"
D G "lcd_enable_tris" 3 104 "() output_drive(LCD_ENABLE_PIN)"
D G "lcd_output_rs" 3 111 "(x) output_bit(LCD_RS_PIN, x)"
D G "lcd_rs_tris" 3 112 "() output_drive(LCD_RS_PIN)"
D G "lcd_output_rw" 3 119 "(x) output_bit(LCD_RW_PIN, x)"
D G "lcd_rw_tris" 3 120 "() output_drive(LCD_RW_PIN)"
D G "LCD_TYPE" 3 170 "2" "0=5x7, 1=5x10, 2=2 lines"
D G "LCD_LINE_TWO" 3 174 "0x40" "LCD RAM address for the second line"
D G "LCD_LINE_LENGTH" 3 178 "20"
V G "LCD_INIT_STRING" 3 181 "int8[4]"
C L "lcd_read_nibble" 3 2 2 "FUNCTION"
F G "lcd_read_nibble" 3 185 "int8()"
F G "lcd_read_byte" 3 187 "int8()"
V L "low" 3 189 "int8"
V L "high" 3 189 "int8"
F G "lcd_read_nibble" 3 234 "int8()"
V L "n" 3 237 "int8"
C L "lcd_read_nibble" 3 2 1 "FUNCTION"
F G "lcd_send_nibble" 3 251 "void(int8 n)"
V L "n" 3 251 "int8"
C L "lcd_send_nibble" 3 2 1 "FUNCTION"
F G "lcd_send_byte" 3 269 "void(int8 address,int8 n)"
V L "address" 3 269 "int8"
V L "n" 3 269 "int8"
F G "lcd_init" 3 294 "void()"
V L "i" 3 296 "int8"
F G "lcd_gotoxy" 3 335 "void(int8 x,int8 y)"
V L "x" 3 335 "int8"
V L "y" 3 335 "int8"
V L "address" 3 337 "int8"
F G "lcd_putc" 3 353 "void(int8 c)"
V L "c" 3 353 "int8"
F G "lcd_getc" 3 396 "int8(int8 x,int8 y)"
V L "x" 3 396 "int8"
V L "y" 3 396 "int8"
V L "value" 3 398 "int8"
C L "lcd_getc" 3 2 1 "FUNCTION"
D G "SHT25_HEATER_ON" 4 2 "0x04"
D G "SHT25_HEATER_OFF" 4 3 "0x00"
D G "SHT25_OTP_reload_off" 4 4 "0x02"
D G "SHT25_RH12_T14" 4 5 "0x00"
D G "SHT25_RH8_T12" 4 6 "0x01"
D G "SHT25_RH10_T13" 4 7 "0x80"
D G "SHT25_RH11_T11" 4 8 "0x81"
D G "SHT25_ADDR" 4 10 "0x80"
F G "SHT25_soft_reset" 5 1 "void()"
C L "SHT25_soft_reset" 5 3 1 "FUNCTION"
C L "SHT25_soft_reset" 5 3 1 "FUNCTION"
C L "SHT25_soft_reset" 5 3 1 "FUNCTION"
C L "SHT25_soft_reset" 5 3 1 "FUNCTION"
F G "SHT25_setup" 5 9 "int8(int8 setup_reg)"
V L "setup_reg" 5 9 "int8" "writes to status register and returns its value"
V L "reg" 5 11 "int8"
C L "SHT25_setup" 5 3 1 "FUNCTION"
C L "SHT25_setup" 5 3 1 "FUNCTION"
C L "SHT25_setup" 5 3 1 "FUNCTION"
C L "SHT25_setup" 5 3 1 "FUNCTION"
C L "SHT25_setup" 5 3 1 "FUNCTION"
C L "SHT25_setup" 5 3 1 "FUNCTION"
C L "SHT25_setup" 5 3 1 "FUNCTION"
C L "SHT25_setup" 5 3 1 "FUNCTION"
C L "SHT25_setup" 5 3 1 "FUNCTION"
C L "SHT25_setup" 5 3 1 "FUNCTION"
C L "SHT25_setup" 5 3 1 "FUNCTION"
C L "SHT25_setup" 5 3 1 "FUNCTION"
C L "SHT25_setup" 5 3 1 "FUNCTION"
C L "SHT25_setup" 5 3 1 "FUNCTION"
C L "SHT25_setup" 5 3 1 "FUNCTION"
C L "SHT25_setup" 5 3 1 "FUNCTION"
C L "SHT25_setup" 5 3 1 "FUNCTION"
F G "SHT25_get_temp" 5 43 "float()"
V L "MSB" 5 45 "int8"
V L "LSB" 5 45 "int8"
V L "Check" 5 45 "int8"
V L "data" 5 46 "int16"
C L "SHT25_get_temp" 5 3 1 "FUNCTION"
F G "SHT25_get_hum" 5 68 "float()"
V L "MSB" 5 70 "int8"
V L "LSB" 5 70 "int8"
V L "Check" 5 70 "int8"
V L "data" 5 71 "int16"
C L "SHT25_get_hum" 5 3 1 "FUNCTION"
C L "SHT25_get_hum" 5 3 1 "FUNCTION"
D G "LTS01A_address" 6 4 "0x90"
F G "LTS01_get_temp" 7 1 "float()"
V L "MSB" 7 3 "int8"
V L "LSB" 7 4 "int8"
V L "data" 7 5 "sint16"
D G "HMC5883L_WRT_ADDR" 8 2 "0x3C"
D G "HMC5883L_READ_ADDR" 8 3 "0x3D"
D G "HMC5883L_CFG_A_REG" 8 6 "0x00"
D G "HMC5883L_CFG_B_REG" 8 7 "0x01"
D G "HMC5883L_MODE_REG" 8 8 "0x02"
D G "HMC5883L_X_MSB_REG" 8 9 "0x03"
D G "MAG_ROZ088" 8 13 "0x00"
D G "MAG_ROZ130" 8 14 "0x20"
D G "MAG_ROZ190" 8 15 "0x40"
D G "MAG_ROZ250" 8 16 "0x60"
D G "MAG_ROZ400" 8 17 "0x80"
D G "MAG_ROZ470" 8 18 "0xA0"
D G "MAG_ROZ560" 8 19 "0xC0"
D G "MAG_ROZ810" 8 20 "0xE0"
C L "hmc5883l_write_reg" 9 2 1 "FUNCTION"
F G "hmc5883l_write_reg" 9 4 "void(int8 reg,int8 data)"
V L "reg" 9 4 "int8"
V L "data" 9 4 "int8"
F G "hmc5883l_read_reg" 9 14 "int8(int8 reg)"
V L "reg" 9 14 "int8"
V L "retval" 9 16 "int8"
T G "hmc5883l_result" 9 35 "{sint16 x,sint16 y,sint16 z}" "This global structure holds the values read"
V G "compass" 9 39 "hmc5883l_result"
F G "hmc5883l_read_data" 9 42 "void()"
V L "x_lsb" 9 44 "int8"
V L "x_msb" 9 45 "int8"
V L "y_lsb" 9 47 "int8"
V L "y_msb" 9 48 "int8"
V L "z_lsb" 9 50 "int8"
V L "z_msb" 9 51 "int8"
C L "hmc5883l_read_data" 9 2 1 "FUNCTION"
C L "hmc5883l_read_data" 9 2 1 "FUNCTION"
C L "hmc5883l_read_data" 9 2 1 "FUNCTION"
D G "MATH_H" 10 21 ""
D G "PI" 10 26 "3.1415926535897932"
D G "SQRT2" 10 29 "1.4142135623730950"
C L "CEIL_FLOOR" 10 2 3 "FUNCTION"
F G "CEIL_FLOOR" 10 36 "float(float x,int8 n)"
V L "x" 10 36 "float"
V L "n" 10 36 "int8"
V L "y" 10 38 "float"
V L "res" 10 38 "float"
V L "l" 10 39 "int16"
V L "s" 10 40 "int1"
C L "floor" 10 2 5 "FUNCTION"
F G "floor" 10 192 "float(float x)"
V L "x" 10 192 "float"
C L "ceil" 10 2 5 "FUNCTION"
F G "ceil" 10 218 "float(float x)"
V L "x" 10 218 "float"
D G "fabs" 10 244 "abs"
C L "fmod" 10 2 6 "FUNCTION"
F G "fmod" 10 256 "float(float x,float y)"
V L "x" 10 256 "float"
V L "y" 10 256 "float"
V L "i" 10 258 "float"
D G "LN2" 10 319 "0.6931471805599453"
V G "pe" 10 321 "float[6]"
F G "exp" 10 325 "float(float x)"
V L "x" 10 325 "float"
V L "y" 10 327 "float"
V L "res" 10 327 "float"
V L "r" 10 327 "float"
V L "n" 10 331 "sint8"
V L "s" 10 332 "int1"
C L "exp" 10 2 1 "FUNCTION"
V G "pl" 10 496 "float[4]"
V G "ql" 10 497 "float[4]"
C L "log" 10 2 3 "FUNCTION"
F G "log" 10 505 "float(float x)"
V L "x" 10 505 "float"
V L "y" 10 507 "float"
V L "res" 10 507 "float"
V L "r" 10 507 "float"
V L "y2" 10 507 "float"
V L "n" 10 511 "sint8"
C L "log" 10 2 1 "FUNCTION"
D G "LN10" 10 729 "2.3025850929940456"
C L "log10" 10 2 3 "FUNCTION"
F G "log10" 10 737 "float(float x)"
V L "x" 10 737 "float"
V L "r" 10 739 "float"
C L "modf" 10 2 8 "FUNCTION"
F G "modf" 10 778 "float(float value,*float iptr)"
V L "value" 10 778 "float"
V L "iptr" 10 778 "*float"
C L "pwr" 10 2 6 "FUNCTION"
F G "pwr" 10 806 "float(float x,float y)"
V L "x" 10 806 "float"
V L "y" 10 806 "float"
C L "pow" 10 2 7 "FUNCTION"
F G "pow" 10 869 "float(float x,float y)"
V L "x" 10 869 "float"
V L "y" 10 869 "float"
C L "sqrt" 10 2 5 "FUNCTION"
F G "sqrt" 10 930 "float(float x)"
V L "x" 10 930 "float"
V L "y" 10 932 "float"
V L "res" 10 932 "float"
V L "p" 10 936 "*int8"
D G "PI_DIV_BY_TWO" 10 1125 "1.5707963267948966"
C L "cos" 10 2 3 "FUNCTION"
F G "cos" 10 1136 "float(float x)"
V L "x" 10 1136 "float"
V L "y" 10 1138 "float"
V L "t" 10 1138 "float"
V L "t2" 10 1138 "float"
V L "quad" 10 1139 "int8"
V L "i" 10 1139 "int8"
V L "frac" 10 1140 "float"
V L "p" 10 1141 "float[6]" "by the series definition for cosine"
C L "cos" 10 2 1 "FUNCTION"
C L "cos" 10 2 2 "FUNCTION"
C L "cos" 10 2 1 "FUNCTION"
C L "cos" 10 2 1 "FUNCTION"
C L "cos" 10 2 1 "FUNCTION"
C L "cos" 10 2 1 "FUNCTION"
C L "cos" 10 2 1 "FUNCTION"
C L "cos" 10 2 1 "FUNCTION"
C L "sin" 10 2 5 "FUNCTION"
F G "sin" 10 1278 "float(float x)"
V L "x" 10 1278 "float"
C L "tan" 10 2 5 "FUNCTION"
F G "tan" 10 1304 "float(float x)"
V L "x" 10 1304 "float"
V L "c" 10 1306 "float"
V L "s" 10 1306 "float"
V G "pas" 10 1344 "float[3]"
V G "qas" 10 1345 "float[3]"
F G "ASIN_COS" 10 1347 "float(float x,int8 n)"
V L "x" 10 1347 "float"
V L "n" 10 1347 "int8"
V L "y" 10 1349 "float"
V L "res" 10 1349 "float"
V L "r" 10 1349 "float"
V L "y2" 10 1349 "float"
V L "s" 10 1350 "int1"
C L "ASIN_COS" 10 2 1 "FUNCTION"
C L "ASIN_COS" 10 2 1 "FUNCTION"
C L "asin" 10 2 5 "FUNCTION"
F G "asin" 10 1493 "float(float x)"
V L "x" 10 1493 "float"
V L "r" 10 1495 "float"
C L "acos" 10 2 5 "FUNCTION"
F G "acos" 10 1527 "float(float x)"
V L "x" 10 1527 "float"
V L "r" 10 1529 "float"
V G "pat" 10 1555 "float[4]"
V G "qat" 10 1556 "float[4]"
C L "atan" 10 2 3 "FUNCTION"
F G "atan" 10 1564 "float(float x)"
V L "x" 10 1564 "float"
V L "y" 10 1566 "float"
V L "res" 10 1566 "float"
V L "r" 10 1566 "float"
V L "s" 10 1567 "int1"
V L "flag" 10 1567 "int1"
C L "atan" 10 2 1 "FUNCTION"
C L "atan2" 10 2 7 "FUNCTION"
F G "atan2" 10 1697 "float(float y,float x)"
V L "y" 10 1697 "float"
V L "x" 10 1697 "float"
V L "z" 10 1699 "float"
V L "sign" 10 1700 "int1"
V L "quad" 10 1701 "int8"
C L "atan2" 10 2 1 "FUNCTION"
C L "atan2" 10 2 1 "FUNCTION"
C L "cosh" 10 2 7 "FUNCTION"
F G "cosh" 10 1919 "float(float x)"
V L "x" 10 1919 "float"
C L "sinh" 10 2 6 "FUNCTION"
F G "sinh" 10 1946 "float(float x)"
V L "x" 10 1946 "float"
C L "tanh" 10 2 6 "FUNCTION"
F G "tanh" 10 1976 "float(float x)"
V L "x" 10 1976 "float"
D G "LOG2" 10 2006 ".30102999566398119521"
F G "frexp" 10 2007 "float(float x,*sint8 exp)"
V L "x" 10 2007 "float"
V L "exp" 10 2007 "*sint8"
V L "res" 10 2009 "float"
V L "sign" 10 2010 "int1"
C L "ldexp" 10 2 6 "FUNCTION"
F G "ldexp" 10 2152 "float(float value,sint8 exp)"
V L "value" 10 2152 "float"
V L "exp" 10 2152 "sint8"
C L "MAIN" 10 2 2 "FUNCTION"
F G "MAIN" 0 18 "void()"
V L "temp1" 0 20 "float"
V L "temp2" 0 20 "float"
V L "humidity" 0 20 "float"
V L "i" 0 21 "int16"
C L "MAIN" 0 30 1 "FUNCTION"
C L "MAIN" 0 30 2 "FUNCTION"
C L "MAIN" 0 30 1 "FUNCTION"
C L "MAIN" 0 30 1 "FUNCTION"
F B "reset_cpu" 0 0
F B "abs" 1 0
F B "sleep_ulpwu" 1 0
F B "sleep" 0 0
F B "delay_cycles" 1 0
F B "read_bank" 2 0
F B "write_bank" 3 0
F B "shift_left" 2 2
F B "shift_right" 2 2
F B "rotate_left" 2 0
F B "rotate_right" 2 0
F B "_mul" 2 0
F B "memset" 3 0
F B "isamoung" 2 0
F B "isamong" 2 0
F B "bit_set" 2 0
F B "bit_clear" 2 0
F B "bit_test" 2 0
F B "toupper" 1 0
F B "tolower" 1 0
F B "swap" 1 0
F B "printf" 1 255
F B "fprintf" 1 255
F B "sprintf" 1 255
F B "make8" 2 0
F B "make16" 2 0
F B "make32" 1 255
F B "label_address" 1 1
F B "goto_address" 1 0
F B "_va_arg" 1 0
F B "offsetofbit" 2 2
F B "enable_interrupts" 1 0
F B "disable_interrupts" 1 0
F B "interrupt_active" 1 0
F B "clear_interrupt" 1 0
F B "jump_to_isr" 1 0
F B "ext_int_edge" 1 2
F B "read_eeprom" 1 0
F B "write_eeprom" 2 0
F B "read_program_eeprom" 1 0
F B "write_program_eeprom" 2 0
F B "write_program_memory" 4 0
F B "write_program_memory8" 4 0
F B "read_program_memory" 4 0
F B "read_program_memory8" 4 0
F B "erase_program_eeprom" 1 0
F B "strcpy" 2 0
F B "memcpy" 3 0
F B "strstr100" 2 0
F B "output_high" 1 0
F B "output_low" 1 0
F B "input" 1 0
F B "input_state" 1 0
F B "output_float" 1 0
F B "output_drive" 1 0
F B "output_bit" 1 1
F B "output_toggle" 1 0
F B "output_a" 1 0
F B "output_b" 1 0
F B "output_c" 1 0
F B "output_d" 1 0
F B "output_e" 1 0
F B "input_a" 0 0
F B "input_b" 0 0
F B "input_c" 0 0
F B "input_d" 0 0
F B "input_e" 0 0
F B "set_tris_a" 1 0
F B "set_tris_b" 1 0
F B "set_tris_c" 1 0
F B "set_tris_d" 1 0
F B "set_tris_e" 1 0
F B "get_tris_a" 0 0
F B "get_tris_b" 0 0
F B "get_tris_c" 0 0
F B "get_tris_d" 0 0
F B "get_tris_e" 0 0
F B "input_change_a" 0 0
F B "input_change_b" 0 0
F B "input_change_c" 0 0
F B "input_change_d" 0 0
F B "input_change_e" 0 0
F B "port_b_pullups" 1 0
F B "setup_counters" 2 0
F B "setup_wdt" 1 0
F B "restart_cause" 0 0
F B "restart_wdt" 0 0
F B "get_rtcc" 0 0
F B "set_rtcc" 1 0
F B "get_timer0" 0 0
F B "set_timer0" 1 0
F B "setup_comparator" 1 0
F B "setup_port_a" 1 0
F B "setup_adc_ports" 1 0
F B "setup_adc" 1 0
F B "set_adc_channel" 1 0
F B "read_adc" 0 1
F B "adc_done" 0 0
F B "setup_timer_0" 1 0
F B "setup_vref" 1 0
F B "setup_timer_1" 1 0
F B "get_timer1" 0 0
F B "set_timer1" 1 0
F B "setup_timer_2" 3 0
F B "get_timer2" 0 0
F B "set_timer2" 1 0
F B "setup_ccp1" 1 2
F B "set_pwm1_duty" 1 0
F B "setup_ccp2" 1 0
F B "set_pwm2_duty" 1 0
F B "setup_oscillator" 1 2
F B "setup_spi" 1 0
F B "spi_read" 0 1
F B "spi_write" 1 0
F B "spi_data_is_in" 0 0
F B "setup_spi2" 1 0
F B "spi_read2" 0 1
F B "spi_write2" 1 0
F B "spi_data_is_in2" 0 0
F B "brownout_enable" 1 0
F B "delay_ms" 1 0
F B "delay_us" 1 0
F B "i2c_read" 0 2
F B "i2c_write" 1 2
F B "i2c_start" 0 2
F B "i2c_stop" 0 1
F B "i2c_isr_state" 0 1
F B "putchar" 1 2
F B "puts" 1 2
F B "getch" 0 1
F B "gets" 1 3
F B "kbhit" 0 1
F B "set_uart_speed" 1 3
F B "setup_uart" 1 3
/Designs/Measuring_instruments/GeoMet01A/SW/PIC16F887/main.hex
0,0 → 1,403
:100000000A308A00B72A00000A108A100A118207F3
:1000100028340C3401340634C732EF26653AB01860
:10002000C1060A00A8312910CB306B36E9352019FA
:10003000B018B3060A00F73B77176D366131AE3161
:10004000FA060A00A8312910CB306B36E9352019A1
:10005000B0183300F73B77176D366131AE317A0057
:10006000831603178C170C140000000083120C0871
:100070007F39031976280313B50003170D080313FE
:10008000B60003170F080313B70035080C1E4628E7
:100090009900360803178D000313370803178F00E4
:1000A00083168C170C140000000083120C0D0E0D2B
:1000B0007F39031976280313B50003170D080313BE
:1000C000B60003170F080313B70035080C1E662887
:1000D0009900360803178D000313370803178F00A4
:1000E0008D0A03198F0A031330280317031308001E
:1000F0000830F80000008711A0112008831687003F
:1001000000008312BB0D0712031C8C282016200848
:1001100083168700902883122012200883168700F8
:1001200000008312A0152008831687008312871D04
:100130009728F80B7A2800008711A0112008831651
:100140008700000083122016200883168700000015
:1001500000008312A0152008831687008312871DD4
:10016000AF28F8010000071A78148711A0112008A1
:100170008316870083120712201220088316870037
:1001800083120800201620088316870000008312BF
:10019000A015200883168700000083120712201282
:1001A000200883168700000083128711A011200801
:1001B000831687003C308312BB0078203508BB00D3
:1001C00078203608BB00782020122008831687008C
:1001D00000008312A0152008831687008312871D54
:1001E000EF280000F328000020162008831687005F
:1001F00000008312080043308400831300080319B1
:100200000E290230F800F701F70B0429F80B032937
:100210009730F700F70B0A29800B012908004A18CC
:100220001329081214290816831608128312CA18F3
:100230001B2988121C2988168316881283124A19D2
:100240002329081324290817831608138312CA19AF
:100250002B2988132C2988178316881300008312F2
:1002600009148316091034293529831209108316BD
:10027000091083120800CB01831608160030831280
:10028000081A0130CB048316881600308312881AAE
:100290000130F7000310F70D7708CB048316081719
:1002A00000308312081B0130F700F70DF70DFC300A
:1002B000F7057708CB048316881700308312881B54
:1002C0000130F700F70DF70DF70DF830F705770857
:1002D000CB044B08F8000800831609108910091197
:1002E0008312891083168910081688160817881734
:1002F000831209158316091100008312091483164D
:100300000910000083123B217808CA0009108316E7
:100310000910000083120914831609108F29831213
:100320003B217808C90009108316091008128812A9
:100330000813881383124A0EF700F030F705770888
:100340004904F8007808C900C91FA8298316742930
:10035000C708031DAD298910AE2989148316891099
:10036000000083120911831609110000831209107D
:10037000831609108312480EC9000F30C9054908B9
:10038000CA000F2148080F39C900CA000F21080010
:10039000831608128812081388130910891009118E
:1003A000831289108316891083120911831609118B
:1003B00083120910831609100F308312C300FB202B
:1003C0000130B5003508033C031CEE290330CA0098
:1003D0000F210530C300FB20B50AE2290230CA0014
:1003E0000F21B5013508033C031CFF293508042003
:1003F000B600C7013608C8006C21B50AF22908000A
:10040000440B032A062A4030C500072AC5010130E3
:100410004302C50745088038C600C7014608C80022
:100420006C2108004208073A0319202A0B3A0319E5
:10043000252A063A03192D2A023A0319332A382AA3
:100440000130C300C40000223E2AC7010130C800A9
:100450006C210230C300FB203E2A0130C300023071
:10046000C40000223E2AC7011030C8006C213E2A79
:100470000130C7004208C8006C213E2A08008316DC
:1004800003178C170C140000000083120C087F392E
:100490000319832A0313B50003170D080313B600CD
:1004A00003170F080313B7003508C20012223608DD
:1004B00003178D000313370803178F0083168C175B
:1004C0000C140000000083120C0D0E0D7F3903196F
:1004D000832A0313B50003170D080313B60003178F
:1004E0000F080313B7003508C2001222360803179D
:1004F0008D000313370803178F008D0A03198F0A25
:1005000003133F2A0317031308000830BC007708C1
:10051000BD00201620088316870000008312A01556
:100520002008831687008312871D942A071A031454
:10053000071E0310F80D0000A01120088316870085
:1005400083128711BC0B892A201620088316870086
:100550000000831207123D080319B32A2012200855
:100560008316870083120000A015200883168700D9
:100570008312871DB92A00008711A0112008831655
:1005800087000000831207122012200883168700BC
:10059000831208008E30F7003B08F8003A08F90093
:1005A000FA01F808031DDE2A7908F800F90108307D
:1005B000F702F808031DDE2AF701E62A0310F81BEC
:1005C000E52AF90DF80DF703DE2AF81308003E08B6
:1005D0000319AC2BCA0042080319AC2BCA02031C36
:1005E000F62A7F30CA070318AC2BFC2A8130CA02D6
:1005F000031CAC2B0319AC2B4A08F700F801F901D6
:10060000FA01C9013F08C800C8174008C7004108DF
:10061000C6001930CA004508C60203181F2B013056
:10062000C70203181F2BC80203181F2BC902031887
:100630001F2BC90AC80AC70A4508C607512B440818
:10064000C70203183A2B0130C80203183A2BC9021B
:1006500003183A2BC90AC80A4408C7074508C60741
:10066000031C512BC70A031D512BC80A031D512B14
:10067000C90A512B43088038C8020318502B013097
:10068000C9020318502BC90A43088038C807440818
:10069000C707031C2E2BC80A031D2E2BC90A2E2B9D
:1006A0007A14CA0B542B5F2B0310C60DC70DC80D4F
:1006B000C90D0310FA0DF90DF80DCB0D0B2B4B1CCA
:1006C000672B0310F80CF90CFA0CCB0C6A2BF70310
:1006D0000319AC2BCB1B932B0310C60DC70DC80DF4
:1006E000C90D4508C60203187F2B0130C702031845
:1006F0007F2BC80203187F2BC902031CA22B4408BE
:10070000C70203188A2B0130C80203188A2BC902BA
:10071000031CA22B43088038C8020318932B013016
:10072000C902031CA22BFA0A031DA22BF90A031DFE
:10073000A22BF80A031DA22BF70A0319AC2BF80C05
:10074000F90CFA0C3F08CA004308CA06CA1FAA2BB4
:10075000F817B02BF813B02BF701F801F901FA01E3
:10076000080042080319212CCA0046080319212C4D
:10077000CA070318C22B7F30CA02031C212C03199D
:10078000212CC62B8130CA070318212C4A08F700F8
:10079000F801F901FA014308CE00CE174408CD0054
:1007A0004508CC001830CA00CB014C1CEF2B49087F
:1007B000FA07031CE12BF90A031DE12BF80A0319C0
:1007C000CB174808F907031CE82BF80A0319CB17C5
:1007D0004708C400C4174408F8070318CB17CB0D0B
:1007E000F80CF90CFA0CCE0CCD0CCC0C0310CA0B87
:1007F000D42B0130F7070318212CF81B062CCE0D43
:10080000FA0DF90DF80DF7030319212CCE1F172C43
:10081000FA0A031D172CF90A031D172CF80A031DE9
:10082000172CF80CF90CFA0CF70A0319212C4308C1
:10083000CB004708CB06CB1F1F2CF817252CF8132D
:10084000252CF701F801F901FA010800803083181E
:10085000BF06C401C5013B08C3003F08C3063A08F0
:100860000319162DC200F7003E0803191F2DC202FE
:100870000319BB2C031C792C3F08C800C81740087B
:10088000C7004108C600C5010310C80CC70CC60C40
:10089000C50CC20B432CC31F502C4414332D4410E1
:1008A000421044163D3084008313482D4412C31B6C
:1008B000632C421C6E2CC80CC70CC60CC50CF70A66
:1008C00003192E2D6E2CC81B712C0310C50DC60DDF
:1008D000C70DC80DF70303192E2D632C4417DB2C0D
:1008E00044133B08C300C31F772CC817272DC81318
:1008F000272D3E08C200F7003A08C2023B08C80094
:10090000C8173C08C7003D08C600C5010310C80C45
:10091000C70CC60CC50CC20B852CC31F922CC4146B
:10092000332DC4104210C416413084008313482D67
:10093000C412C31BA52C421CB02CC80CC70CC60C7F
:10094000C50CF70A03192E2DB02CC81BB32C0310AD
:10095000C50DC60DC70DC80DF70303192E2DA52C07
:10096000C417DB2CC4133F08C300C31FB92CC8171E
:10097000272DC813272D3F08C800C8174008C700F7
:100980004108C600C31FC82CC8134415332D441199
:10099000C50142103D3084008313482DC31BF12C48
:1009A0003B08C300421CDB2CC80CC70CC60CC50C92
:1009B000F70A03192E2DC51FEC2CC60A031DEC2CBB
:1009C000C70A031DEC2CC80A031DEC2CC80CC70C6D
:1009D000C60CF70A03192E2D441B702CC41BB22C15
:1009E000102D8030C806C81FF92C332D3F08C300D6
:1009F000062D3B08C300C808031D062DC708031DAC
:100A0000062DC608031D062DF701272DC81B102D26
:100A10000310C50DC60DC70DC80DF70B062D2E2DE5
:100A2000C31F142DC817272DC813272D3E08F70004
:100A30003F08C8004008C7004108C600272D3A08F3
:100A4000F7003B08C8003C08C7003D08C60048083E
:100A5000F8004708F9004608FA00662DF701F8018A
:100A6000F901FA01662DC501C609C709C809C509FA
:100A7000C50A031D412DC60A031D412DC70A0319CE
:100A8000C80A44184F2CC418912C4419C72CF62CB2
:100A90000008C607031C522DC70A031D522DC80AA1
:100AA0000319421484030008C707031C5A2DC80AFF
:100AB0000319421484030008801F803AC8070318F2
:100AC0004214441A562CC41A982CCE2C0800201616
:100AD00020088316870000008312A01520088316C3
:100AE000870000008312871D732D07122012200833
:100AF00083168700000083128711A0112008831637
:100B0000870080308312BB007820E330BB00782060
:100B1000201220088316870000008312A0152008E9
:100B2000831687008312871D932D0000972D0000E8
:100B30002016200883168700000064308312C3004B
:100B4000FB20201620088316870000008312A015C2
:100B50002008831687000000831207122012200845
:100B600083168700000083128711A01120088316C6
:100B7000870081308312BB0078200130F700852286
:100B80007808B5000130F70085227808B600F70133
:100B900085227808B70020122008831687000000FD
:100BA0008312A0152008831687008312871DD62D77
:100BB0000000DA2D000020162008831687000000B0
:100BC0008312B60CB60C3F30B605BB013508BA002F
:100BD000BB00BA01360EF700F030F70577083A0788
:100BE000B8003B08B9000318B90A3908BB00380837
:100BF000BA00CA227708BA007808BB007908BC009E
:100C00007A08BD00C1007908C0007808BF007708E5
:100C1000BE00C501FF30C4007F30C3008E30C2006B
:100C2000E7225230C500B830C4002F30C3008630F0
:100C3000C2007A08C9007908C8007808C700770898
:100C4000C600B12383106630BD00BC00BB30BB00C2
:100C50008430BA007A08C1007908C0007808BF0063
:100C60007708BE0026248A150A128B2B201620082E
:100C70008316870000008312A015200883168700C2
:100C8000000083120712201220088316870000003C
:100C900083128711A01120088316870080308312E9
:100CA000BB007820E530BB0078206430C300FB2017
:100CB000201620088316870000008312A015200844
:100CC0008316870000008312871D642E07122012EE
:100CD000200883168700000083128711A0112008C6
:100CE0008316870081308312BB0078200130F70023
:100CF00085227808B5000130F70085227808B60013
:100D0000F70185227808B700201220088316870093
:100D100000008312A0152008831687008312871D08
:100D20008F2E0000932E00002016200883168700C7
:100D300000008312B60CB60C3F30B605BB01350877
:100D4000BA00BB00BA01360EF700F030F70577089D
:100D50003A07B8003B08B9000318B90A3908BB00C4
:100D60003808BA00CA227708BA007808BB007908A8
:100D7000BC007A08BD00C1007908C0007808BF0037
:100D80007708BE00C501FF30C4007F30C3008E303D
:100D9000C200E722C501C4017A30C3008530C20019
:100DA0007A08C9007908C8007808C7007708C60023
:100DB000B1238310BD01BC01C030BB008130BA003B
:100DC0007A08C1007908C0007808BF007708BE0023
:100DD00026248A150A12962B2016200883168700CF
:100DE00000008312A01520088316870000008312DC
:100DF0000712201220088316870000008312871133
:100E0000A01120088316870090308312BB00782041
:100E1000BB0178202012200883168700000083126F
:100E2000A0152008831687008312871D152F000048
:100E3000192F000020162008831687000000831257
:100E4000201620088316870000008312A0152008B2
:100E500083168700000083120712201220088316D1
:100E60008700000083128711A011200883168700D5
:100E700091308312BB0078200130F700852278087A
:100E8000B500F70185227808B600201220088316E5
:100E9000870000008312A0152008831687008312A4
:100EA000871D502F0000542F0000201620088316A5
:100EB0008700000083123508B8003608B7003808EC
:100EC000BA003708B9003A08BC003908BB008E30B8
:100ED000F7003C08F8003B08F900FA01BC1F752F29
:100EE000F809F909F90A0319F80AF808031D822F0D
:100EF0007908F800F9010830F702F808031D822F7D
:100F0000F7018B2F0310F81B892FF90DF80DF7034C
:100F1000822FBC1FF8137A08C5007908C40078082E
:100F2000C3007708C200C901C801C7017730C600F5
:100F3000B1238A150A12A12B4208B63CC200FA015D
:100F40004308C600C3170310C30CC40CC50CFA0C2D
:100F5000F90CF80CF70CC20BA32FC61FBA2FF70918
:100F6000F809F909FA09F70A0319F80A0319F90A3D
:100F70000319FA0A0800F701F801F901FA01CA0198
:100F8000CB01CC01CD0149084804470446040319AC
:100F9000F92F2030CE000310C20DC30DC40DC50DB6
:100FA000CA0DCB0DCC0DCD0D49084D02031DE22F0E
:100FB00048084C02031DE22F47084B02031DE22F95
:100FC00046084A02031CF32F4608CA024708031CBE
:100FD000470FCB024808031C480FCC024908031CEA
:100FE000490FCD020314F70DF80DF90DFA0DCE0BD4
:0A0FF000CB2F4A3084008313080061
:10100000201620088316870000008312A0152008F0
:10101000831687000000831207122012200883160F
:101020008700000083128711A01120088316870013
:101030003C308312BB008A1178208A150330BB0034
:101040008A1178208A152016200883168700000050
:101050008312A01520088316870000008312871DC5
:101060002F28071220122008831687000000831201
:101070008711A0112008831687003D308312BB0022
:101080008A1178208A150130F7008A1185228A1585
:101090007808B6000130F7008A1185228A15780891
:1010A000B5000130F7008A1185228A157808BA0048
:1010B0000130F7008A1185228A157808B9000130BD
:1010C000F7008A1185228A157808B800F7018A117D
:1010D00085228A157808B700201220088316870019
:1010E00000008312A0152008831687008312871D35
:1010F000772800007B280000201620088316870030
:10110000000083123608A2003508A1003808A400A8
:101110003708A3003A08A6003908A5008A150A1264
:10112000AB2B0408BA003908BC000319B2283808F0
:10113000C5003708C4003608C3003508C200C9011D
:10114000C8012030C7008230C6008A11B1238A1539
:101150007A08B8007908B7007808B6007708B500B3
:10116000BC0B97283808C5003708C4003608C300F0
:101170003508C2008A119C278A157A08B8007908B8
:10118000B7007808B6007708B500B81FD428BA03AE
:10119000BA16B509B609B709B809B50A0319B60AE6
:1011A0000319B70A0319B80A3B30C1009A30C000CE
:1011B000CA30BF00BE010A30BC0039080319BA0AA0
:1011C0003808C5003708C4003608C3003508C20017
:1011D0004108C9004008C8003F08C7003E08C600D3
:1011E0008A11BB278A150008B500840A0008B600DA
:1011F000840A0008B700840A0008B800FD3084079C
:10120000F708031D1629390A3C02031916293A0862
:10121000031918290F393C02031910290318502902
:10122000BA1B50293A1B182920304A292030BA0508
:10123000BA1E2829BA123908031DBA037708BA0062
:101240002D30C2008A1112228A153A08F700BA011D
:1012500039083C02031D38297708BA002E30C20035
:101260008A1112228A153A08F7002030BA05003098
:101270003030BA1E4A29BA123908031DBA0377085A
:10128000BA002D30C2008A1112228A153A08F700DE
:10129000BA013030F7077708C2008A1112228A1586
:1012A0004108C5004008C4003F08C3003E08C20012
:1012B000C901C801C7010A30C6008A11BB278A15B7
:1012C0007A08C1007908C0007808BF007708BE001E
:1012D000BC0BE0280800BD010408BC003D10831BC6
:1012E0003D14B61F7B29BC173C1EBC0AB509B609C4
:1012F000B50A0319B60A360EF038B800B807E23E50
:10130000B900323EBB0036080F39B907B907BB0731
:10131000E93EBA00BA07BA07350E0F39BA07BB075C
:10132000BA0DBB0DBB09BB0D35080F39BB07B80D96
:101330000730B7000A30BB07BA03031C9B29BA0762
:10134000B903031C9F29B907B803031CA329B807D5
:10135000B703031CA72937308400831307303C05EB
:101360003C1384033C05031DBC293C1A840A3C1A27
:10137000BC292030F700D92984073B300402031927
:101380003C170008F700031DCD293C1BCD293C1A52
:10139000DD29BC19CD292030D829BC1FD5292D30F5
:1013A000F70084033C13BC13D929BC153C12303020
:1013B000F70777080C1EDA299900840A3C1FBD291B
:1013C00008000408BA003908BC000319022A3808CA
:1013D000C5003708C4003608C3003508C200C9017B
:1013E000C8012030C7008230C6008A11B1238A1597
:1013F0007A08B8007908B7007808B6007708B50011
:10140000BC0BE7293808C5003708C4003608C300FC
:101410003508C2008A119C278A157A08B800790815
:10142000B7007808B6007708B500B81F242ABA03B9
:10143000BA16B509B609B709B809B50A0319B60A43
:101440000319B70A0319B80A3B30C1009A30C0002B
:10145000CA30BF00BE010A30BC0039080319BA0AFD
:101460003808C5003708C4003608C3003508C20074
:101470004108C9004008C8003F08C7003E08C60030
:101480008A11BB278A150008B500840A0008B60037
:10149000840A0008B700840A0008B800FD308407F9
:1014A000F708031D662A390A3C020319662A3A081E
:1014B0000319682A0F393C020319602A03189C2A71
:1014C000BA1B9C2A3A1B682A2030972A2030BA057A
:1014D000BA1E772ABA123908031DBA037708BA0070
:1014E0002D300C1E712A99003A08F700BA0139080C
:1014F0003C02031D862A7708BA002E300C1E7E2A75
:1015000099003A08F7002030BA0500303030BA1E92
:10151000972ABA123908031DBA037708BA002D308A
:101520000C1E902A99003A08F700BA013030F707EC
:1015300077080C1E992A99004108C5004008C4008C
:101540003F08C3003E08C200C901C801C7010A30F4
:10155000C6008A11BB278A157A08C1007908C00025
:101560007808BF007708BE00BC0B302A0800840151
:1015700083131F308305713083168F000F08031704
:1015800087110C3003139900A23098009030831219
:101590009800831603170908C039890003131F1226
:1015A0009F12003003178800831287018801890188
:1015B000FF300313A000A101A201A301A401A50112
:1015C000A601B401B301831603170908C0398900C5
:1015D00003131F129F120030031788008312031396
:1015E0001F139F1383169F1783121F149412A012A8
:1015F0002008831687008312201620088316870090
:101600008312A011200883168700013083129400F2
:101610000030831694000108C7390838810083120E
:1016200090010030F800920000308316920083127F
:1016300020152008831687008312970183169B01CB
:101640009C0101309D0083120317870188018901E5
:101650007130831603138F000F080C3083120317A9
:101660008D0000308F008A11031330208A1512304C
:1016700003178D0000308F008A11031330208A1564
:101680001B3003178D0000308F008A1103133020A8
:101690008A15B5011830B6008A11C2208A150130AA
:1016A000B500B6018A11C2208A150230B500B60114
:1016B0008A11C2208A158A11C8218A15223003177F
:1016C0008D0000308F008A1103133F228A150330EA
:1016D000C3000230C4008A1100228A152A30031781
:1016E0008D0000308F008A1103133F228A150830C5
:1016F000B500FA30C3008A11FB208A15B50B792B8F
:101700008A11C8218A150130C300C4008A11002241
:101710008A158A11672D8A157A08AA007908A90006
:101720007808A8007708A7008A11362E8A157A084B
:10173000B2007908B1007808B0007708AF008A11CC
:10174000EC2E8A157A08AE007908AD007808AC0056
:101750007708AB000028893084002A08B8002908DF
:10176000B7002808B6002708B5000230B90091205C
:101770002030C2008A1112228A154330C2008A1119
:1017800012228A152030C2008A1112228A1589304D
:1017900084003208B8003108B7003008B6002F08BE
:1017A000B5000230B90091202030C2008A11122207
:1017B0008A152530C2008A1112228A150130C30011
:1017C0000230C4008A1100228A152030C2008A111A
:1017D00012228A15893084002E08B8002D08B7001F
:1017E0002C08B6002B08B5000230B900912020303B
:1017F000C2008A1112228A154330C2008A111222B5
:101800008A15103084003408B6003308B5006B2107
:1018100020300C1E092C9900893084002A08B80059
:101820002908B7002808B6002708B5000230B9001B
:10183000E12120300C1E1A2C9900893084003208D6
:10184000B8003108B7003008B6002F08B5000230E4
:10185000B900E12120300C1E2B2C99008930840026
:101860002E08B8002D08B7002C08B6002B08B500CC
:101870000230B900E12120300C1E3C2C99001030C0
:1018800084002208B6002108B5006B2120300C1E10
:10189000472C9900103084002408B6002308B500B6
:1018A0006B2120300C1E522C990010308400260829
:1018B000B6002508B5006B2120300C1E5D2C990068
:1018C0000A300C1E612C99000D300C1E652C9900FD
:1018D000B30A0319B40A6430C3008A11FB208A15C5
:0418E000832B6300F3
:04400E00F52CFF3F4F
:00000001FF
;PIC16F887
;CRC=2260 CREATED="03-IX-13 00:32"
/Designs/Measuring_instruments/GeoMet01A/SW/PIC16F887/main.lst
0,0 → 1,4583
CCS PCM C Compiler, Version 4.106, 47914 03-IX-13 00:32
 
Filename: D:\MLAB\Designs\Measuring_instruments\GeoMet01A\SW\PIC16F887\main.lst
 
ROM used: 3183 words (39%)
Largest free fragment is 2048
RAM used: 27 (7%) at main() level
52 (14%) worst case
Stack: 5 locations
 
*
0000: MOVLW 0A
0001: MOVWF 0A
0002: GOTO 2B7
0003: NOP
.................... #include "main.h"
.................... #include <16F887.h>
.................... //////// Standard Header file for the PIC16F887 device ////////////////
.................... #device PIC16F887
.................... #list
....................
.................... #device adc=10
....................
.................... #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)
*
00FB: MOVLW 43
00FC: MOVWF 04
00FD: BCF 03.7
00FE: MOVF 00,W
00FF: BTFSC 03.2
0100: GOTO 10E
0101: MOVLW 02
0102: MOVWF 78
0103: CLRF 77
0104: DECFSZ 77,F
0105: GOTO 104
0106: DECFSZ 78,F
0107: GOTO 103
0108: MOVLW 97
0109: MOVWF 77
010A: DECFSZ 77,F
010B: GOTO 10A
010C: DECFSZ 00,F
010D: GOTO 101
010E: RETURN
.................... #use i2c(master, sda=PIN_C4, scl=PIN_C3)
*
0078: MOVLW 08
0079: MOVWF 78
007A: NOP
007B: BCF 07.3
007C: BCF 20.3
007D: MOVF 20,W
007E: BSF 03.5
007F: MOVWF 07
0080: NOP
0081: BCF 03.5
0082: RLF 3B,F
0083: BCF 07.4
0084: BTFSS 03.0
0085: GOTO 08C
0086: BSF 20.4
0087: MOVF 20,W
0088: BSF 03.5
0089: MOVWF 07
008A: GOTO 090
008B: BCF 03.5
008C: BCF 20.4
008D: MOVF 20,W
008E: BSF 03.5
008F: MOVWF 07
0090: NOP
0091: BCF 03.5
0092: BSF 20.3
0093: MOVF 20,W
0094: BSF 03.5
0095: MOVWF 07
0096: BCF 03.5
0097: BTFSS 07.3
0098: GOTO 097
0099: DECFSZ 78,F
009A: GOTO 07A
009B: NOP
009C: BCF 07.3
009D: BCF 20.3
009E: MOVF 20,W
009F: BSF 03.5
00A0: MOVWF 07
00A1: NOP
00A2: BCF 03.5
00A3: BSF 20.4
00A4: MOVF 20,W
00A5: BSF 03.5
00A6: MOVWF 07
00A7: NOP
00A8: NOP
00A9: BCF 03.5
00AA: BSF 20.3
00AB: MOVF 20,W
00AC: BSF 03.5
00AD: MOVWF 07
00AE: BCF 03.5
00AF: BTFSS 07.3
00B0: GOTO 0AF
00B1: CLRF 78
00B2: NOP
00B3: BTFSC 07.4
00B4: BSF 78.0
00B5: BCF 07.3
00B6: BCF 20.3
00B7: MOVF 20,W
00B8: BSF 03.5
00B9: MOVWF 07
00BA: BCF 03.5
00BB: BCF 07.4
00BC: BCF 20.4
00BD: MOVF 20,W
00BE: BSF 03.5
00BF: MOVWF 07
00C0: BCF 03.5
00C1: RETURN
*
0285: MOVLW 08
0286: MOVWF 3C
0287: MOVF 77,W
0288: MOVWF 3D
0289: BSF 20.4
028A: MOVF 20,W
028B: BSF 03.5
028C: MOVWF 07
028D: NOP
028E: BCF 03.5
028F: BSF 20.3
0290: MOVF 20,W
0291: BSF 03.5
0292: MOVWF 07
0293: BCF 03.5
0294: BTFSS 07.3
0295: GOTO 294
0296: BTFSC 07.4
0297: BSF 03.0
0298: BTFSS 07.4
0299: BCF 03.0
029A: RLF 78,F
029B: NOP
029C: BCF 20.3
029D: MOVF 20,W
029E: BSF 03.5
029F: MOVWF 07
02A0: BCF 03.5
02A1: BCF 07.3
02A2: DECFSZ 3C,F
02A3: GOTO 289
02A4: BSF 20.4
02A5: MOVF 20,W
02A6: BSF 03.5
02A7: MOVWF 07
02A8: NOP
02A9: BCF 03.5
02AA: BCF 07.4
02AB: MOVF 3D,W
02AC: BTFSC 03.2
02AD: GOTO 2B3
02AE: BCF 20.4
02AF: MOVF 20,W
02B0: BSF 03.5
02B1: MOVWF 07
02B2: BCF 03.5
02B3: NOP
02B4: BSF 20.3
02B5: MOVF 20,W
02B6: BSF 03.5
02B7: MOVWF 07
02B8: BCF 03.5
02B9: BTFSS 07.3
02BA: GOTO 2B9
02BB: NOP
02BC: BCF 07.3
02BD: BCF 20.3
02BE: MOVF 20,W
02BF: BSF 03.5
02C0: MOVWF 07
02C1: NOP
02C2: BCF 03.5
02C3: BCF 07.4
02C4: BCF 20.4
02C5: MOVF 20,W
02C6: BSF 03.5
02C7: MOVWF 07
02C8: BCF 03.5
02C9: RETURN
.................... #use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)
....................
....................
....................
.................... #define LCD_ENABLE_PIN PIN_E0 ////
.................... #define LCD_RS_PIN PIN_E1 ////
.................... #define LCD_RW_PIN PIN_E2 ////
.................... #define LCD_DATA4 PIN_D4 ////
.................... #define LCD_DATA5 PIN_D5 ////
.................... #define LCD_DATA6 PIN_D6 ////
.................... #define LCD_DATA7 PIN_D7
.................... #include <lcd.c>
.................... ///////////////////////////////////////////////////////////////////////////////
.................... //// LCD.C ////
.................... //// Driver for common LCD modules ////
.................... //// ////
.................... //// lcd_init() Must be called before any other function. ////
.................... //// ////
.................... //// lcd_putc(c) Will display c on the next position of the LCD. ////
.................... //// \a Set cursor position to upper left ////
.................... //// \f Clear display, set cursor to upper left ////
.................... //// \n Go to start of second line ////
.................... //// \b Move back one position ////
.................... //// If LCD_EXTENDED_NEWLINE is defined, the \n character ////
.................... //// will erase all remanining characters on the current ////
.................... //// line, and move the cursor to the beginning of the next ////
.................... //// line. ////
.................... //// If LCD_EXTENDED_NEWLINE is defined, the \r character ////
.................... //// will move the cursor to the start of the current ////
.................... //// line. ////
.................... //// ////
.................... //// lcd_gotoxy(x,y) Set write position on LCD (upper left is 1,1) ////
.................... //// ////
.................... //// lcd_getc(x,y) Returns character at position x,y on LCD ////
.................... //// ////
.................... //// CONFIGURATION ////
.................... //// The LCD can be configured in one of two ways: a.) port access or ////
.................... //// b.) pin access. Port access requires the entire 7 bit interface ////
.................... //// connected to one GPIO port, and the data bits (D4:D7 of the LCD) ////
.................... //// connected to sequential pins on the GPIO. Pin access ////
.................... //// has no requirements, all 7 bits of the control interface can ////
.................... //// can be connected to any GPIO using several ports. ////
.................... //// ////
.................... //// To use port access, #define LCD_DATA_PORT to the SFR location of ////
.................... //// of the GPIO port that holds the interface, -AND- edit LCD_PIN_MAP ////
.................... //// of this file to configure the pin order. If you are using a ////
.................... //// baseline PIC (PCB), then LCD_OUTPUT_MAP and LCD_INPUT_MAP also must ////
.................... //// be defined. ////
.................... //// ////
.................... //// Example of port access: ////
.................... //// #define LCD_DATA_PORT getenv("SFR:PORTD") ////
.................... //// ////
.................... //// To use pin access, the following pins must be defined: ////
.................... //// LCD_ENABLE_PIN ////
.................... //// LCD_RS_PIN ////
.................... //// LCD_RW_PIN ////
.................... //// LCD_DATA4 ////
.................... //// LCD_DATA5 ////
.................... //// LCD_DATA6 ////
.................... //// LCD_DATA7 ////
.................... //// ////
.................... //// Example of pin access: ////
.................... //// #define LCD_ENABLE_PIN PIN_E0 ////
.................... //// #define LCD_RS_PIN PIN_E1 ////
.................... //// #define LCD_RW_PIN PIN_E2 ////
.................... //// #define LCD_DATA4 PIN_D4 ////
.................... //// #define LCD_DATA5 PIN_D5 ////
.................... //// #define LCD_DATA6 PIN_D6 ////
.................... //// #define LCD_DATA7 PIN_D7 ////
.................... //// ////
.................... ///////////////////////////////////////////////////////////////////////////////
.................... //// (C) Copyright 1996,2010 Custom Computer Services ////
.................... //// This source code may only be used by licensed users of the CCS C ////
.................... //// compiler. This source code may only be distributed to other ////
.................... //// licensed users of the CCS C compiler. No other use, reproduction ////
.................... //// or distribution is permitted without written permission. ////
.................... //// Derivative programs created using this software in object code ////
.................... //// form are not restricted in any way. ////
.................... ///////////////////////////////////////////////////////////////////////////
....................
.................... // define the pinout.
.................... // only required if port access is being used.
.................... typedef struct
.................... { // This structure is overlayed
.................... BOOLEAN enable; // on to an I/O port to gain
.................... BOOLEAN rs; // access to the LCD pins.
.................... BOOLEAN rw; // The bits are allocated from
.................... BOOLEAN unused; // low order up. ENABLE will
.................... int data : 4; // be LSB pin of that port.
.................... #if defined(__PCD__) // The port used will be LCD_DATA_PORT.
.................... int reserved: 8;
.................... #endif
.................... } LCD_PIN_MAP;
....................
.................... // this is to improve compatability with previous LCD drivers that accepted
.................... // a define labeled 'use_portb_lcd' that configured the LCD onto port B.
.................... #if ((defined(use_portb_lcd)) && (use_portb_lcd==TRUE))
.................... #define LCD_DATA_PORT getenv("SFR:PORTB")
.................... #endif
....................
.................... #if defined(__PCB__)
.................... // these definitions only need to be modified for baseline PICs.
.................... // all other PICs use LCD_PIN_MAP or individual LCD_xxx pin definitions.
.................... /* EN, RS, RW, UNUSED, DATA */
.................... const LCD_PIN_MAP LCD_OUTPUT_MAP = {0, 0, 0, 0, 0};
.................... const LCD_PIN_MAP LCD_INPUT_MAP = {0, 0, 0, 0, 0xF};
.................... #endif
....................
.................... ////////////////////// END CONFIGURATION ///////////////////////////////////
....................
.................... #ifndef LCD_ENABLE_PIN
.................... #define lcd_output_enable(x) lcdlat.enable=x
.................... #define lcd_enable_tris() lcdtris.enable=0
.................... #else
.................... #define lcd_output_enable(x) output_bit(LCD_ENABLE_PIN, x)
.................... #define lcd_enable_tris() output_drive(LCD_ENABLE_PIN)
.................... #endif
....................
.................... #ifndef LCD_RS_PIN
.................... #define lcd_output_rs(x) lcdlat.rs=x
.................... #define lcd_rs_tris() lcdtris.rs=0
.................... #else
.................... #define lcd_output_rs(x) output_bit(LCD_RS_PIN, x)
.................... #define lcd_rs_tris() output_drive(LCD_RS_PIN)
.................... #endif
....................
.................... #ifndef LCD_RW_PIN
.................... #define lcd_output_rw(x) lcdlat.rw=x
.................... #define lcd_rw_tris() lcdtris.rw=0
.................... #else
.................... #define lcd_output_rw(x) output_bit(LCD_RW_PIN, x)
.................... #define lcd_rw_tris() output_drive(LCD_RW_PIN)
.................... #endif
....................
.................... // original version of this library incorrectly labeled LCD_DATA0 as LCD_DATA4,
.................... // LCD_DATA1 as LCD_DATA5, and so on. this block of code makes the driver
.................... // compatible with any code written for the original library
.................... #if (defined(LCD_DATA0) && defined(LCD_DATA1) && defined(LCD_DATA2) && defined(LCD_DATA3) && !defined(LCD_DATA4) && !defined(LCD_DATA5) && !defined(LCD_DATA6) && !defined(LCD_DATA7))
.................... #define LCD_DATA4 LCD_DATA0
.................... #define LCD_DATA5 LCD_DATA1
.................... #define LCD_DATA6 LCD_DATA2
.................... #define LCD_DATA7 LCD_DATA3
.................... #endif
....................
.................... #ifndef LCD_DATA4
.................... #ifndef LCD_DATA_PORT
.................... #if defined(__PCB__)
.................... #define LCD_DATA_PORT 0x06 //portb
.................... #define set_tris_lcd(x) set_tris_b(x)
.................... #else
.................... #if defined(PIN_D0)
.................... #define LCD_DATA_PORT getenv("SFR:PORTD") //portd
.................... #else
.................... #define LCD_DATA_PORT getenv("SFR:PORTB") //portb
.................... #endif
.................... #endif
.................... #endif
....................
.................... #if defined(__PCB__)
.................... LCD_PIN_MAP lcd, lcdlat;
.................... #byte lcd = LCD_DATA_PORT
.................... #byte lcdlat = LCD_DATA_PORT
.................... #elif defined(__PCM__)
.................... LCD_PIN_MAP lcd, lcdlat, lcdtris;
.................... #byte lcd = LCD_DATA_PORT
.................... #byte lcdlat = LCD_DATA_PORT
.................... #byte lcdtris = LCD_DATA_PORT+0x80
.................... #elif defined(__PCH__)
.................... LCD_PIN_MAP lcd, lcdlat, lcdtris;
.................... #byte lcd = LCD_DATA_PORT
.................... #byte lcdlat = LCD_DATA_PORT+9
.................... #byte lcdtris = LCD_DATA_PORT+0x12
.................... #elif defined(__PCD__)
.................... LCD_PIN_MAP lcd, lcdlat, lcdtris;
.................... #word lcd = LCD_DATA_PORT
.................... #word lcdlat = LCD_DATA_PORT+2
.................... #word lcdtris = LCD_DATA_PORT-0x02
.................... #endif
.................... #endif //LCD_DATA4 not defined
....................
.................... #ifndef LCD_TYPE
.................... #define LCD_TYPE 2 // 0=5x7, 1=5x10, 2=2 lines
.................... #endif
....................
.................... #ifndef LCD_LINE_TWO
.................... #define LCD_LINE_TWO 0x40 // LCD RAM address for the second line
.................... #endif
....................
.................... #ifndef LCD_LINE_LENGTH
.................... #define LCD_LINE_LENGTH 20
.................... #endif
....................
.................... BYTE const LCD_INIT_STRING[4] = {0x20 | (LCD_TYPE << 2), 0xc, 1, 6};
.................... // These bytes need to be sent to the LCD
.................... // to start it up.
....................
.................... BYTE lcd_read_nibble(void);
....................
.................... BYTE lcd_read_byte(void)
.................... {
.................... BYTE low,high;
....................
.................... #if defined(__PCB__)
.................... set_tris_lcd(LCD_INPUT_MAP);
.................... #else
.................... #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7))
.................... output_float(LCD_DATA4);
*
0174: BSF 08.4
.................... output_float(LCD_DATA5);
0175: BSF 08.5
.................... output_float(LCD_DATA6);
0176: BSF 08.6
.................... output_float(LCD_DATA7);
0177: BSF 08.7
.................... #else
.................... lcdtris.data = 0xF;
.................... #endif
.................... #endif
....................
.................... lcd_output_rw(1);
0178: BCF 03.5
0179: BSF 09.2
017A: BSF 03.5
017B: BCF 09.2
.................... delay_cycles(1);
017C: NOP
.................... lcd_output_enable(1);
017D: BCF 03.5
017E: BSF 09.0
017F: BSF 03.5
0180: BCF 09.0
.................... delay_cycles(1);
0181: NOP
.................... high = lcd_read_nibble();
0182: BCF 03.5
0183: CALL 13B
0184: MOVF 78,W
0185: MOVWF 4A
....................
.................... lcd_output_enable(0);
0186: BCF 09.0
0187: BSF 03.5
0188: BCF 09.0
.................... delay_cycles(1);
0189: NOP
.................... lcd_output_enable(1);
018A: BCF 03.5
018B: BSF 09.0
018C: BSF 03.5
018D: BCF 09.0
.................... delay_us(1);
018E: GOTO 18F
.................... low = lcd_read_nibble();
018F: BCF 03.5
0190: CALL 13B
0191: MOVF 78,W
0192: MOVWF 49
....................
.................... lcd_output_enable(0);
0193: BCF 09.0
0194: BSF 03.5
0195: BCF 09.0
....................
.................... #if defined(__PCB__)
.................... set_tris_lcd(LCD_OUTPUT_MAP);
.................... #else
.................... #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7))
.................... output_drive(LCD_DATA4);
0196: BCF 08.4
.................... output_drive(LCD_DATA5);
0197: BCF 08.5
.................... output_drive(LCD_DATA6);
0198: BCF 08.6
.................... output_drive(LCD_DATA7);
0199: BCF 08.7
.................... #else
.................... lcdtris.data = 0x0;
.................... #endif
.................... #endif
....................
.................... return( (high<<4) | low);
019A: BCF 03.5
019B: SWAPF 4A,W
019C: MOVWF 77
019D: MOVLW F0
019E: ANDWF 77,F
019F: MOVF 77,W
01A0: IORWF 49,W
01A1: MOVWF 78
.................... }
....................
.................... BYTE lcd_read_nibble(void)
.................... {
.................... #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7))
*
013B: CLRF 4B
.................... BYTE n = 0x00;
....................
.................... /* Read the data port */
.................... n |= input(LCD_DATA4);
013C: BSF 03.5
013D: BSF 08.4
013E: MOVLW 00
013F: BCF 03.5
0140: BTFSC 08.4
0141: MOVLW 01
0142: IORWF 4B,F
.................... n |= input(LCD_DATA5) << 1;
0143: BSF 03.5
0144: BSF 08.5
0145: MOVLW 00
0146: BCF 03.5
0147: BTFSC 08.5
0148: MOVLW 01
0149: MOVWF 77
014A: BCF 03.0
014B: RLF 77,F
014C: MOVF 77,W
014D: IORWF 4B,F
.................... n |= input(LCD_DATA6) << 2;
014E: BSF 03.5
014F: BSF 08.6
0150: MOVLW 00
0151: BCF 03.5
0152: BTFSC 08.6
0153: MOVLW 01
0154: MOVWF 77
0155: RLF 77,F
0156: RLF 77,F
0157: MOVLW FC
0158: ANDWF 77,F
0159: MOVF 77,W
015A: IORWF 4B,F
.................... n |= input(LCD_DATA7) << 3;
015B: BSF 03.5
015C: BSF 08.7
015D: MOVLW 00
015E: BCF 03.5
015F: BTFSC 08.7
0160: MOVLW 01
0161: MOVWF 77
0162: RLF 77,F
0163: RLF 77,F
0164: RLF 77,F
0165: MOVLW F8
0166: ANDWF 77,F
0167: MOVF 77,W
0168: IORWF 4B,F
....................
.................... return(n);
0169: MOVF 4B,W
016A: MOVWF 78
.................... #else
.................... return(lcd.data);
.................... #endif
.................... }
016B: RETURN
....................
.................... void lcd_send_nibble(BYTE n)
.................... {
.................... #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7))
.................... /* Write to the data port */
.................... output_bit(LCD_DATA4, bit_test(n, 0));
*
010F: BTFSC 4A.0
0110: GOTO 113
0111: BCF 08.4
0112: GOTO 114
0113: BSF 08.4
0114: BSF 03.5
0115: BCF 08.4
.................... output_bit(LCD_DATA5, bit_test(n, 1));
0116: BCF 03.5
0117: BTFSC 4A.1
0118: GOTO 11B
0119: BCF 08.5
011A: GOTO 11C
011B: BSF 08.5
011C: BSF 03.5
011D: BCF 08.5
.................... output_bit(LCD_DATA6, bit_test(n, 2));
011E: BCF 03.5
011F: BTFSC 4A.2
0120: GOTO 123
0121: BCF 08.6
0122: GOTO 124
0123: BSF 08.6
0124: BSF 03.5
0125: BCF 08.6
.................... output_bit(LCD_DATA7, bit_test(n, 3));
0126: BCF 03.5
0127: BTFSC 4A.3
0128: GOTO 12B
0129: BCF 08.7
012A: GOTO 12C
012B: BSF 08.7
012C: BSF 03.5
012D: BCF 08.7
.................... #else
.................... lcdlat.data = n;
.................... #endif
....................
.................... delay_cycles(1);
012E: NOP
.................... lcd_output_enable(1);
012F: BCF 03.5
0130: BSF 09.0
0131: BSF 03.5
0132: BCF 09.0
.................... delay_us(2);
0133: GOTO 134
0134: GOTO 135
.................... lcd_output_enable(0);
0135: BCF 03.5
0136: BCF 09.0
0137: BSF 03.5
0138: BCF 09.0
.................... }
0139: BCF 03.5
013A: RETURN
....................
.................... void lcd_send_byte(BYTE address, BYTE n)
.................... {
.................... #if defined(__PCB__)
.................... set_tris_lcd(LCD_OUTPUT_MAP);
.................... #else
.................... lcd_enable_tris();
*
016C: BSF 03.5
016D: BCF 09.0
.................... lcd_rs_tris();
016E: BCF 09.1
.................... lcd_rw_tris();
016F: BCF 09.2
.................... #endif
....................
.................... lcd_output_rs(0);
0170: BCF 03.5
0171: BCF 09.1
0172: BSF 03.5
0173: BCF 09.1
.................... while ( bit_test(lcd_read_byte(),7) ) ;
*
01A2: MOVF 78,W
01A3: MOVWF 49
01A4: BTFSS 49.7
01A5: GOTO 1A8
01A6: BSF 03.5
01A7: GOTO 174
.................... lcd_output_rs(address);
01A8: MOVF 47,F
01A9: BTFSS 03.2
01AA: GOTO 1AD
01AB: BCF 09.1
01AC: GOTO 1AE
01AD: BSF 09.1
01AE: BSF 03.5
01AF: BCF 09.1
.................... delay_cycles(1);
01B0: NOP
.................... lcd_output_rw(0);
01B1: BCF 03.5
01B2: BCF 09.2
01B3: BSF 03.5
01B4: BCF 09.2
.................... delay_cycles(1);
01B5: NOP
.................... lcd_output_enable(0);
01B6: BCF 03.5
01B7: BCF 09.0
01B8: BSF 03.5
01B9: BCF 09.0
.................... lcd_send_nibble(n >> 4);
01BA: BCF 03.5
01BB: SWAPF 48,W
01BC: MOVWF 49
01BD: MOVLW 0F
01BE: ANDWF 49,F
01BF: MOVF 49,W
01C0: MOVWF 4A
01C1: CALL 10F
.................... lcd_send_nibble(n & 0xf);
01C2: MOVF 48,W
01C3: ANDLW 0F
01C4: MOVWF 49
01C5: MOVWF 4A
01C6: CALL 10F
.................... }
01C7: RETURN
....................
.................... #if defined(LCD_EXTENDED_NEWLINE)
.................... unsigned int8 g_LcdX, g_LcdY;
.................... #endif
....................
.................... void lcd_init(void)
.................... {
.................... BYTE i;
....................
.................... #if defined(__PCB__)
.................... set_tris_lcd(LCD_OUTPUT_MAP);
.................... #else
.................... #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7))
.................... output_drive(LCD_DATA4);
01C8: BSF 03.5
01C9: BCF 08.4
.................... output_drive(LCD_DATA5);
01CA: BCF 08.5
.................... output_drive(LCD_DATA6);
01CB: BCF 08.6
.................... output_drive(LCD_DATA7);
01CC: BCF 08.7
.................... #else
.................... lcdtris.data = 0x0;
.................... #endif
.................... lcd_enable_tris();
01CD: BCF 09.0
.................... lcd_rs_tris();
01CE: BCF 09.1
.................... lcd_rw_tris();
01CF: BCF 09.2
.................... #endif
....................
.................... lcd_output_rs(0);
01D0: BCF 03.5
01D1: BCF 09.1
01D2: BSF 03.5
01D3: BCF 09.1
.................... lcd_output_rw(0);
01D4: BCF 03.5
01D5: BCF 09.2
01D6: BSF 03.5
01D7: BCF 09.2
.................... lcd_output_enable(0);
01D8: BCF 03.5
01D9: BCF 09.0
01DA: BSF 03.5
01DB: BCF 09.0
....................
.................... delay_ms(15);
01DC: MOVLW 0F
01DD: BCF 03.5
01DE: MOVWF 43
01DF: CALL 0FB
.................... for(i=1;i<=3;++i)
01E0: MOVLW 01
01E1: MOVWF 35
01E2: MOVF 35,W
01E3: SUBLW 03
01E4: BTFSS 03.0
01E5: GOTO 1EE
.................... {
.................... lcd_send_nibble(3);
01E6: MOVLW 03
01E7: MOVWF 4A
01E8: CALL 10F
.................... delay_ms(5);
01E9: MOVLW 05
01EA: MOVWF 43
01EB: CALL 0FB
.................... }
01EC: INCF 35,F
01ED: GOTO 1E2
....................
.................... lcd_send_nibble(2);
01EE: MOVLW 02
01EF: MOVWF 4A
01F0: CALL 10F
.................... for(i=0;i<=3;++i)
01F1: CLRF 35
01F2: MOVF 35,W
01F3: SUBLW 03
01F4: BTFSS 03.0
01F5: GOTO 1FF
.................... lcd_send_byte(0,LCD_INIT_STRING[i]);
01F6: MOVF 35,W
01F7: CALL 004
01F8: MOVWF 36
01F9: CLRF 47
01FA: MOVF 36,W
01FB: MOVWF 48
01FC: CALL 16C
....................
.................... #if defined(LCD_EXTENDED_NEWLINE)
01FD: INCF 35,F
01FE: GOTO 1F2
.................... g_LcdX = 0;
.................... g_LcdY = 0;
.................... #endif
.................... }
01FF: RETURN
....................
.................... void lcd_gotoxy(BYTE x, BYTE y)
.................... {
.................... BYTE address;
....................
.................... if(y!=1)
0200: DECFSZ 44,W
0201: GOTO 203
0202: GOTO 206
.................... address=LCD_LINE_TWO;
0203: MOVLW 40
0204: MOVWF 45
.................... else
0205: GOTO 207
.................... address=0;
0206: CLRF 45
....................
.................... address+=x-1;
0207: MOVLW 01
0208: SUBWF 43,W
0209: ADDWF 45,F
.................... lcd_send_byte(0,0x80|address);
020A: MOVF 45,W
020B: IORLW 80
020C: MOVWF 46
020D: CLRF 47
020E: MOVF 46,W
020F: MOVWF 48
0210: CALL 16C
....................
.................... #if defined(LCD_EXTENDED_NEWLINE)
.................... g_LcdX = x - 1;
.................... g_LcdY = y - 1;
.................... #endif
.................... }
0211: RETURN
....................
.................... void lcd_putc(char c)
.................... {
.................... switch (c)
.................... {
0212: MOVF 42,W
0213: XORLW 07
0214: BTFSC 03.2
0215: GOTO 220
0216: XORLW 0B
0217: BTFSC 03.2
0218: GOTO 225
0219: XORLW 06
021A: BTFSC 03.2
021B: GOTO 22D
021C: XORLW 02
021D: BTFSC 03.2
021E: GOTO 233
021F: GOTO 238
.................... case '\a' : lcd_gotoxy(1,1); break;
0220: MOVLW 01
0221: MOVWF 43
0222: MOVWF 44
0223: CALL 200
0224: GOTO 23E
....................
.................... case '\f' : lcd_send_byte(0,1);
0225: CLRF 47
0226: MOVLW 01
0227: MOVWF 48
0228: CALL 16C
.................... delay_ms(2);
0229: MOVLW 02
022A: MOVWF 43
022B: CALL 0FB
.................... #if defined(LCD_EXTENDED_NEWLINE)
.................... g_LcdX = 0;
.................... g_LcdY = 0;
.................... #endif
.................... break;
022C: GOTO 23E
....................
.................... #if defined(LCD_EXTENDED_NEWLINE)
.................... case '\r' : lcd_gotoxy(1, g_LcdY+1); break;
.................... case '\n' :
.................... while (g_LcdX++ < LCD_LINE_LENGTH)
.................... {
.................... lcd_send_byte(1, ' ');
.................... }
.................... lcd_gotoxy(1, g_LcdY+2);
.................... break;
.................... #else
.................... case '\n' : lcd_gotoxy(1,2); break;
022D: MOVLW 01
022E: MOVWF 43
022F: MOVLW 02
0230: MOVWF 44
0231: CALL 200
0232: GOTO 23E
.................... #endif
....................
.................... case '\b' : lcd_send_byte(0,0x10); break;
0233: CLRF 47
0234: MOVLW 10
0235: MOVWF 48
0236: CALL 16C
0237: GOTO 23E
....................
.................... #if defined(LCD_EXTENDED_NEWLINE)
.................... default :
.................... if (g_LcdX < LCD_LINE_LENGTH)
.................... {
.................... lcd_send_byte(1, c);
.................... g_LcdX++;
.................... }
.................... break;
.................... #else
.................... default : lcd_send_byte(1,c); break;
0238: MOVLW 01
0239: MOVWF 47
023A: MOVF 42,W
023B: MOVWF 48
023C: CALL 16C
023D: GOTO 23E
.................... #endif
.................... }
.................... }
023E: RETURN
....................
.................... char lcd_getc(BYTE x, BYTE y)
.................... {
.................... char value;
....................
.................... lcd_gotoxy(x,y);
.................... while ( bit_test(lcd_read_byte(),7) ); // wait until busy flag is low
.................... lcd_output_rs(1);
.................... value = lcd_read_byte();
.................... lcd_output_rs(0);
....................
.................... return(value);
.................... }
....................
....................
.................... #include "../SHT25.h"
....................
.................... #define SHT25_HEATER_ON 0x04
.................... #define SHT25_HEATER_OFF 0x00
.................... #define SHT25_OTP_reload_off 0x02
.................... #define SHT25_RH12_T14 0x00
.................... #define SHT25_RH8_T12 0x01
.................... #define SHT25_RH10_T13 0x80
.................... #define SHT25_RH11_T11 0x81
....................
.................... #define SHT25_ADDR 0x80
....................
.................... #include "SHT25.c"
.................... void SHT25_soft_reset()
.................... {
.................... i2c_start(); // Start condition
.................... i2c_write(0x80); // Device address
.................... i2c_write(0xFE); // Device command
.................... i2c_stop(); // Stop condition
.................... }
....................
.................... unsigned int8 SHT25_setup(unsigned int8 setup_reg ) // writes to status register and returns its value
.................... {
.................... unsigned int8 reg;
....................
.................... i2c_start(); // Start condition
.................... i2c_write(SHT25_ADDR); // Device address
.................... i2c_write(0xE7); // Device command
....................
.................... i2c_start(); // Start condition
.................... i2c_write(SHT25_ADDR+1); // Device address
.................... reg=i2c_read(0); // Read status actual status register
....................
.................... reg = (reg & 0x3A) | setup_reg;
....................
.................... i2c_start(); // Start condition
.................... i2c_write(SHT25_ADDR); // Device address
.................... i2c_write(0xE6); // Write to status register
.................... i2c_write(reg); // Device command
.................... i2c_stop(); // Stop condition
....................
.................... delay_ms(10);
....................
.................... i2c_start(); // Start condition
.................... i2c_write(SHT25_ADDR); // Device address
.................... i2c_write(0xE7); // Device command
....................
.................... i2c_start(); // Start condition
.................... i2c_write(SHT25_ADDR+1); // Device address
.................... reg=i2c_read(0); // Read status actual status register
....................
.................... return (reg);
.................... }
....................
....................
.................... float SHT25_get_temp()
.................... {
.................... unsigned int8 MSB, LSB, Check;
.................... unsigned int16 data;
....................
.................... i2c_start();
*
0567: BSF 20.4
0568: MOVF 20,W
0569: BSF 03.5
056A: MOVWF 07
056B: NOP
056C: BCF 03.5
056D: BSF 20.3
056E: MOVF 20,W
056F: BSF 03.5
0570: MOVWF 07
0571: NOP
0572: BCF 03.5
0573: BTFSS 07.3
0574: GOTO 573
0575: BCF 07.4
0576: BCF 20.4
0577: MOVF 20,W
0578: BSF 03.5
0579: MOVWF 07
057A: NOP
057B: BCF 03.5
057C: BCF 07.3
057D: BCF 20.3
057E: MOVF 20,W
057F: BSF 03.5
0580: MOVWF 07
.................... I2C_Write(SHT25_ADDR);
0581: MOVLW 80
0582: BCF 03.5
0583: MOVWF 3B
0584: CALL 078
.................... I2C_write(0xE3);
0585: MOVLW E3
0586: MOVWF 3B
0587: CALL 078
.................... i2c_stop();
0588: BCF 20.4
0589: MOVF 20,W
058A: BSF 03.5
058B: MOVWF 07
058C: NOP
058D: BCF 03.5
058E: BSF 20.3
058F: MOVF 20,W
0590: BSF 03.5
0591: MOVWF 07
0592: BCF 03.5
0593: BTFSS 07.3
0594: GOTO 593
0595: NOP
0596: GOTO 597
0597: NOP
0598: BSF 20.4
0599: MOVF 20,W
059A: BSF 03.5
059B: MOVWF 07
059C: NOP
....................
.................... delay_ms(100);
059D: MOVLW 64
059E: BCF 03.5
059F: MOVWF 43
05A0: CALL 0FB
....................
.................... i2c_start();
05A1: BSF 20.4
05A2: MOVF 20,W
05A3: BSF 03.5
05A4: MOVWF 07
05A5: NOP
05A6: BCF 03.5
05A7: BSF 20.3
05A8: MOVF 20,W
05A9: BSF 03.5
05AA: MOVWF 07
05AB: NOP
05AC: BCF 03.5
05AD: BCF 07.4
05AE: BCF 20.4
05AF: MOVF 20,W
05B0: BSF 03.5
05B1: MOVWF 07
05B2: NOP
05B3: BCF 03.5
05B4: BCF 07.3
05B5: BCF 20.3
05B6: MOVF 20,W
05B7: BSF 03.5
05B8: MOVWF 07
.................... I2C_Write(SHT25_ADDR+1);
05B9: MOVLW 81
05BA: BCF 03.5
05BB: MOVWF 3B
05BC: CALL 078
.................... MSB=i2c_read(1);
05BD: MOVLW 01
05BE: MOVWF 77
05BF: CALL 285
05C0: MOVF 78,W
05C1: MOVWF 35
.................... LSB=i2c_read(1);
05C2: MOVLW 01
05C3: MOVWF 77
05C4: CALL 285
05C5: MOVF 78,W
05C6: MOVWF 36
.................... Check=i2c_read(0);
05C7: CLRF 77
05C8: CALL 285
05C9: MOVF 78,W
05CA: MOVWF 37
.................... i2c_stop();
05CB: BCF 20.4
05CC: MOVF 20,W
05CD: BSF 03.5
05CE: MOVWF 07
05CF: NOP
05D0: BCF 03.5
05D1: BSF 20.3
05D2: MOVF 20,W
05D3: BSF 03.5
05D4: MOVWF 07
05D5: BCF 03.5
05D6: BTFSS 07.3
05D7: GOTO 5D6
05D8: NOP
05D9: GOTO 5DA
05DA: NOP
05DB: BSF 20.4
05DC: MOVF 20,W
05DD: BSF 03.5
05DE: MOVWF 07
05DF: NOP
....................
.................... LSB = LSB >> 2; // trow out status bits
05E0: BCF 03.5
05E1: RRF 36,F
05E2: RRF 36,F
05E3: MOVLW 3F
05E4: ANDWF 36,F
....................
.................... data = (((unsigned int16) MSB << 8) + (LSB << 4));
05E5: CLRF 3B
05E6: MOVF 35,W
05E7: MOVWF 3A
05E8: MOVWF 3B
05E9: CLRF 3A
05EA: SWAPF 36,W
05EB: MOVWF 77
05EC: MOVLW F0
05ED: ANDWF 77,F
05EE: MOVF 77,W
05EF: ADDWF 3A,W
05F0: MOVWF 38
05F1: MOVF 3B,W
05F2: MOVWF 39
05F3: BTFSC 03.0
05F4: INCF 39,F
.................... return(-46.85 + 175.72*((float)data/0xFFFF));
05F5: MOVF 39,W
05F6: MOVWF 3B
05F7: MOVF 38,W
05F8: MOVWF 3A
05F9: CALL 2CA
05FA: MOVF 77,W
05FB: MOVWF 3A
05FC: MOVF 78,W
05FD: MOVWF 3B
05FE: MOVF 79,W
05FF: MOVWF 3C
0600: MOVF 7A,W
0601: MOVWF 3D
0602: MOVWF 41
0603: MOVF 79,W
0604: MOVWF 40
0605: MOVF 78,W
0606: MOVWF 3F
0607: MOVF 77,W
0608: MOVWF 3E
0609: CLRF 45
060A: MOVLW FF
060B: MOVWF 44
060C: MOVLW 7F
060D: MOVWF 43
060E: MOVLW 8E
060F: MOVWF 42
0610: CALL 2E7
0611: MOVLW 52
0612: MOVWF 45
0613: MOVLW B8
0614: MOVWF 44
0615: MOVLW 2F
0616: MOVWF 43
0617: MOVLW 86
0618: MOVWF 42
0619: MOVF 7A,W
061A: MOVWF 49
061B: MOVF 79,W
061C: MOVWF 48
061D: MOVF 78,W
061E: MOVWF 47
061F: MOVF 77,W
0620: MOVWF 46
0621: CALL 3B1
0622: BCF 03.1
0623: MOVLW 66
0624: MOVWF 3D
0625: MOVWF 3C
0626: MOVLW BB
0627: MOVWF 3B
0628: MOVLW 84
0629: MOVWF 3A
062A: MOVF 7A,W
062B: MOVWF 41
062C: MOVF 79,W
062D: MOVWF 40
062E: MOVF 78,W
062F: MOVWF 3F
0630: MOVF 77,W
0631: MOVWF 3E
0632: CALL 426
.................... }
0633: BSF 0A.3
0634: BCF 0A.4
0635: GOTO 38B (RETURN)
....................
.................... float SHT25_get_hum()
.................... {
.................... unsigned int8 MSB, LSB, Check;
.................... unsigned int16 data;
....................
.................... i2c_start(); //RH
0636: BSF 20.4
0637: MOVF 20,W
0638: BSF 03.5
0639: MOVWF 07
063A: NOP
063B: BCF 03.5
063C: BSF 20.3
063D: MOVF 20,W
063E: BSF 03.5
063F: MOVWF 07
0640: NOP
0641: BCF 03.5
0642: BCF 07.4
0643: BCF 20.4
0644: MOVF 20,W
0645: BSF 03.5
0646: MOVWF 07
0647: NOP
0648: BCF 03.5
0649: BCF 07.3
064A: BCF 20.3
064B: MOVF 20,W
064C: BSF 03.5
064D: MOVWF 07
.................... I2C_Write(SHT25_ADDR);
064E: MOVLW 80
064F: BCF 03.5
0650: MOVWF 3B
0651: CALL 078
.................... I2C_write(0xE5);
0652: MOVLW E5
0653: MOVWF 3B
0654: CALL 078
....................
.................... delay_ms(100);
0655: MOVLW 64
0656: MOVWF 43
0657: CALL 0FB
....................
.................... i2c_start();
0658: BSF 20.4
0659: MOVF 20,W
065A: BSF 03.5
065B: MOVWF 07
065C: NOP
065D: BCF 03.5
065E: BSF 20.3
065F: MOVF 20,W
0660: BSF 03.5
0661: MOVWF 07
0662: NOP
0663: BCF 03.5
0664: BTFSS 07.3
0665: GOTO 664
0666: BCF 07.4
0667: BCF 20.4
0668: MOVF 20,W
0669: BSF 03.5
066A: MOVWF 07
066B: NOP
066C: BCF 03.5
066D: BCF 07.3
066E: BCF 20.3
066F: MOVF 20,W
0670: BSF 03.5
0671: MOVWF 07
.................... I2C_Write(SHT25_ADDR+1);
0672: MOVLW 81
0673: BCF 03.5
0674: MOVWF 3B
0675: CALL 078
.................... MSB=i2c_read(1);
0676: MOVLW 01
0677: MOVWF 77
0678: CALL 285
0679: MOVF 78,W
067A: MOVWF 35
.................... LSB=i2c_read(1);
067B: MOVLW 01
067C: MOVWF 77
067D: CALL 285
067E: MOVF 78,W
067F: MOVWF 36
.................... Check=i2c_read(0);
0680: CLRF 77
0681: CALL 285
0682: MOVF 78,W
0683: MOVWF 37
.................... i2c_stop();
0684: BCF 20.4
0685: MOVF 20,W
0686: BSF 03.5
0687: MOVWF 07
0688: NOP
0689: BCF 03.5
068A: BSF 20.3
068B: MOVF 20,W
068C: BSF 03.5
068D: MOVWF 07
068E: BCF 03.5
068F: BTFSS 07.3
0690: GOTO 68F
0691: NOP
0692: GOTO 693
0693: NOP
0694: BSF 20.4
0695: MOVF 20,W
0696: BSF 03.5
0697: MOVWF 07
0698: NOP
....................
.................... LSB = LSB >> 2; // trow out status bits
0699: BCF 03.5
069A: RRF 36,F
069B: RRF 36,F
069C: MOVLW 3F
069D: ANDWF 36,F
....................
.................... data = (((unsigned int16) MSB << 8) + (LSB << 4) );
069E: CLRF 3B
069F: MOVF 35,W
06A0: MOVWF 3A
06A1: MOVWF 3B
06A2: CLRF 3A
06A3: SWAPF 36,W
06A4: MOVWF 77
06A5: MOVLW F0
06A6: ANDWF 77,F
06A7: MOVF 77,W
06A8: ADDWF 3A,W
06A9: MOVWF 38
06AA: MOVF 3B,W
06AB: MOVWF 39
06AC: BTFSC 03.0
06AD: INCF 39,F
.................... return( -6.0 + 125.0*((float)data/0xFFFF));
06AE: MOVF 39,W
06AF: MOVWF 3B
06B0: MOVF 38,W
06B1: MOVWF 3A
06B2: CALL 2CA
06B3: MOVF 77,W
06B4: MOVWF 3A
06B5: MOVF 78,W
06B6: MOVWF 3B
06B7: MOVF 79,W
06B8: MOVWF 3C
06B9: MOVF 7A,W
06BA: MOVWF 3D
06BB: MOVWF 41
06BC: MOVF 79,W
06BD: MOVWF 40
06BE: MOVF 78,W
06BF: MOVWF 3F
06C0: MOVF 77,W
06C1: MOVWF 3E
06C2: CLRF 45
06C3: MOVLW FF
06C4: MOVWF 44
06C5: MOVLW 7F
06C6: MOVWF 43
06C7: MOVLW 8E
06C8: MOVWF 42
06C9: CALL 2E7
06CA: CLRF 45
06CB: CLRF 44
06CC: MOVLW 7A
06CD: MOVWF 43
06CE: MOVLW 85
06CF: MOVWF 42
06D0: MOVF 7A,W
06D1: MOVWF 49
06D2: MOVF 79,W
06D3: MOVWF 48
06D4: MOVF 78,W
06D5: MOVWF 47
06D6: MOVF 77,W
06D7: MOVWF 46
06D8: CALL 3B1
06D9: BCF 03.1
06DA: CLRF 3D
06DB: CLRF 3C
06DC: MOVLW C0
06DD: MOVWF 3B
06DE: MOVLW 81
06DF: MOVWF 3A
06E0: MOVF 7A,W
06E1: MOVWF 41
06E2: MOVF 79,W
06E3: MOVWF 40
06E4: MOVF 78,W
06E5: MOVWF 3F
06E6: MOVF 77,W
06E7: MOVWF 3E
06E8: CALL 426
.................... }
06E9: BSF 0A.3
06EA: BCF 0A.4
06EB: GOTO 396 (RETURN)
....................
....................
....................
....................
.................... #include "../LTS01.h"
.................... //Adresa pro VDD, VDD, VDD W 0x9E R 0x9F
.................... //Adresa pro GND GND GND W 0x90 R 0x91
....................
.................... #define LTS01A_address 0x90
....................
.................... #include "LTS01.c"
.................... float LTS01_get_temp()
.................... {
.................... unsigned int8 MSB;
.................... unsigned int8 LSB;
.................... signed int16 data;
....................
.................... i2c_start();
06EC: BSF 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: NOP
06F7: BCF 03.5
06F8: BCF 07.4
06F9: BCF 20.4
06FA: MOVF 20,W
06FB: BSF 03.5
06FC: MOVWF 07
06FD: NOP
06FE: BCF 03.5
06FF: BCF 07.3
0700: BCF 20.3
0701: MOVF 20,W
0702: BSF 03.5
0703: MOVWF 07
.................... I2C_Write(LTS01A_address);
0704: MOVLW 90
0705: BCF 03.5
0706: MOVWF 3B
0707: CALL 078
.................... I2C_write(0x00);
0708: CLRF 3B
0709: CALL 078
.................... i2c_stop();
070A: BCF 20.4
070B: MOVF 20,W
070C: BSF 03.5
070D: MOVWF 07
070E: NOP
070F: BCF 03.5
0710: BSF 20.3
0711: MOVF 20,W
0712: BSF 03.5
0713: MOVWF 07
0714: BCF 03.5
0715: BTFSS 07.3
0716: GOTO 715
0717: NOP
0718: GOTO 719
0719: NOP
071A: BSF 20.4
071B: MOVF 20,W
071C: BSF 03.5
071D: MOVWF 07
071E: NOP
.................... i2c_start();
071F: BCF 03.5
0720: BSF 20.4
0721: MOVF 20,W
0722: BSF 03.5
0723: MOVWF 07
0724: NOP
0725: BCF 03.5
0726: BSF 20.3
0727: MOVF 20,W
0728: BSF 03.5
0729: MOVWF 07
072A: NOP
072B: BCF 03.5
072C: BCF 07.4
072D: BCF 20.4
072E: MOVF 20,W
072F: BSF 03.5
0730: MOVWF 07
0731: NOP
0732: BCF 03.5
0733: BCF 07.3
0734: BCF 20.3
0735: MOVF 20,W
0736: BSF 03.5
0737: MOVWF 07
.................... I2C_Write(LTS01A_address+1);
0738: MOVLW 91
0739: BCF 03.5
073A: MOVWF 3B
073B: CALL 078
.................... MSB=i2c_read(1);
073C: MOVLW 01
073D: MOVWF 77
073E: CALL 285
073F: MOVF 78,W
0740: MOVWF 35
.................... LSB=i2c_read(0);
0741: CLRF 77
0742: CALL 285
0743: MOVF 78,W
0744: MOVWF 36
.................... i2c_stop();
0745: BCF 20.4
0746: MOVF 20,W
0747: BSF 03.5
0748: MOVWF 07
0749: NOP
074A: BCF 03.5
074B: BSF 20.3
074C: MOVF 20,W
074D: BSF 03.5
074E: MOVWF 07
074F: BCF 03.5
0750: BTFSS 07.3
0751: GOTO 750
0752: NOP
0753: GOTO 754
0754: NOP
0755: BSF 20.4
0756: MOVF 20,W
0757: BSF 03.5
0758: MOVWF 07
0759: NOP
....................
.................... data = MAKE16(MSB,LSB);
075A: BCF 03.5
075B: MOVF 35,W
075C: MOVWF 38
075D: MOVF 36,W
075E: MOVWF 37
....................
.................... return (data * 0.00390625 );
075F: MOVF 38,W
0760: MOVWF 3A
0761: MOVF 37,W
0762: MOVWF 39
0763: MOVF 3A,W
0764: MOVWF 3C
0765: MOVF 39,W
0766: MOVWF 3B
*
078B: MOVF 7A,W
078C: MOVWF 45
078D: MOVF 79,W
078E: MOVWF 44
078F: MOVF 78,W
0790: MOVWF 43
0791: MOVF 77,W
0792: MOVWF 42
0793: CLRF 49
0794: CLRF 48
0795: CLRF 47
0796: MOVLW 77
0797: MOVWF 46
0798: CALL 3B1
....................
.................... }
0799: BSF 0A.3
079A: BCF 0A.4
079B: GOTO 3A1 (RETURN)
....................
....................
....................
.................... #include "./HMC5883L.h"
.................... // i2c slave addresses
.................... #define HMC5883L_WRT_ADDR 0x3C
.................... #define HMC5883L_READ_ADDR 0x3D
....................
.................... // Register addresses
.................... #define HMC5883L_CFG_A_REG 0x00
.................... #define HMC5883L_CFG_B_REG 0x01
.................... #define HMC5883L_MODE_REG 0x02
.................... #define HMC5883L_X_MSB_REG 0x03
....................
.................... //Konstanty nastavujici rozsah
.................... //pro void set_mag_roz (unsigned int8 h)
.................... #define MAG_ROZ088 0x00
.................... #define MAG_ROZ130 0x20
.................... #define MAG_ROZ190 0x40
.................... #define MAG_ROZ250 0x60
.................... #define MAG_ROZ400 0x80
.................... #define MAG_ROZ470 0xA0
.................... #define MAG_ROZ560 0xC0
.................... #define MAG_ROZ810 0xE0
....................
....................
.................... #include "HMC5883L.c"
.................... //------------------------------
.................... // Low level routines
.................... //------------------------------
.................... void hmc5883l_write_reg(int8 reg, int8 data)
.................... {
.................... i2c_start();
*
00C2: BSF 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: NOP
00CD: BCF 03.5
00CE: BCF 07.4
00CF: BCF 20.4
00D0: MOVF 20,W
00D1: BSF 03.5
00D2: MOVWF 07
00D3: NOP
00D4: BCF 03.5
00D5: BCF 07.3
00D6: BCF 20.3
00D7: MOVF 20,W
00D8: BSF 03.5
00D9: MOVWF 07
.................... i2c_write(HMC5883L_WRT_ADDR);
00DA: MOVLW 3C
00DB: BCF 03.5
00DC: MOVWF 3B
00DD: CALL 078
.................... i2c_write(reg);
00DE: MOVF 35,W
00DF: MOVWF 3B
00E0: CALL 078
.................... i2c_write(data);
00E1: MOVF 36,W
00E2: MOVWF 3B
00E3: CALL 078
.................... i2c_stop();
00E4: BCF 20.4
00E5: MOVF 20,W
00E6: BSF 03.5
00E7: MOVWF 07
00E8: NOP
00E9: BCF 03.5
00EA: BSF 20.3
00EB: MOVF 20,W
00EC: BSF 03.5
00ED: MOVWF 07
00EE: BCF 03.5
00EF: BTFSS 07.3
00F0: GOTO 0EF
00F1: NOP
00F2: GOTO 0F3
00F3: NOP
00F4: BSF 20.4
00F5: MOVF 20,W
00F6: BSF 03.5
00F7: MOVWF 07
00F8: NOP
.................... }
00F9: BCF 03.5
00FA: RETURN
....................
.................... //------------------------------
.................... int8 hmc5883l_read_reg(int8 reg)
.................... {
.................... int8 retval;
....................
.................... i2c_start();
.................... i2c_write(HMC5883L_WRT_ADDR);
.................... i2c_write(reg);
.................... i2c_start();
.................... i2c_write(HMC5883L_READ_ADDR);
.................... retval = i2c_read(0);
.................... i2c_stop();
....................
.................... return(retval);
.................... }
....................
.................... //------------------------------
.................... typedef struct
.................... {
.................... signed int16 x;
.................... signed int16 y;
.................... signed int16 z;
.................... }hmc5883l_result;
....................
.................... // This global structure holds the values read
.................... // from the HMC5883L x,y,z registers.
.................... hmc5883l_result compass = {0,0,0};
*
0ADB: CLRF 21
0ADC: CLRF 22
0ADD: CLRF 23
0ADE: CLRF 24
0ADF: CLRF 25
0AE0: CLRF 26
....................
.................... //------------------------------
.................... void hmc5883l_read_data(void)
.................... {
.................... unsigned int8 x_lsb;
.................... unsigned int8 x_msb;
....................
.................... unsigned int8 y_lsb;
.................... unsigned int8 y_msb;
....................
.................... unsigned int8 z_lsb;
.................... unsigned int8 z_msb;
....................
.................... i2c_start();
*
0800: BSF 20.4
0801: MOVF 20,W
0802: BSF 03.5
0803: MOVWF 07
0804: NOP
0805: BCF 03.5
0806: BSF 20.3
0807: MOVF 20,W
0808: BSF 03.5
0809: MOVWF 07
080A: NOP
080B: BCF 03.5
080C: BCF 07.4
080D: BCF 20.4
080E: MOVF 20,W
080F: BSF 03.5
0810: MOVWF 07
0811: NOP
0812: BCF 03.5
0813: BCF 07.3
0814: BCF 20.3
0815: MOVF 20,W
0816: BSF 03.5
0817: MOVWF 07
.................... i2c_write(HMC5883L_WRT_ADDR);
0818: MOVLW 3C
0819: BCF 03.5
081A: MOVWF 3B
081B: BCF 0A.3
081C: CALL 078
081D: BSF 0A.3
.................... i2c_write(HMC5883L_X_MSB_REG); // Point to X-msb register
081E: MOVLW 03
081F: MOVWF 3B
0820: BCF 0A.3
0821: CALL 078
0822: BSF 0A.3
.................... i2c_start();
0823: BSF 20.4
0824: MOVF 20,W
0825: BSF 03.5
0826: MOVWF 07
0827: NOP
0828: BCF 03.5
0829: BSF 20.3
082A: MOVF 20,W
082B: BSF 03.5
082C: MOVWF 07
082D: NOP
082E: BCF 03.5
082F: BTFSS 07.3
0830: GOTO 02F
0831: BCF 07.4
0832: BCF 20.4
0833: MOVF 20,W
0834: BSF 03.5
0835: MOVWF 07
0836: NOP
0837: BCF 03.5
0838: BCF 07.3
0839: BCF 20.3
083A: MOVF 20,W
083B: BSF 03.5
083C: MOVWF 07
.................... i2c_write(HMC5883L_READ_ADDR);
083D: MOVLW 3D
083E: BCF 03.5
083F: MOVWF 3B
0840: BCF 0A.3
0841: CALL 078
0842: BSF 0A.3
....................
.................... x_msb = i2c_read();
0843: MOVLW 01
0844: MOVWF 77
0845: BCF 0A.3
0846: CALL 285
0847: BSF 0A.3
0848: MOVF 78,W
0849: MOVWF 36
.................... x_lsb = i2c_read();
084A: MOVLW 01
084B: MOVWF 77
084C: BCF 0A.3
084D: CALL 285
084E: BSF 0A.3
084F: MOVF 78,W
0850: MOVWF 35
....................
.................... z_msb = i2c_read();
0851: MOVLW 01
0852: MOVWF 77
0853: BCF 0A.3
0854: CALL 285
0855: BSF 0A.3
0856: MOVF 78,W
0857: MOVWF 3A
.................... z_lsb = i2c_read();
0858: MOVLW 01
0859: MOVWF 77
085A: BCF 0A.3
085B: CALL 285
085C: BSF 0A.3
085D: MOVF 78,W
085E: MOVWF 39
....................
.................... y_msb = i2c_read();
085F: MOVLW 01
0860: MOVWF 77
0861: BCF 0A.3
0862: CALL 285
0863: BSF 0A.3
0864: MOVF 78,W
0865: MOVWF 38
.................... y_lsb = i2c_read(0); // do a NACK on last read
0866: CLRF 77
0867: BCF 0A.3
0868: CALL 285
0869: BSF 0A.3
086A: MOVF 78,W
086B: MOVWF 37
....................
.................... i2c_stop();
086C: BCF 20.4
086D: MOVF 20,W
086E: BSF 03.5
086F: MOVWF 07
0870: NOP
0871: BCF 03.5
0872: BSF 20.3
0873: MOVF 20,W
0874: BSF 03.5
0875: MOVWF 07
0876: BCF 03.5
0877: BTFSS 07.3
0878: GOTO 077
0879: NOP
087A: GOTO 07B
087B: NOP
087C: BSF 20.4
087D: MOVF 20,W
087E: BSF 03.5
087F: MOVWF 07
0880: NOP
....................
.................... // Combine high and low bytes into 16-bit values.
.................... compass.x = make16(x_msb, x_lsb);
0881: BCF 03.5
0882: MOVF 36,W
0883: MOVWF 22
0884: MOVF 35,W
0885: MOVWF 21
.................... compass.y = make16(y_msb, y_lsb);
0886: MOVF 38,W
0887: MOVWF 24
0888: MOVF 37,W
0889: MOVWF 23
.................... compass.z = make16(z_msb, z_lsb);
088A: MOVF 3A,W
088B: MOVWF 26
088C: MOVF 39,W
088D: MOVWF 25
.................... }
088E: BSF 0A.3
088F: BCF 0A.4
0890: GOTO 3AB (RETURN)
....................
....................
....................
....................
.................... #include <math.h>
.................... ////////////////////////////////////////////////////////////////////////////
.................... //// (C) Copyright 1996,2008 Custom Computer Services ////
.................... //// This source code may only be used by licensed users of the CCS C ////
.................... //// compiler. This source code may only be distributed to other ////
.................... //// licensed users of the CCS C compiler. No other use, reproduction ////
.................... //// or distribution is permitted without written permission. ////
.................... //// Derivative programs created using this software in object code ////
.................... //// form are not restricted in any way. ////
.................... ////////////////////////////////////////////////////////////////////////////
.................... //// ////
.................... //// History: ////
.................... //// * 9/20/2001 : Improvments are made to sin/cos code. ////
.................... //// The code now is small, much faster, ////
.................... //// and more accurate. ////
.................... //// * 2/21/2007 : Compiler handles & operator differently and does
.................... //// not return generic (int8 *) so type cast is done ////
.................... //// ////
.................... ////////////////////////////////////////////////////////////////////////////
....................
.................... #ifndef MATH_H
.................... #define MATH_H
....................
.................... #ifdef PI
.................... #undef PI
.................... #endif
.................... #define PI 3.1415926535897932
....................
....................
.................... #define SQRT2 1.4142135623730950
....................
.................... //float const ps[4] = {5.9304945, 21.125224, 8.9403076, 0.29730279};
.................... //float const qs[4] = {1.0000000, 15.035723, 17.764134, 2.4934718};
....................
.................... ///////////////////////////// Round Functions //////////////////////////////
....................
.................... float32 CEIL_FLOOR(float32 x, unsigned int8 n)
.................... {
.................... float32 y, res;
.................... unsigned int16 l;
.................... int1 s;
....................
.................... s = 0;
.................... y = x;
....................
.................... if (x < 0)
.................... {
.................... s = 1;
.................... y = -y;
.................... }
....................
.................... if (y <= 32768.0)
.................... res = (float32)(unsigned int16)y;
....................
.................... else if (y < 10000000.0)
.................... {
.................... l = (unsigned int16)(y/32768.0);
.................... y = 32768.0*(y/32768.0 - (float32)l);
.................... res = 32768.0*(float32)l;
.................... res += (float32)(unsigned int16)y;
.................... }
....................
.................... else
.................... res = y;
....................
.................... y = y - (float32)(unsigned int16)y;
....................
.................... if (s)
.................... res = -res;
....................
.................... if (y != 0)
.................... {
.................... if (s == 1 && n == 0)
.................... res -= 1.0;
....................
.................... if (s == 0 && n == 1)
.................... res += 1.0;
.................... }
.................... if (x == 0)
.................... res = 0;
....................
.................... return (res);
.................... }
....................
.................... // Overloaded Functions to take care for new Data types in PCD
.................... // Overloaded function CEIL_FLOOR() for data type - Float48
.................... #if defined(__PCD__)
.................... float48 CEIL_FLOOR(float48 x, unsigned int8 n)
.................... {
.................... float48 y, res;
.................... unsigned int16 l;
.................... int1 s;
....................
.................... s = 0;
.................... y = x;
....................
.................... if (x < 0)
.................... {
.................... s = 1;
.................... y = -y;
.................... }
....................
.................... if (y <= 32768.0)
.................... res = (float48)(unsigned int16)y;
....................
.................... else if (y < 10000000.0)
.................... {
.................... l = (unsigned int16)(y/32768.0);
.................... y = 32768.0*(y/32768.0 - (float48)l);
.................... res = 32768.0*(float32)l;
.................... res += (float48)(unsigned int16)y;
.................... }
....................
.................... else
.................... res = y;
....................
.................... y = y - (float48)(unsigned int16)y;
....................
.................... if (s)
.................... res = -res;
....................
.................... if (y != 0)
.................... {
.................... if (s == 1 && n == 0)
.................... res -= 1.0;
....................
.................... if (s == 0 && n == 1)
.................... res += 1.0;
.................... }
.................... if (x == 0)
.................... res = 0;
....................
.................... return (res);
.................... }
....................
....................
.................... // Overloaded function CEIL_FLOOR() for data type - Float64
.................... float64 CEIL_FLOOR(float64 x, unsigned int8 n)
.................... {
.................... float64 y, res;
.................... unsigned int16 l;
.................... int1 s;
....................
.................... s = 0;
.................... y = x;
....................
.................... if (x < 0)
.................... {
.................... s = 1;
.................... y = -y;
.................... }
....................
.................... if (y <= 32768.0)
.................... res = (float64)(unsigned int16)y;
....................
.................... else if (y < 10000000.0)
.................... {
.................... l = (unsigned int16)(y/32768.0);
.................... y = 32768.0*(y/32768.0 - (float64)l);
.................... res = 32768.0*(float64)l;
.................... res += (float64)(unsigned int16)y;
.................... }
....................
.................... else
.................... res = y;
....................
.................... y = y - (float64)(unsigned int16)y;
....................
.................... if (s)
.................... res = -res;
....................
.................... if (y != 0)
.................... {
.................... if (s == 1 && n == 0)
.................... res -= 1.0;
....................
.................... if (s == 0 && n == 1)
.................... res += 1.0;
.................... }
.................... if (x == 0)
.................... res = 0;
....................
.................... return (res);
.................... }
.................... #endif
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float floor(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : rounds down the number x.
.................... // Date : N/A
.................... //
.................... float32 floor(float32 x)
.................... {
.................... return CEIL_FLOOR(x, 0);
.................... }
.................... // Following 2 functions are overloaded functions of floor() for PCD
.................... // Overloaded function floor() for data type - Float48
.................... #if defined(__PCD__)
.................... float48 floor(float48 x)
.................... {
.................... return CEIL_FLOOR(x, 0);
.................... }
....................
.................... // Overloaded function floor() for data type - Float64
.................... float64 floor(float64 x)
.................... {
.................... return CEIL_FLOOR(x, 0);
.................... }
.................... #endif
....................
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float ceil(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : rounds up the number x.
.................... // Date : N/A
.................... //
.................... float32 ceil(float32 x)
.................... {
.................... return CEIL_FLOOR(x, 1);
.................... }
.................... // Following 2 functions are overloaded functions of ceil() for PCD
.................... // Overloaded function ceil() for data type - Float48
.................... #if defined(__PCD__)
.................... float48 ceil(float48 x)
.................... {
.................... return CEIL_FLOOR(x, 1);
.................... }
....................
.................... // Overloaded function ceil() for data type - Float64
.................... float64 ceil(float64 x)
.................... {
.................... return CEIL_FLOOR(x, 1);
.................... }
.................... #endif
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float fabs(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : Computes the absolute value of floating point number x
.................... // Returns : returns the absolute value of x
.................... // Date : N/A
.................... //
.................... #define fabs abs
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float fmod(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : Computes the floating point remainder of x/y
.................... // Returns : returns the value of x= i*y, for some integer i such that, if y
.................... // is non zero, the result has the same isgn of x na dmagnitude less than the
.................... // magnitude of y. If y is zero then a domain error occurs.
.................... // Date : N/A
.................... //
....................
.................... float fmod(float32 x,float32 y)
.................... {
.................... float32 i;
.................... if (y!=0.0)
.................... {
.................... i=(x/y < 0.0)? ceil(x/y): floor(x/y);
.................... return(x-(i*y));
.................... }
.................... else
.................... {
.................... #ifdef _ERRNO
.................... {
.................... errno=EDOM;
.................... }
.................... #endif
.................... }
.................... }
.................... //Overloaded function for fmod() for PCD
.................... // Overloaded function fmod() for data type - Float48
.................... #if defined(__PCD__)
.................... float48 fmod(float48 x,float48 y)
.................... {
.................... float48 i;
.................... if (y!=0.0)
.................... {
.................... i=(x/y < 0.0)? ceil(x/y): floor(x/y);
.................... return(x-(i*y));
.................... }
.................... else
.................... {
.................... #ifdef _ERRNO
.................... {
.................... errno=EDOM;
.................... }
.................... #endif
.................... }
.................... }
.................... // Overloaded function fmod() for data type - Float64
.................... float64 fmod(float64 x,float64 y)
.................... {
.................... float64 i;
.................... if (y!=0.0)
.................... {
.................... i=(x/y < 0.0)? ceil(x/y): floor(x/y);
.................... return(x-(i*y));
.................... }
.................... else
.................... {
.................... #ifdef _ERRNO
.................... {
.................... errno=EDOM;
.................... }
.................... #endif
.................... }
.................... }
.................... #endif
.................... //////////////////// Exponential and logarithmic functions ////////////////////
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float exp(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : returns the value (e^x)
.................... // Date : N/A
.................... //
.................... #define LN2 0.6931471805599453
....................
.................... float const pe[6] = {0.000207455774, 0.00127100575, 0.00965065093,
.................... 0.0554965651, 0.240227138, 0.693147172};
....................
....................
.................... float32 exp(float32 x)
.................... {
.................... float32 y, res, r;
.................... #if defined(__PCD__)
.................... int8 data1;
.................... #endif
.................... signed int8 n;
.................... int1 s;
.................... #ifdef _ERRNO
.................... if(x > 88.722838)
.................... {
.................... errno=ERANGE;
.................... return(0);
.................... }
.................... #endif
.................... n = (signed int16)(x/LN2);
.................... s = 0;
.................... y = x;
....................
.................... if (x < 0)
.................... {
.................... s = 1;
.................... n = -n;
.................... y = -y;
.................... }
....................
.................... res = 0.0;
.................... #if !defined(__PCD__)
.................... *((unsigned int8 *)(&res)) = n + 0x7F;
.................... #endif
....................
.................... #if defined(__PCD__) // Takes care of IEEE format for PCD
.................... data1 = n+0x7F;
.................... if(bit_test(data1,0))
.................... bit_set(*(((unsigned int8 *)(&res)+2)),7);
.................... rotate_right(&data1,1);
.................... bit_clear(data1,7);
.................... *(((unsigned int8 *)(&res)+3)) = data1;
.................... #endif
....................
.................... y = y/LN2 - (float32)n;
....................
.................... r = pe[0]*y + pe[1];
.................... r = r*y + pe[2];
.................... r = r*y + pe[3];
.................... r = r*y + pe[4];
.................... r = r*y + pe[5];
....................
.................... res = res*(1.0 + y*r);
....................
.................... if (s)
.................... res = 1.0/res;
.................... return(res);
.................... }
....................
....................
.................... //Overloaded function for exp() for PCD
.................... // Overloaded function exp() for data type - Float48
.................... #if defined(__PCD__)
.................... float48 exp(float48 x)
.................... {
.................... float48 y, res, r;
.................... int8 data1;
.................... signed int8 n;
.................... int1 s;
.................... #ifdef _ERRNO
.................... if(x > 88.722838)
.................... {
.................... errno=ERANGE;
.................... return(0);
.................... }
.................... #endif
.................... n = (signed int16)(x/LN2);
.................... s = 0;
.................... y = x;
....................
.................... if (x < 0)
.................... {
.................... s = 1;
.................... n = -n;
.................... y = -y;
.................... }
....................
.................... res = 0.0;
....................
.................... data1 = n+0x7F;
.................... if(bit_test(data1,0))
.................... bit_set(*(((unsigned int8 *)(&res)+4)),7);
.................... rotate_right(&data1,1);
.................... bit_clear(data1,7);
.................... *(((unsigned int8 *)(&res)+5)) = data1;
....................
.................... y = y/LN2 - (float48)n;
....................
.................... r = pe[0]*y + pe[1];
.................... r = r*y + pe[2];
.................... r = r*y + pe[3];
.................... r = r*y + pe[4];
.................... r = r*y + pe[5];
....................
.................... res = res*(1.0 + y*r);
....................
.................... if (s)
.................... res = 1.0/res;
.................... return(res);
.................... }
....................
.................... // Overloaded function exp() for data type - Float64
.................... float64 exp(float64 x)
.................... {
.................... float64 y, res, r;
.................... unsigned int16 data1, data2;
.................... unsigned int16 *p;
.................... signed int16 n;
.................... int1 s;
.................... #ifdef _ERRNO
.................... if(x > 709.7827128)
.................... {
.................... errno=ERANGE;
.................... return(0);
.................... }
.................... #endif
.................... n = (signed int16)(x/LN2);
.................... s = 0;
.................... y = x;
....................
.................... if (x < 0)
.................... {
.................... s = 1;
.................... n = -n;
.................... y = -y;
.................... }
....................
.................... res = 0.0;
....................
.................... #if !defined(__PCD__)
.................... *((unsigned int16 *)(&res)) = n + 0x7F;
.................... #endif
.................... p= (((unsigned int16 *)(&res))+3);
.................... data1 = *p;
.................... data2 = *p;
.................... data1 = n + 0x3FF;
.................... data1 = data1 <<4;
.................... if(bit_test(data2,15))
.................... bit_set(data1,15);
.................... data2 = data2 & 0x000F;
.................... data1 ^= data2;
....................
.................... *(((unsigned int16 *)(&res)+3)) = data1;
....................
....................
.................... y = y/LN2 - (float64)n;
....................
.................... r = pe[0]*y + pe[1];
.................... r = r*y + pe[2];
.................... r = r*y + pe[3];
.................... r = r*y + pe[4];
.................... r = r*y + pe[5];
....................
.................... res = res*(1.0 + y*r);
....................
.................... if (s)
.................... res = 1.0/res;
.................... return(res);
.................... }
....................
.................... #ENDIF
....................
....................
.................... /************************************************************/
....................
.................... float32 const pl[4] = {0.45145214, -9.0558803, 26.940971, -19.860189};
.................... float32 const ql[4] = {1.0000000, -8.1354259, 16.780517, -9.9300943};
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float log(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : returns the the natural log of x
.................... // Date : N/A
.................... //
.................... float32 log(float32 x)
.................... {
.................... float32 y, res, r, y2;
.................... #if defined(__PCD__)
.................... unsigned int8 data1,data2;
.................... #endif
.................... signed int8 n;
.................... #ifdef _ERRNO
.................... if(x <0)
.................... {
.................... errno=EDOM;
.................... }
.................... if(x ==0)
.................... {
.................... errno=ERANGE;
.................... return(0);
.................... }
.................... #endif
.................... y = x;
....................
.................... if (y != 1.0)
.................... {
.................... #if !defined(__PCD__)
.................... *((unsigned int8 *)(&y)) = 0x7E;
.................... #endif
....................
.................... #if defined(__PCD__) // Takes care of IEEE format
.................... data2 = *(((unsigned int8 *)(&y))+3);
.................... *(((unsigned int8 *)(&y))+3) = 0x3F;
.................... data1 = *(((unsigned int8 *)(&y))+2);
.................... bit_clear(data1,7);
.................... *(((unsigned int8 *)(&y))+2) = data1;
.................... if(bit_test(data2,7))
.................... bit_set(*(((unsigned int8 *)(&y))+3),7);
.................... #endif
....................
.................... y = (y - 1.0)/(y + 1.0);
....................
.................... y2=y*y;
....................
.................... res = pl[0]*y2 + pl[1];
.................... res = res*y2 + pl[2];
.................... res = res*y2 + pl[3];
....................
.................... r = ql[0]*y2 + ql[1];
.................... r = r*y2 + ql[2];
.................... r = r*y2 + ql[3];
....................
.................... res = y*res/r;
.................... #if !defined(__PCD__)
.................... n = *((unsigned int8 *)(&x)) - 0x7E;
.................... #endif
.................... #if defined(__PCD__)
.................... data1 = *(((unsigned int8 *)(&x)+3));
.................... rotate_left(&data1,1);
.................... data2 = *(((unsigned int8 *)(&x)+2));
.................... if(bit_test (data2,7))
.................... bit_set(data1,0);
.................... n = data1 - 0x7E;
.................... #endif
....................
.................... if (n<0)
.................... r = -(float32)-n;
.................... else
.................... r = (float32)n;
....................
.................... res += r*LN2;
.................... }
....................
.................... else
.................... res = 0.0;
....................
.................... return(res);
.................... }
....................
.................... //Overloaded function for log() for PCD
.................... // Overloaded function log() for data type - Float48
.................... #if defined(__PCD__)
.................... float48 log(float48 x)
.................... {
.................... float48 y, res, r, y2;
.................... unsigned int8 data1,data2;
.................... signed int8 n;
.................... #ifdef _ERRNO
.................... if(x <0)
.................... {
.................... errno=EDOM;
.................... }
.................... if(x ==0)
.................... {
.................... errno=ERANGE;
.................... return(0);
.................... }
.................... #endif
.................... y = x;
....................
.................... if (y != 1.0)
.................... {
....................
.................... #if !defined(__PCD__)
.................... *((unsigned int8 *)(&y)) = 0x7E;
.................... #endif
.................... data2 = *(((unsigned int8 *)(&y))+5);
.................... *(((unsigned int8 *)(&y))+5) = 0x3F;
.................... data1 = *(((unsigned int8 *)(&y))+4);
.................... bit_clear(data1,7);
.................... *(((unsigned int8 *)(&y))+4) = data1;
....................
.................... if(bit_test(data2,7))
.................... bit_set(*(((unsigned int8 *)(&y))+4),7);
.................... y = (y - 1.0)/(y + 1.0);
....................
.................... y2=y*y;
....................
.................... res = pl[0]*y2 + pl[1];
.................... res = res*y2 + pl[2];
.................... res = res*y2 + pl[3];
....................
.................... r = ql[0]*y2 + ql[1];
.................... r = r*y2 + ql[2];
.................... r = r*y2 + ql[3];
....................
.................... res = y*res/r;
....................
.................... data1 = *(((unsigned int8 *)(&x)+5));
.................... rotate_left(&data1,1);
.................... data2 = *(((unsigned int8 *)(&x)+4));
.................... if(bit_test (data2,7))
.................... bit_set(data1,0);
....................
.................... n = data1 - 0x7E;
....................
.................... if (n<0)
.................... r = -(float48)-n;
.................... else
.................... r = (float48)n;
....................
.................... res += r*LN2;
.................... }
....................
.................... else
.................... res = 0.0;
....................
.................... return(res);
.................... }
....................
.................... // Overloaded function log() for data type - Float48
.................... #if defined(__PCD__)
.................... float32 const pl_64[4] = {0.45145214, -9.0558803, 26.940971, -19.860189};
.................... float32 const ql_64[4] = {1.0000000, -8.1354259, 16.780517, -9.9300943};
.................... #endif
.................... float64 log(float64 x)
.................... {
.................... float64 y, res, r, y2;
.................... unsigned int16 data1,data2;
.................... unsigned int16 *p;
.................... signed int16 n;
.................... #ifdef _ERRNO
.................... if(x <0)
.................... {
.................... errno=EDOM;
.................... }
.................... if(x ==0)
.................... {
.................... errno=ERANGE;
.................... return(0);
.................... }
.................... #endif
.................... y = x;
....................
.................... if (y != 1.0)
.................... {
.................... #if !defined(__PCD__)
.................... *((unsigned int8 *)(&y)) = 0x7E;
.................... #endif
.................... p= (((unsigned int16 *)(&y))+3);
.................... data1 = *p;
.................... data2 = *p;
.................... data1 = 0x3FE;
.................... data1 = data1 <<4;
.................... if(bit_test (data2,15))
.................... bit_set(data1,15);
.................... data2 = data2 & 0x000F;
.................... data1 ^=data2;
....................
.................... *p = data1;
....................
.................... y = (y - 1.0)/(y + 1.0);
....................
.................... y2=y*y;
....................
.................... res = pl_64[0]*y2 + pl_64[1];
.................... res = res*y2 + pl_64[2];
.................... res = res*y2 + pl_64[3];
....................
.................... r = ql_64[0]*y2 + ql_64[1];
.................... r = r*y2 + ql_64[2];
.................... r = r*y2 + ql_64[3];
....................
.................... res = y*res/r;
....................
.................... p= (((unsigned int16 *)(&x))+3);
.................... data1 = *p;
.................... bit_clear(data1,15);
.................... data1 = data1 >>4;
.................... n = data1 - 0x3FE;
....................
....................
.................... if (n<0)
.................... r = -(float64)-n;
.................... else
.................... r = (float64)n;
....................
.................... res += r*LN2;
.................... }
....................
.................... else
.................... res = 0.0;
....................
.................... return(res);
.................... }
.................... #endif
....................
....................
.................... #define LN10 2.3025850929940456
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float log10(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : returns the the log base 10 of x
.................... // Date : N/A
.................... //
.................... float32 log10(float32 x)
.................... {
.................... float32 r;
....................
.................... r = log(x);
.................... r = r/LN10;
.................... return(r);
.................... }
....................
.................... //Overloaded functions for log10() for PCD
.................... // Overloaded function log10() for data type - Float48
.................... #if defined(__PCD__)
.................... float48 log10(float48 x)
.................... {
.................... float48 r;
....................
.................... r = log(x);
.................... r = r/LN10;
.................... return(r);
.................... }
....................
.................... // Overloaded function log10() for data type - Float64
.................... float64 log10(float64 x)
.................... {
.................... float64 r;
....................
.................... r = log(x);
.................... r = r/LN10;
.................... return(r);
.................... }
.................... #endif
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float modf(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description :breaks the argument value int integral and fractional parts,
.................... // ach of which have the same sign as the argument. It stores the integral part
.................... // as a float in the object pointed to by the iptr
.................... // Returns : returns the signed fractional part of value.
.................... // Date : N/A
.................... //
....................
.................... float32 modf(float32 value,float32 *iptr)
.................... {
.................... *iptr=(value < 0.0)? ceil(value): floor(value);
.................... return(value - *iptr);
.................... }
.................... //Overloaded functions for modf() for PCD
.................... // Overloaded function modf() for data type - Float48
.................... #if defined(__PCD__)
.................... float48 modf(float48 value,float48 *iptr)
.................... {
.................... *iptr=(value < 0.0)? ceil(value): floor(value);
.................... return(value - *iptr);
.................... }
.................... // Overloaded function modf() for data type - Float64
.................... float64 modf(float64 value,float64 *iptr)
.................... {
.................... *iptr=(value < 0.0)? ceil(value): floor(value);
.................... return(value - *iptr);
.................... }
.................... #endif
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float pwr(float x,float y)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : returns the value (x^y)
.................... // Date : N/A
.................... // Note : 0 is returned when the function will generate an imaginary number
.................... //
.................... float32 pwr(float32 x,float32 y)
.................... {
.................... if(0 > x && fmod(y, 1) == 0) {
.................... if(fmod(y, 2) == 0) {
.................... return (exp(log(-x) * y));
.................... } else {
.................... return (-exp(log(-x) * y));
.................... }
.................... } else if(0 > x && fmod(y, 1) != 0) {
.................... return 0;
.................... } else {
.................... if(x != 0 || 0 >= y) {
.................... return (exp(log(x) * y));
.................... }
.................... }
.................... }
.................... //Overloaded functions for pwr() for PCD
.................... // Overloaded function pwr() for data type - Float48
.................... #if defined(__PCD__)
.................... float48 pwr(float48 x,float48 y)
.................... {
.................... if(0 > x && fmod(y, 1) == 0) {
.................... if(fmod(y, 2) == 0) {
.................... return (exp(log(-x) * y));
.................... } else {
.................... return (-exp(log(-x) * y));
.................... }
.................... } else if(0 > x && fmod(y, 1) != 0) {
.................... return 0;
.................... } else {
.................... if(x != 0 || 0 >= y) {
.................... return (exp(log(x) * y));
.................... }
.................... }
.................... }
.................... // Overloaded function pwr() for data type - Float64
.................... float64 pwr(float64 x,float64 y)
.................... {
.................... if(0 > x && fmod(y, 1) == 0) {
.................... if(fmod(y, 2) == 0) {
.................... return (exp(log(-x) * y));
.................... } else {
.................... return (-exp(log(-x) * y));
.................... }
.................... } else if(0 > x && fmod(y, 1) != 0) {
.................... return 0;
.................... } else {
.................... if(x != 0 || 0 >= y) {
.................... return (exp(log(x) * y));
.................... }
.................... }
.................... }
.................... #endif
....................
.................... //////////////////// Power functions ////////////////////
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float pow(float x,float y)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : returns the value (x^y)
.................... // Date : N/A
.................... // Note : 0 is returned when the function will generate an imaginary number
.................... //
.................... float32 pow(float32 x,float32 y)
.................... {
.................... if(0 > x && fmod(y, 1) == 0) {
.................... if(fmod(y, 2) == 0) {
.................... return (exp(log(-x) * y));
.................... } else {
.................... return (-exp(log(-x) * y));
.................... }
.................... } else if(0 > x && fmod(y, 1) != 0) {
.................... return 0;
.................... } else {
.................... if(x != 0 || 0 >= y) {
.................... return (exp(log(x) * y));
.................... }
.................... }
.................... }
.................... //Overloaded functions for pow() for PCD
.................... // Overloaded function for pow() data type - Float48
.................... #if defined(__PCD__)
.................... float48 pow(float48 x,float48 y)
.................... {
.................... if(0 > x && fmod(y, 1) == 0) {
.................... if(fmod(y, 2) == 0) {
.................... return (exp(log(-x) * y));
.................... } else {
.................... return (-exp(log(-x) * y));
.................... }
.................... } else if(0 > x && fmod(y, 1) != 0) {
.................... return 0;
.................... } else {
.................... if(x != 0 || 0 >= y) {
.................... return (exp(log(x) * y));
.................... }
.................... }
.................... }
....................
.................... // Overloaded function pow() for data type - Float64
.................... float64 pow(float64 x,float64 y)
.................... {
.................... if(0 > x && fmod(y, 1) == 0) {
.................... if(fmod(y, 2) == 0) {
.................... return (exp(log(-x) * y));
.................... } else {
.................... return (-exp(log(-x) * y));
.................... }
.................... } else if(0 > x && fmod(y, 1) != 0) {
.................... return 0;
.................... } else {
.................... if(x != 0 || 0 >= y) {
.................... return (exp(log(x) * y));
.................... }
.................... }
.................... }
.................... #endif
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float sqrt(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : returns the square root of x
.................... // Date : N/A
.................... //
.................... float32 sqrt(float32 x)
.................... {
.................... float32 y, res;
.................... #if defined(__PCD__)
.................... unsigned int16 data1,data2;
.................... #endif
.................... BYTE *p;
....................
.................... #ifdef _ERRNO
.................... if(x < 0)
.................... {
.................... errno=EDOM;
.................... }
.................... #endif
....................
.................... if( x<=0.0)
.................... return(0.0);
....................
.................... y=x;
....................
.................... #if !defined(__PCD__)
.................... p=&y;
.................... (*p)=(BYTE)((((unsigned int16)(*p)) + 127) >> 1);
.................... #endif
....................
.................... #if defined(__PCD__)
.................... p = (((unsigned int8 *)(&y))+3);
.................... data1 = *(((unsigned int8 *)(&y))+3);
.................... data2 = *(((unsigned int8 *)(&y))+2);
.................... rotate_left(&data1,1);
.................... if(bit_test(data2,7))
.................... bit_set(data1,0);
.................... data1 = ((data1+127) >>1);
.................... bit_clear(data2,7);
.................... if(bit_test(data1,0))
.................... bit_set(data2,7);
.................... data1 = data1 >>1;
.................... *(((unsigned int8 *)(&y))+3) = data1;
.................... *(((unsigned int8 *)(&y))+2) = data2;
....................
.................... #endif
....................
.................... do {
.................... res=y;
.................... y+=(x/y);
....................
.................... #if !defined(__PCD__)
.................... (*p)--;
.................... #endif
....................
.................... #if defined(__PCD__)
.................... data1 = *(((unsigned int8 *)(&y))+3);
.................... data2 = *(((unsigned int8 *)(&y))+2);
.................... rotate_left(&data1,1);
.................... if(bit_test(data2,7))
.................... bit_set(data1,0);
.................... data1--;
.................... bit_clear(data2,7);
.................... if(bit_test(data1,0))
.................... bit_set(data2,7);
.................... data1 = data1 >>1;
.................... *(((unsigned int8 *)(&y))+3) = data1;
.................... *(((unsigned int8 *)(&y))+2) = data2;
....................
.................... #endif
.................... } while(res != y);
....................
.................... return(res);
.................... }
.................... //Overloaded functions for sqrt() for PCD
.................... // Overloaded function sqrt() for data type - Float48
.................... #if defined(__PCD__)
.................... float48 sqrt(float48 x)
.................... {
.................... float48 y, res;
.................... unsigned int16 data1,data2;
.................... BYTE *p;
....................
.................... #ifdef _ERRNO
.................... if(x < 0)
.................... {
.................... errno=EDOM;
.................... }
.................... #endif
....................
.................... if( x<=0.0)
.................... return(0.0);
....................
.................... y=x;
....................
.................... #if !defined(__PCD__)
.................... p=&y;
.................... (*p)=(BYTE)((((unsigned int16)(*p)) + 127) >> 1);
.................... #endif
....................
.................... #if defined(__PCD__)
.................... p = (((unsigned int8 *)(&y))+5);
.................... data1 = *(((unsigned int8 *)(&y))+5);
.................... data2 = *(((unsigned int8 *)(&y))+4);
.................... rotate_left(&data1,1);
.................... if(bit_test(data2,7))
.................... bit_set(data1,0);
.................... data1 = ((data1+127) >>1);
.................... bit_clear(data2,7);
.................... if(bit_test(data1,0))
.................... bit_set(data2,7);
.................... data1 = data1 >>1;
.................... *(((unsigned int8 *)(&y))+5) = data1;
.................... *(((unsigned int8 *)(&y))+4) = data2;
....................
.................... #endif
....................
.................... do {
.................... res=y;
.................... y+=(x/y);
....................
.................... #if !defined(__PCD__)
.................... (*p)--;
.................... #endif
....................
.................... data1 = *(((unsigned int8 *)(&y))+5);
.................... data2 = *(((unsigned int8 *)(&y))+4);
.................... rotate_left(&data1,1);
.................... if(bit_test(data2,7))
.................... bit_set(data1,0);
.................... data1--;
.................... bit_clear(data2,7);
.................... if(bit_test(data1,0))
.................... bit_set(data2,7);
.................... data1 = data1 >>1;
.................... *(((unsigned int8 *)(&y))+5) = data1;
.................... *(((unsigned int8 *)(&y))+4) = data2;
....................
.................... } while(res != y);
....................
.................... return(res);
.................... }
....................
.................... // Overloaded function sqrt() for data type - Float64
.................... float64 sqrt(float64 x)
.................... {
.................... float64 y, res;
.................... unsigned int16 *p;
.................... unsigned int16 temp1,temp2;
....................
.................... #ifdef _ERRNO
.................... if(x < 0)
.................... {
.................... errno=EDOM;
.................... }
.................... #endif
....................
.................... if( x<=0.0)
.................... return(0.0);
....................
.................... y=x;
.................... p= (((unsigned int16 *)(&y))+3);
.................... temp1 = *p;
.................... temp2 = *p;
.................... bit_clear(temp1,15);
.................... temp1 = (temp1>>4)+1023;
.................... temp1 = temp1 >> 1;
.................... temp1 = (temp1<<4) & 0xFFF0;
.................... if(bit_test(temp2,15))
.................... bit_set(temp1,15);
.................... temp2 = temp2 & 0x000F;
.................... temp1 ^= temp2;
....................
.................... (*p) = temp1;
....................
.................... do {
.................... res=y;
.................... y+=(x/y);
.................... temp1 = *p;
.................... temp2 = *p;
.................... bit_clear(temp1,15);
.................... temp1 = (temp1>>4);
.................... temp1--;
.................... temp1 = (temp1<<4) & 0xFFF0;
.................... if(bit_test(temp2,15))
.................... bit_set(temp1,15);
.................... temp2 = temp2 & 0x000F;
.................... temp1 ^= temp2;
.................... (*p) = temp1;
....................
.................... } while(res != y);
....................
.................... return(res);
.................... }
.................... #endif
....................
.................... ////////////////////////////// Trig Functions //////////////////////////////
.................... #ifdef PI_DIV_BY_TWO
.................... #undef PI_DIV_BY_TWO
.................... #endif
.................... #define PI_DIV_BY_TWO 1.5707963267948966
.................... #ifdef TWOBYPI
.................... #undef TWOBYPI
.................... #define TWOBYPI 0.6366197723675813
.................... #endif
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float cos(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : returns the cosine value of the angle x, which is in radian
.................... // Date : 9/20/2001
.................... //
.................... float32 cos(float32 x)
.................... {
.................... float32 y, t, t2 = 1.0;
.................... unsigned int8 quad, i;
.................... float32 frac;
.................... float32 p[6] = { //by the series definition for cosine
.................... -0.5, // sum ( ( (-1)^n * x^2n )/(2n)! )
.................... 0.04166666666667,
.................... -0.00138888888889,
.................... 0.00002480158730,
.................... -0.00000027557319,
.................... 0.00000000208767,
.................... //-0.00000000001147,
.................... // 0.00000000000005
.................... };
....................
.................... if (x < 0) x = -x; // absolute value of input
....................
.................... quad = (unsigned int8)(x / PI_DIV_BY_TWO); // quadrant
.................... frac = (x / PI_DIV_BY_TWO) - quad; // fractional part of input
.................... quad = quad % 4; // quadrant (0 to 3)
....................
.................... if (quad == 0 || quad == 2)
.................... t = frac * PI_DIV_BY_TWO;
.................... else if (quad == 1)
.................... t = (1-frac) * PI_DIV_BY_TWO;
.................... else // should be 3
.................... t = (frac-1) * PI_DIV_BY_TWO;
....................
.................... y = 1.0;
.................... t = t * t;
.................... for (i = 0; i <= 5; i++)
.................... {
.................... t2 = t2 * t;
.................... y = y + p[i] * t2;
.................... }
....................
.................... if (quad == 2 || quad == 1)
.................... y = -y; // correct sign
....................
.................... return (y);
.................... }
....................
....................
.................... //Overloaded functions for cos() for PCD
.................... // Overloaded function cos() for data type - Float48
.................... #if defined(__PCD__)
.................... float48 cos(float48 x)
.................... {
.................... float48 y, t, t2 = 1.0;
.................... unsigned int8 quad, i;
.................... float48 frac;
.................... float48 p[6] = { //by the series definition for cosine
.................... -0.5, // sum ( ( (-1)^n * x^2n )/(2n)! )
.................... 0.04166666666667,
.................... -0.00138888888889,
.................... 0.00002480158730,
.................... -0.00000027557319,
.................... 0.00000000208767,
.................... //-0.00000000001147,
.................... // 0.00000000000005
.................... };
....................
.................... if (x < 0) x = -x; // absolute value of input
....................
.................... quad = (unsigned int8)(x / PI_DIV_BY_TWO); // quadrant
.................... frac = (x / PI_DIV_BY_TWO) - quad; // fractional part of input
.................... quad = quad % 4; // quadrant (0 to 3)
....................
.................... if (quad == 0 || quad == 2)
.................... t = frac * PI_DIV_BY_TWO;
.................... else if (quad == 1)
.................... t = (1-frac) * PI_DIV_BY_TWO;
.................... else // should be 3
.................... t = (frac-1) * PI_DIV_BY_TWO;
....................
.................... y = 0.999999999781;
.................... t = t * t;
.................... for (i = 0; i <= 5; i++)
.................... {
.................... t2 = t2 * t;
.................... y = y + p[i] * t2;
.................... }
....................
.................... if (quad == 2 || quad == 1)
.................... y = -y; // correct sign
....................
.................... return (y);
.................... }
....................
.................... // Overloaded function cos() for data type - Float48
.................... float64 cos(float64 x)
.................... {
.................... float64 y, t, t2 = 1.0;
.................... unsigned int8 quad, i;
.................... float64 frac;
.................... float64 p[6] = { //by the series definition for cosine
.................... -0.5, // sum ( ( (-1)^n * x^2n )/(2n)! )
.................... 0.04166666666667,
.................... -0.00138888888889,
.................... 0.00002480158730,
.................... -0.00000027557319,
.................... 0.00000000208767,
.................... //-0.00000000001147,
.................... // 0.00000000000005
.................... };
....................
.................... if (x < 0) x = -x; // absolute value of input
....................
.................... quad = (unsigned int8)(x / PI_DIV_BY_TWO); // quadrant
.................... frac = (x / PI_DIV_BY_TWO) - quad; // fractional part of input
.................... quad = quad % 4; // quadrant (0 to 3)
....................
.................... if (quad == 0 || quad == 2)
.................... t = frac * PI_DIV_BY_TWO;
.................... else if (quad == 1)
.................... t = (1-frac) * PI_DIV_BY_TWO;
.................... else // should be 3
.................... t = (frac-1) * PI_DIV_BY_TWO;
....................
.................... y = 0.999999999781;
.................... t = t * t;
.................... for (i = 0; i <= 5; i++)
.................... {
.................... t2 = t2 * t;
.................... y = y + p[i] * t2;
.................... }
....................
.................... if (quad == 2 || quad == 1)
.................... y = -y; // correct sign
....................
.................... return (y);
.................... }
....................
.................... #endif
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float sin(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : returns the sine value of the angle x, which is in radian
.................... // Date : 9/20/2001
.................... //
.................... float32 sin(float32 x)
.................... {
.................... return cos(x - PI_DIV_BY_TWO);
.................... }
....................
.................... //Overloaded functions for sin() for PCD
.................... // Overloaded function sin() for data type - Float48
.................... #if defined(__PCD__)
.................... float48 sin(float48 x)
.................... {
.................... return cos(x - PI_DIV_BY_TWO);
.................... }
....................
.................... // Overloaded function sin() for data type - Float48
.................... float64 sin(float64 x)
.................... {
.................... return cos(x - PI_DIV_BY_TWO);
.................... }
.................... #endif
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float tan(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : returns the tangent value of the angle x, which is in radian
.................... // Date : 9/20/2001
.................... //
.................... float32 tan(float32 x)
.................... {
.................... float32 c, s;
....................
.................... c = cos(x);
.................... if (c == 0.0)
.................... return (1.0e+36);
....................
.................... s = sin(x);
.................... return(s/c);
.................... }
.................... //Overloaded functions for tan() for PCD
.................... // Overloaded function tan() for data type - Float48
.................... #if defined(__PCD__)
.................... float48 tan(float48 x)
.................... {
.................... float48 c, s;
....................
.................... c = cos(x);
.................... if (c == 0.0)
.................... return (1.0e+36);
....................
.................... s = sin(x);
.................... return(s/c);
.................... }
....................
.................... // Overloaded function tan() for data type - Float48
.................... float64 tan(float64 x)
.................... {
.................... float64 c, s;
....................
.................... c = cos(x);
.................... if (c == 0.0)
.................... return (1.0e+36);
....................
.................... s = sin(x);
.................... return(s/c);
.................... }
.................... #endif
....................
.................... float32 const pas[3] = {0.49559947, -4.6145309, 5.6036290};
.................... float32 const qas[3] = {1.0000000, -5.5484666, 5.6036290};
....................
.................... float32 ASIN_COS(float32 x, unsigned int8 n)
.................... {
.................... float32 y, res, r, y2;
.................... int1 s;
.................... #ifdef _ERRNO
.................... if(x <-1 || x > 1)
.................... {
.................... errno=EDOM;
.................... }
.................... #endif
.................... s = 0;
.................... y = x;
....................
.................... if (x < 0)
.................... {
.................... s = 1;
.................... y = -y;
.................... }
....................
.................... if (y > 0.5)
.................... {
.................... y = sqrt((1.0 - y)/2.0);
.................... n += 2;
.................... }
....................
.................... y2=y*y;
....................
.................... res = pas[0]*y2 + pas[1];
.................... res = res*y2 + pas[2];
....................
.................... r = qas[0]*y2 + qas[1];
.................... r = r*y2 + qas[2];
....................
.................... res = y*res/r;
....................
.................... if (n & 2) // |x| > 0.5
.................... res = PI_DIV_BY_TWO - 2.0*res;
.................... if (s)
.................... res = -res;
.................... if (n & 1) // take arccos
.................... res = PI_DIV_BY_TWO - res;
....................
.................... return(res);
.................... }
....................
.................... //Overloaded functions for ASIN_COS() for PCD
.................... // Overloaded function ASIN_COS() for data type - Float48
.................... #if defined(__PCD__)
.................... float48 ASIN_COS(float48 x, unsigned int8 n)
.................... {
.................... float48 y, res, r, y2;
.................... int1 s;
.................... #ifdef _ERRNO
.................... if(x <-1 || x > 1)
.................... {
.................... errno=EDOM;
.................... }
.................... #endif
.................... s = 0;
.................... y = x;
....................
.................... if (x < 0)
.................... {
.................... s = 1;
.................... y = -y;
.................... }
....................
.................... if (y > 0.5)
.................... {
.................... y = sqrt((1.0 - y)/2.0);
.................... n += 2;
.................... }
....................
.................... y2=y*y;
....................
.................... res = pas[0]*y2 + pas[1];
.................... res = res*y2 + pas[2];
....................
.................... r = qas[0]*y2 + qas[1];
.................... r = r*y2 + qas[2];
....................
.................... res = y*res/r;
....................
.................... if (n & 2) // |x| > 0.5
.................... res = PI_DIV_BY_TWO - 2.0*res;
.................... if (s)
.................... res = -res;
.................... if (n & 1) // take arccos
.................... res = PI_DIV_BY_TWO - res;
....................
.................... return(res);
.................... }
....................
.................... // Overloaded function ASIN_COS() for data type - Float64
.................... float64 ASIN_COS(float64 x, unsigned int8 n)
.................... {
.................... float64 y, res, r, y2;
.................... int1 s;
.................... #ifdef _ERRNO
.................... if(x <-1 || x > 1)
.................... {
.................... errno=EDOM;
.................... }
.................... #endif
.................... s = 0;
.................... y = x;
....................
.................... if (x < 0)
.................... {
.................... s = 1;
.................... y = -y;
.................... }
....................
.................... if (y > 0.5)
.................... {
.................... y = sqrt((1.0 - y)/2.0);
.................... n += 2;
.................... }
....................
.................... y2=y*y;
....................
.................... res = pas[0]*y2 + pas[1];
.................... res = res*y2 + pas[2];
....................
.................... r = qas[0]*y2 + qas[1];
.................... r = r*y2 + qas[2];
....................
.................... res = y*res/r;
....................
.................... if (n & 2) // |x| > 0.5
.................... res = PI_DIV_BY_TWO - 2.0*res;
.................... if (s)
.................... res = -res;
.................... if (n & 1) // take arccos
.................... res = PI_DIV_BY_TWO - res;
....................
.................... return(res);
.................... }
.................... #endif
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float asin(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : returns the arcsine value of the value x.
.................... // Date : N/A
.................... //
.................... float32 asin(float32 x)
.................... {
.................... float32 r;
....................
.................... r = ASIN_COS(x, 0);
.................... return(r);
.................... }
.................... //Overloaded functions for asin() for PCD
.................... // Overloaded function asin() for data type - Float48
.................... #if defined(__PCD__)
.................... float48 asin(float48 x)
.................... {
.................... float48 r;
....................
.................... r = ASIN_COS(x, 0);
.................... return(r);
.................... }
....................
.................... // Overloaded function asin() for data type - Float64
.................... float64 asin(float64 x)
.................... {
.................... float64 r;
....................
.................... r = ASIN_COS(x, 0);
.................... return(r);
.................... }
.................... #endif
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float acos(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : returns the arccosine value of the value x.
.................... // Date : N/A
.................... //
.................... float32 acos(float32 x)
.................... {
.................... float32 r;
....................
.................... r = ASIN_COS(x, 1);
.................... return(r);
.................... }
.................... //Overloaded functions for acos() for PCD
.................... // Overloaded function acos() for data type - Float48
.................... #if defined(__PCD__)
.................... float48 acos(float48 x)
.................... {
.................... float48 r;
....................
.................... r = ASIN_COS(x, 1);
.................... return(r);
.................... }
....................
.................... // Overloaded function acos() for data type - Float64
.................... float64 acos(float64 x)
.................... {
.................... float64 r;
....................
.................... r = ASIN_COS(x, 1);
.................... return(r);
.................... }
.................... #endif
....................
.................... float32 const pat[4] = {0.17630401, 5.6710795, 22.376096, 19.818457};
.................... float32 const qat[4] = {1.0000000, 11.368190, 28.982246, 19.818457};
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float atan(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : returns the arctangent value of the value x.
.................... // Date : N/A
.................... //
.................... float32 atan(float32 x)
.................... {
.................... float32 y, res, r;
.................... int1 s, flag;
....................
.................... s = 0;
.................... flag = 0;
.................... y = x;
....................
.................... if (x < 0)
.................... {
.................... s = 1;
.................... y = -y;
.................... }
....................
.................... if (y > 1.0)
.................... {
.................... y = 1.0/y;
.................... flag = 1;
.................... }
....................
.................... res = pat[0]*y*y + pat[1];
.................... res = res*y*y + pat[2];
.................... res = res*y*y + pat[3];
....................
.................... r = qat[0]*y*y + qat[1];
.................... r = r*y*y + qat[2];
.................... r = r*y*y + qat[3];
....................
.................... res = y*res/r;
....................
....................
.................... if (flag) // for |x| > 1
.................... res = PI_DIV_BY_TWO - res;
.................... if (s)
.................... res = -res;
....................
.................... return(res);
.................... }
.................... //Overloaded functions for atan() for PCD
.................... // Overloaded function atan() for data type - Float48
.................... #if defined(__PCD__)
.................... float48 atan(float48 x)
.................... {
.................... float48 y, res, r;
.................... int1 s, flag;
....................
.................... s = 0;
.................... flag = 0;
.................... y = x;
....................
.................... if (x < 0)
.................... {
.................... s = 1;
.................... y = -y;
.................... }
....................
.................... if (y > 1.0)
.................... {
.................... y = 1.0/y;
.................... flag = 1;
.................... }
....................
.................... res = pat[0]*y*y + pat[1];
.................... res = res*y*y + pat[2];
.................... res = res*y*y + pat[3];
....................
.................... r = qat[0]*y*y + qat[1];
.................... r = r*y*y + qat[2];
.................... r = r*y*y + qat[3];
....................
.................... res = y*res/r;
....................
....................
.................... if (flag) // for |x| > 1
.................... res = PI_DIV_BY_TWO - res;
.................... if (s)
.................... res = -res;
....................
.................... return(res);
.................... }
....................
.................... // Overloaded function atan() for data type - Float64
.................... float64 atan(float64 x)
.................... {
.................... float64 y, res, r;
.................... int1 s, flag;
....................
.................... s = 0;
.................... flag = 0;
.................... y = x;
....................
.................... if (x < 0)
.................... {
.................... s = 1;
.................... y = -y;
.................... }
....................
.................... if (y > 1.0)
.................... {
.................... y = 1.0/y;
.................... flag = 1;
.................... }
....................
.................... res = pat[0]*y*y + pat[1];
.................... res = res*y*y + pat[2];
.................... res = res*y*y + pat[3];
....................
.................... r = qat[0]*y*y + qat[1];
.................... r = r*y*y + qat[2];
.................... r = r*y*y + qat[3];
....................
.................... res = y*res/r;
....................
....................
.................... if (flag) // for |x| > 1
.................... res = PI_DIV_BY_TWO - res;
.................... if (s)
.................... res = -res;
....................
.................... return(res);
.................... }
.................... #endif
....................
.................... /////////////////////////////////////////////////////////////////////////////
.................... // float atan2(float y, float x)
.................... /////////////////////////////////////////////////////////////////////////////
.................... // Description :computes the principal value of arc tangent of y/x, using the
.................... // signs of both the arguments to determine the quadrant of the return value
.................... // Returns : returns the arc tangent of y/x.
.................... // Date : N/A
.................... //
....................
.................... float32 atan2(float32 y,float32 x)
.................... {
.................... float32 z;
.................... int1 sign;
.................... unsigned int8 quad;
.................... sign=0;
.................... quad=0; //quadrant
.................... quad=((y<=0.0)?((x<=0.0)?3:4):((x<0.0)?2:1));
.................... if(y<0.0)
.................... {
.................... sign=1;
.................... y=-y;
.................... }
.................... if(x<0.0)
.................... {
.................... x=-x;
.................... }
.................... if (x==0.0)
.................... {
.................... if(y==0.0)
.................... {
.................... #ifdef _ERRNO
.................... {
.................... errno=EDOM;
.................... }
.................... #endif
.................... }
.................... else
.................... {
.................... if(sign)
.................... {
.................... return (-(PI_DIV_BY_TWO));
.................... }
.................... else
.................... {
.................... return (PI_DIV_BY_TWO);
.................... }
.................... }
.................... }
.................... else
.................... {
.................... z=y/x;
.................... switch(quad)
.................... {
.................... case 1:
.................... {
.................... return atan(z);
.................... break;
.................... }
.................... case 2:
.................... {
.................... // return (atan(z)+PI_DIV_BY_TWO); //2L3122
.................... return (PI-atan(z));
.................... break;
.................... }
.................... case 3:
.................... {
.................... return (atan(z)-PI);
.................... break;
.................... }
.................... case 4:
.................... {
.................... return (-atan(z));
.................... break;
.................... }
.................... }
.................... }
.................... }
....................
.................... //Overloaded functions for atan2() for PCD
.................... // Overloaded function atan2() for data type - Float48
.................... #if defined(__PCD__)
.................... float48 atan2(float48 y,float48 x)
.................... {
.................... float48 z;
.................... int1 sign;
.................... unsigned int8 quad;
.................... sign=0;
.................... quad=0; //quadrant
.................... quad=((y<=0.0)?((x<=0.0)?3:4):((x<0.0)?2:1));
.................... if(y<0.0)
.................... {
.................... sign=1;
.................... y=-y;
.................... }
.................... if(x<0.0)
.................... {
.................... x=-x;
.................... }
.................... if (x==0.0)
.................... {
.................... if(y==0.0)
.................... {
.................... #ifdef _ERRNO
.................... {
.................... errno=EDOM;
.................... }
.................... #endif
.................... }
.................... else
.................... {
.................... if(sign)
.................... {
.................... return (-(PI_DIV_BY_TWO));
.................... }
.................... else
.................... {
.................... return (PI_DIV_BY_TWO);
.................... }
.................... }
.................... }
.................... else
.................... {
.................... z=y/x;
.................... switch(quad)
.................... {
.................... case 1:
.................... {
.................... return atan(z);
.................... break;
.................... }
.................... case 2:
.................... {
.................... // return (atan(z)+PI_DIV_BY_TWO); //2L3122
.................... return (PI-atan(z));
.................... break;
.................... }
.................... case 3:
.................... {
.................... return (atan(z)-PI);
.................... break;
.................... }
.................... case 4:
.................... {
.................... return (-atan(z));
.................... break;
.................... }
.................... }
.................... }
.................... }
....................
.................... // Overloaded function atan2() for data type - Float64
.................... float64 atan2(float64 y,float64 x)
.................... {
.................... float64 z;
.................... int1 sign;
.................... unsigned int8 quad;
.................... sign=0;
.................... quad=0; //quadrant
.................... quad=((y<=0.0)?((x<=0.0)?3:4):((x<0.0)?2:1));
.................... if(y<0.0)
.................... {
.................... sign=1;
.................... y=-y;
.................... }
.................... if(x<0.0)
.................... {
.................... x=-x;
.................... }
.................... if (x==0.0)
.................... {
.................... if(y==0.0)
.................... {
.................... #ifdef _ERRNO
.................... {
.................... errno=EDOM;
.................... }
.................... #endif
.................... }
.................... else
.................... {
.................... if(sign)
.................... {
.................... return (-(PI_DIV_BY_TWO));
.................... }
.................... else
.................... {
.................... return (PI_DIV_BY_TWO);
.................... }
.................... }
.................... }
.................... else
.................... {
.................... z=y/x;
.................... switch(quad)
.................... {
.................... case 1:
.................... {
.................... return atan(z);
.................... break;
.................... }
.................... case 2:
.................... {
.................... // return (atan(z)+PI_DIV_BY_TWO); //2L3122
.................... return (PI-atan(z));
.................... break;
.................... }
.................... case 3:
.................... {
.................... return (atan(z)-PI);
.................... break;
.................... }
.................... case 4:
.................... {
.................... return (-atan(z));
.................... break;
.................... }
.................... }
.................... }
.................... }
.................... #endif
....................
.................... //////////////////// Hyperbolic functions ////////////////////
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float cosh(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : Computes the hyperbolic cosine value of x
.................... // Returns : returns the hyperbolic cosine value of x
.................... // Date : N/A
.................... //
....................
.................... float32 cosh(float32 x)
.................... {
.................... return ((exp(x)+exp(-x))/2);
.................... }
.................... //Overloaded functions for cosh() for PCD
.................... // Overloaded function cosh() for data type - Float48
.................... #if defined(__PCD__)
.................... float48 cosh(float48 x)
.................... {
.................... return ((exp(x)+exp(-x))/2);
.................... }
....................
.................... // Overloaded function cosh() for data type - Float64
.................... float64 cosh(float64 x)
.................... {
.................... return ((exp(x)+exp(-x))/2);
.................... }
.................... #endif
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float sinh(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : Computes the hyperbolic sine value of x
.................... // Returns : returns the hyperbolic sine value of x
.................... // Date : N/A
.................... //
....................
.................... float32 sinh(float32 x)
.................... {
....................
.................... return ((exp(x) - exp(-x))/2);
.................... }
.................... //Overloaded functions for sinh() for PCD
.................... // Overloaded function sinh() for data type - Float48
.................... #if defined(__PCD__)
.................... float48 sinh(float48 x)
.................... {
....................
.................... return ((exp(x) - exp(-x))/2);
.................... }
....................
.................... // Overloaded function sinh() for data type - Float48
.................... float64 sinh(float64 x)
.................... {
....................
.................... return ((exp(x) - exp(-x))/2);
.................... }
.................... #endif
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float tanh(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : Computes the hyperbolic tangent value of x
.................... // Returns : returns the hyperbolic tangent value of x
.................... // Date : N/A
.................... //
....................
.................... float32 tanh(float32 x)
.................... {
.................... return(sinh(x)/cosh(x));
.................... }
.................... //Overloaded functions for tanh() for PCD
.................... // Overloaded function tanh() for data type - Float48
.................... #if defined(__PCD__)
.................... float48 tanh(float48 x)
.................... {
.................... return(sinh(x)/cosh(x));
.................... }
....................
.................... // Overloaded function tanh() for data type - Float64
.................... float64 tanh(float64 x)
.................... {
.................... return(sinh(x)/cosh(x));
.................... }
.................... #endif
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float frexp(float x, signed int *exp)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : breaks a floating point number into a normalized fraction and an integral
.................... // power of 2. It stores the integer in the signed int object pointed to by exp.
.................... // Returns : returns the value x, such that x is a double with magnitude in the interval
.................... // [1/2,1) or zero, and value equals x times 2 raised to the power *exp.If value is zero,
.................... // both parts of the result are zero.
.................... // Date : N/A
.................... //
....................
.................... #define LOG2 .30102999566398119521
.................... float32 frexp(float32 x, signed int8 *exp)
.................... {
.................... float32 res;
.................... int1 sign = 0;
.................... if(x == 0.0)
.................... {
.................... *exp=0;
.................... return (0.0);
.................... }
.................... if(x < 0.0)
.................... {
.................... x=-x;
.................... sign=1;
.................... }
.................... if (x > 1.0)
.................... {
.................... *exp=(ceil(log10(x)/LOG2));
.................... res=x/(pow(2, *exp));
.................... if (res == 1)
.................... {
.................... *exp=*exp+1;
.................... res=.5;
.................... }
.................... }
.................... else
.................... {
.................... if(x < 0.5)
.................... {
.................... *exp=-1;
.................... res=x*2;
.................... }
.................... else
.................... {
.................... *exp=0;
.................... res=x;
.................... }
.................... }
.................... if(sign)
.................... {
.................... res=-res;
.................... }
.................... return res;
.................... }
....................
.................... //Overloaded functions for frexp() for PCD
.................... // Overloaded function frexp() for data type - Float48
.................... #if defined(__PCD__)
.................... float48 frexp(float48 x, signed int8 *exp)
.................... {
.................... float48 res;
.................... int1 sign = 0;
.................... if(x == 0.0)
.................... {
.................... *exp=0;
.................... return (0.0);
.................... }
.................... if(x < 0.0)
.................... {
.................... x=-x;
.................... sign=1;
.................... }
.................... if (x > 1.0)
.................... {
.................... *exp=(ceil(log10(x)/LOG2));
.................... res=x/(pow(2, *exp));
.................... if (res == 1)
.................... {
.................... *exp=*exp+1;
.................... res=.5;
.................... }
.................... }
.................... else
.................... {
.................... if(x < 0.5)
.................... {
.................... *exp=-1;
.................... res=x*2;
.................... }
.................... else
.................... {
.................... *exp=0;
.................... res=x;
.................... }
.................... }
.................... if(sign)
.................... {
.................... res=-res;
.................... }
.................... return res;
.................... }
....................
.................... // Overloaded function frexp() for data type - Float64
.................... float64 frexp(float64 x, signed int8 *exp)
.................... {
.................... float64 res;
.................... int1 sign = 0;
.................... if(x == 0.0)
.................... {
.................... *exp=0;
.................... return (0.0);
.................... }
.................... if(x < 0.0)
.................... {
.................... x=-x;
.................... sign=1;
.................... }
.................... if (x > 1.0)
.................... {
.................... *exp=(ceil(log10(x)/LOG2));
.................... res=x/(pow(2, *exp));
.................... if (res == 1)
.................... {
.................... *exp=*exp+1;
.................... res=.5;
.................... }
.................... }
.................... else
.................... {
.................... if(x < 0.5)
.................... {
.................... *exp=-1;
.................... res=x*2;
.................... }
.................... else
.................... {
.................... *exp=0;
.................... res=x;
.................... }
.................... }
.................... if(sign)
.................... {
.................... res=-res;
.................... }
.................... return res;
.................... }
.................... #endif
....................
.................... //////////////////////////////////////////////////////////////////////////////
.................... // float ldexp(float x, signed int *exp)
.................... //////////////////////////////////////////////////////////////////////////////
.................... // Description : multiplies a floating point number by an integral power of 2.
.................... // Returns : returns the value of x times 2 raised to the power exp.
.................... // Date : N/A
.................... //
....................
.................... float32 ldexp(float32 value, signed int8 exp)
.................... {
.................... return (value * pow(2,exp));
.................... }
.................... //Overloaded functions for ldexp() for PCD
.................... // Overloaded function ldexp() for data type - Float48
....................
.................... #if defined(__PCD__)
.................... float48 ldexp(float48 value, signed int8 exp)
.................... {
.................... return (value * pow(2,exp));
.................... }
.................... // Overloaded function ldexp() for data type - Float64
.................... float64 ldexp(float64 value, signed int8 exp)
.................... {
.................... return (value * pow(2,exp));
.................... }
.................... #endif
....................
.................... #endif
....................
....................
....................
.................... void main()
.................... {
*
0AB7: CLRF 04
0AB8: BCF 03.7
0AB9: MOVLW 1F
0ABA: ANDWF 03,F
0ABB: MOVLW 71
0ABC: BSF 03.5
0ABD: MOVWF 0F
0ABE: MOVF 0F,W
0ABF: BSF 03.6
0AC0: BCF 07.3
0AC1: MOVLW 0C
0AC2: BCF 03.6
0AC3: MOVWF 19
0AC4: MOVLW A2
0AC5: MOVWF 18
0AC6: MOVLW 90
0AC7: BCF 03.5
0AC8: MOVWF 18
0AC9: BSF 03.5
0ACA: BSF 03.6
0ACB: MOVF 09,W
0ACC: ANDLW C0
0ACD: MOVWF 09
0ACE: BCF 03.6
0ACF: BCF 1F.4
0AD0: BCF 1F.5
0AD1: MOVLW 00
0AD2: BSF 03.6
0AD3: MOVWF 08
0AD4: BCF 03.5
0AD5: CLRF 07
0AD6: CLRF 08
0AD7: CLRF 09
*
0AE1: CLRF 34
0AE2: CLRF 33
.................... float temp1, temp2, humidity;
.................... int16 i=0;
....................
.................... setup_adc_ports(NO_ANALOGS|VSS_VDD);
0AE3: BSF 03.5
0AE4: BSF 03.6
0AE5: MOVF 09,W
0AE6: ANDLW C0
0AE7: MOVWF 09
0AE8: BCF 03.6
0AE9: BCF 1F.4
0AEA: BCF 1F.5
0AEB: MOVLW 00
0AEC: BSF 03.6
0AED: MOVWF 08
.................... setup_adc(ADC_CLOCK_DIV_2);
0AEE: BCF 03.5
0AEF: BCF 03.6
0AF0: BCF 1F.6
0AF1: BCF 1F.7
0AF2: BSF 03.5
0AF3: BSF 1F.7
0AF4: BCF 03.5
0AF5: BSF 1F.0
.................... setup_spi(SPI_SS_DISABLED);
0AF6: BCF 14.5
0AF7: BCF 20.5
0AF8: MOVF 20,W
0AF9: BSF 03.5
0AFA: MOVWF 07
0AFB: BCF 03.5
0AFC: BSF 20.4
0AFD: MOVF 20,W
0AFE: BSF 03.5
0AFF: MOVWF 07
0B00: BCF 03.5
0B01: BCF 20.3
0B02: MOVF 20,W
0B03: BSF 03.5
0B04: MOVWF 07
0B05: MOVLW 01
0B06: BCF 03.5
0B07: MOVWF 14
0B08: MOVLW 00
0B09: BSF 03.5
0B0A: MOVWF 14
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
0B0B: MOVF 01,W
0B0C: ANDLW C7
0B0D: IORLW 08
0B0E: MOVWF 01
.................... setup_timer_1(T1_DISABLED);
0B0F: BCF 03.5
0B10: CLRF 10
.................... setup_timer_2(T2_DISABLED,0,1);
0B11: MOVLW 00
0B12: MOVWF 78
0B13: MOVWF 12
0B14: MOVLW 00
0B15: BSF 03.5
0B16: MOVWF 12
.................... setup_ccp1(CCP_OFF);
0B17: BCF 03.5
0B18: BSF 20.2
0B19: MOVF 20,W
0B1A: BSF 03.5
0B1B: MOVWF 07
0B1C: BCF 03.5
0B1D: CLRF 17
0B1E: BSF 03.5
0B1F: CLRF 1B
0B20: CLRF 1C
0B21: MOVLW 01
0B22: MOVWF 1D
.................... setup_comparator(NC_NC_NC_NC); // This device COMP currently not supported by the PICWizard
0B23: BCF 03.5
0B24: BSF 03.6
0B25: CLRF 07
0B26: CLRF 08
0B27: CLRF 09
.................... setup_oscillator(OSC_8MHZ);
0B28: MOVLW 71
0B29: BSF 03.5
0B2A: BCF 03.6
0B2B: MOVWF 0F
0B2C: MOVF 0F,W
....................
....................
.................... printf("GeoMet01A\r\n");
0B2D: MOVLW 0C
0B2E: BCF 03.5
0B2F: BSF 03.6
0B30: MOVWF 0D
0B31: MOVLW 00
0B32: MOVWF 0F
0B33: BCF 0A.3
0B34: BCF 03.6
0B35: CALL 030
0B36: BSF 0A.3
.................... printf("(c) Kaklik 2013\r\n");
0B37: MOVLW 12
0B38: BSF 03.6
0B39: MOVWF 0D
0B3A: MOVLW 00
0B3B: MOVWF 0F
0B3C: BCF 0A.3
0B3D: BCF 03.6
0B3E: CALL 030
0B3F: BSF 0A.3
.................... printf("www.mlab.cz\r\n");
0B40: MOVLW 1B
0B41: BSF 03.6
0B42: MOVWF 0D
0B43: MOVLW 00
0B44: MOVWF 0F
0B45: BCF 0A.3
0B46: BCF 03.6
0B47: CALL 030
0B48: BSF 0A.3
....................
.................... // Init the HMC5883L. Set Mode register for
.................... // continuous measurements.
.................... hmc5883l_write_reg(HMC5883L_CFG_A_REG, 0x18); // no average, maximal update range
0B49: CLRF 35
0B4A: MOVLW 18
0B4B: MOVWF 36
0B4C: BCF 0A.3
0B4D: CALL 0C2
0B4E: BSF 0A.3
.................... hmc5883l_write_reg(HMC5883L_CFG_B_REG, 0x00); // minimal range
0B4F: MOVLW 01
0B50: MOVWF 35
0B51: CLRF 36
0B52: BCF 0A.3
0B53: CALL 0C2
0B54: BSF 0A.3
.................... hmc5883l_write_reg(HMC5883L_MODE_REG, 0x00);
0B55: MOVLW 02
0B56: MOVWF 35
0B57: CLRF 36
0B58: BCF 0A.3
0B59: CALL 0C2
0B5A: BSF 0A.3
....................
.................... lcd_init();
0B5B: BCF 0A.3
0B5C: CALL 1C8
0B5D: BSF 0A.3
.................... lcd_putc("(c) Kaklik 2013");
0B5E: MOVLW 22
0B5F: BSF 03.6
0B60: MOVWF 0D
0B61: MOVLW 00
0B62: MOVWF 0F
0B63: BCF 0A.3
0B64: BCF 03.6
0B65: CALL 23F
0B66: BSF 0A.3
.................... lcd_gotoxy(3,2);
0B67: MOVLW 03
0B68: MOVWF 43
0B69: MOVLW 02
0B6A: MOVWF 44
0B6B: BCF 0A.3
0B6C: CALL 200
0B6D: BSF 0A.3
.................... lcd_putc("www.mlab.cz");
0B6E: MOVLW 2A
0B6F: BSF 03.6
0B70: MOVWF 0D
0B71: MOVLW 00
0B72: MOVWF 0F
0B73: BCF 0A.3
0B74: BCF 03.6
0B75: CALL 23F
0B76: BSF 0A.3
.................... Delay_ms(2000);
0B77: MOVLW 08
0B78: MOVWF 35
0B79: MOVLW FA
0B7A: MOVWF 43
0B7B: BCF 0A.3
0B7C: CALL 0FB
0B7D: BSF 0A.3
0B7E: DECFSZ 35,F
0B7F: GOTO 379
.................... lcd_init();
0B80: BCF 0A.3
0B81: CALL 1C8
0B82: BSF 0A.3
....................
.................... while (TRUE)
.................... {
.................... lcd_gotoxy(1,1);
0B83: MOVLW 01
0B84: MOVWF 43
0B85: MOVWF 44
0B86: BCF 0A.3
0B87: CALL 200
0B88: BSF 0A.3
.................... temp1 = SHT25_get_temp();
0B89: BCF 0A.3
0B8A: GOTO 567
0B8B: BSF 0A.3
0B8C: MOVF 7A,W
0B8D: MOVWF 2A
0B8E: MOVF 79,W
0B8F: MOVWF 29
0B90: MOVF 78,W
0B91: MOVWF 28
0B92: MOVF 77,W
0B93: MOVWF 27
.................... humidity = SHT25_get_hum();
0B94: BCF 0A.3
0B95: GOTO 636
0B96: BSF 0A.3
0B97: MOVF 7A,W
0B98: MOVWF 32
0B99: MOVF 79,W
0B9A: MOVWF 31
0B9B: MOVF 78,W
0B9C: MOVWF 30
0B9D: MOVF 77,W
0B9E: MOVWF 2F
.................... temp2= LTS01_get_temp();
0B9F: BCF 0A.3
0BA0: GOTO 6EC
0BA1: BSF 0A.3
0BA2: MOVF 7A,W
0BA3: MOVWF 2E
0BA4: MOVF 79,W
0BA5: MOVWF 2D
0BA6: MOVF 78,W
0BA7: MOVWF 2C
0BA8: MOVF 77,W
0BA9: MOVWF 2B
.................... hmc5883l_read_data();
0BAA: GOTO 000
....................
.................... printf(lcd_putc,"%f C %f \%%",temp1, humidity);
0BAB: MOVLW 89
0BAC: MOVWF 04
0BAD: MOVF 2A,W
0BAE: MOVWF 38
0BAF: MOVF 29,W
0BB0: MOVWF 37
0BB1: MOVF 28,W
0BB2: MOVWF 36
0BB3: MOVF 27,W
0BB4: MOVWF 35
0BB5: MOVLW 02
0BB6: MOVWF 39
0BB7: CALL 091
0BB8: MOVLW 20
0BB9: MOVWF 42
0BBA: BCF 0A.3
0BBB: CALL 212
0BBC: BSF 0A.3
0BBD: MOVLW 43
0BBE: MOVWF 42
0BBF: BCF 0A.3
0BC0: CALL 212
0BC1: BSF 0A.3
0BC2: MOVLW 20
0BC3: MOVWF 42
0BC4: BCF 0A.3
0BC5: CALL 212
0BC6: BSF 0A.3
0BC7: MOVLW 89
0BC8: MOVWF 04
0BC9: MOVF 32,W
0BCA: MOVWF 38
0BCB: MOVF 31,W
0BCC: MOVWF 37
0BCD: MOVF 30,W
0BCE: MOVWF 36
0BCF: MOVF 2F,W
0BD0: MOVWF 35
0BD1: MOVLW 02
0BD2: MOVWF 39
0BD3: CALL 091
0BD4: MOVLW 20
0BD5: MOVWF 42
0BD6: BCF 0A.3
0BD7: CALL 212
0BD8: BSF 0A.3
0BD9: MOVLW 25
0BDA: MOVWF 42
0BDB: BCF 0A.3
0BDC: CALL 212
0BDD: BSF 0A.3
.................... lcd_gotoxy(1,2);
0BDE: MOVLW 01
0BDF: MOVWF 43
0BE0: MOVLW 02
0BE1: MOVWF 44
0BE2: BCF 0A.3
0BE3: CALL 200
0BE4: BSF 0A.3
.................... printf(lcd_putc," %f C",temp2);
0BE5: MOVLW 20
0BE6: MOVWF 42
0BE7: BCF 0A.3
0BE8: CALL 212
0BE9: BSF 0A.3
0BEA: MOVLW 89
0BEB: MOVWF 04
0BEC: MOVF 2E,W
0BED: MOVWF 38
0BEE: MOVF 2D,W
0BEF: MOVWF 37
0BF0: MOVF 2C,W
0BF1: MOVWF 36
0BF2: MOVF 2B,W
0BF3: MOVWF 35
0BF4: MOVLW 02
0BF5: MOVWF 39
0BF6: CALL 091
0BF7: MOVLW 20
0BF8: MOVWF 42
0BF9: BCF 0A.3
0BFA: CALL 212
0BFB: BSF 0A.3
0BFC: MOVLW 43
0BFD: MOVWF 42
0BFE: BCF 0A.3
0BFF: CALL 212
0C00: BSF 0A.3
.................... printf("%ld %f %f %f ",i, temp1, humidity, temp2);
0C01: MOVLW 10
0C02: MOVWF 04
0C03: MOVF 34,W
0C04: MOVWF 36
0C05: MOVF 33,W
0C06: MOVWF 35
0C07: CALL 16B
0C08: MOVLW 20
0C09: BTFSS 0C.4
0C0A: GOTO 409
0C0B: MOVWF 19
0C0C: MOVLW 89
0C0D: MOVWF 04
0C0E: MOVF 2A,W
0C0F: MOVWF 38
0C10: MOVF 29,W
0C11: MOVWF 37
0C12: MOVF 28,W
0C13: MOVWF 36
0C14: MOVF 27,W
0C15: MOVWF 35
0C16: MOVLW 02
0C17: MOVWF 39
0C18: CALL 1E1
0C19: MOVLW 20
0C1A: BTFSS 0C.4
0C1B: GOTO 41A
0C1C: MOVWF 19
0C1D: MOVLW 89
0C1E: MOVWF 04
0C1F: MOVF 32,W
0C20: MOVWF 38
0C21: MOVF 31,W
0C22: MOVWF 37
0C23: MOVF 30,W
0C24: MOVWF 36
0C25: MOVF 2F,W
0C26: MOVWF 35
0C27: MOVLW 02
0C28: MOVWF 39
0C29: CALL 1E1
0C2A: MOVLW 20
0C2B: BTFSS 0C.4
0C2C: GOTO 42B
0C2D: MOVWF 19
0C2E: MOVLW 89
0C2F: MOVWF 04
0C30: MOVF 2E,W
0C31: MOVWF 38
0C32: MOVF 2D,W
0C33: MOVWF 37
0C34: MOVF 2C,W
0C35: MOVWF 36
0C36: MOVF 2B,W
0C37: MOVWF 35
0C38: MOVLW 02
0C39: MOVWF 39
0C3A: CALL 1E1
0C3B: MOVLW 20
0C3C: BTFSS 0C.4
0C3D: GOTO 43C
0C3E: MOVWF 19
.................... printf("%Ld %Ld %Ld \n\r", compass.x, compass.y, compass.z);
0C3F: MOVLW 10
0C40: MOVWF 04
0C41: MOVF 22,W
0C42: MOVWF 36
0C43: MOVF 21,W
0C44: MOVWF 35
0C45: CALL 16B
0C46: MOVLW 20
0C47: BTFSS 0C.4
0C48: GOTO 447
0C49: MOVWF 19
0C4A: MOVLW 10
0C4B: MOVWF 04
0C4C: MOVF 24,W
0C4D: MOVWF 36
0C4E: MOVF 23,W
0C4F: MOVWF 35
0C50: CALL 16B
0C51: MOVLW 20
0C52: BTFSS 0C.4
0C53: GOTO 452
0C54: MOVWF 19
0C55: MOVLW 10
0C56: MOVWF 04
0C57: MOVF 26,W
0C58: MOVWF 36
0C59: MOVF 25,W
0C5A: MOVWF 35
0C5B: CALL 16B
0C5C: MOVLW 20
0C5D: BTFSS 0C.4
0C5E: GOTO 45D
0C5F: MOVWF 19
0C60: MOVLW 0A
0C61: BTFSS 0C.4
0C62: GOTO 461
0C63: MOVWF 19
0C64: MOVLW 0D
0C65: BTFSS 0C.4
0C66: GOTO 465
0C67: MOVWF 19
.................... i++;
0C68: INCF 33,F
0C69: BTFSC 03.2
0C6A: INCF 34,F
.................... Delay_ms(100);
0C6B: MOVLW 64
0C6C: MOVWF 43
0C6D: BCF 0A.3
0C6E: CALL 0FB
0C6F: BSF 0A.3
.................... }
0C70: GOTO 383
....................
.................... }
0C71: SLEEP
 
Configuration Fuses:
Word 1: 2CF5 INTRC NOWDT NOPUT MCLR NOPROTECT NOCPD NOBROWNOUT IESO FCMEN NOLVP NODEBUG
Word 2: 3FFF NOWRT BORV40
/Designs/Measuring_instruments/GeoMet01A/SW/PIC16F887/main.pjt
0,0 → 1,36
[PROJECT]
Target=main.hex
Development_Mode=
Processor_Text=PIC16F887
ToolSuite=CCS
Processor=0x887F
[main]
Type=4
Path=
FileList=
BuildTool=
OptionString=
AdditionalOptionString=
[mru-list]
1=main.c
[Windows]
0=0000 %S 0 0 796 451 3 0
[Opened Files]
1=main.c
2=main.h
3=C:\Program Files (x86)\PICC\devices\16F887.h
4=C:\Program Files (x86)\PICC\drivers\lcd.c
5=..\SHT25.h
6=..\SHT25.c
7=..\LTS01.h
8=..\LTS01.c
9=..\HMC5883L.h
10=..\HMC5883L.c
11=C:\Program Files (x86)\PICC\drivers\math.h
12=
[Target Data]
OptionString=-p +FM
FileList=Z:\home\kaklik\svnMLAB\Designs\Measuring_instruments\GeoMet01A\SW\PIC16F887\main.c
[Units]
Count=1
1=main (main)
/Designs/Measuring_instruments/GeoMet01A/SW/PIC16F887/main.sta
0,0 → 1,87
 
ROM used: 3183 (39%)
3186 (39%) including unused fragments
 
1 Average locations per line
7 Average locations per statement
 
RAM used: 27 (7%) at main() level
52 (14%) worst case
 
Stack used: 5 worst case (out of 8 total available)
 
Lines Stmts % Files
----- ----- --- -----
69 35 7 main.c
22 0 0 main.h
423 0 0 C:\Program Files (x86)\PICC\devices\16F887.h
408 88 19 C:\Program Files (x86)\PICC\drivers\lcd.c
14 0 0 ..\SHT25.h
92 51 11 ..\SHT25.c
8 0 0 ..\LTS01.h
22 11 2 ..\LTS01.c
25 0 0 ..\.\HMC5883L.h
76 28 6 ..\HMC5883L.c
2172 260 55 C:\Program Files (x86)\PICC\drivers\math.h
----- -----
3331 473 Total
 
Page ROM % RAM Vol Diff Functions:
---- --- --- --- --- ---- ----------
0 20 1 1 @delay_ms1
0 69 2 3 @I2C_READ_1
0 74 2 1 @I2C_WRITE_1
0 8 0 0 @const80
Inline 3 751 4.5 lcd_read_byte
0 49 2 2 254 3.7 lcd_read_nibble
0 44 1 1 391 2.4 lcd_send_nibble
0 92 3 3 402 3.6 lcd_send_byte
0 56 2 2 666 5.0 lcd_init
0 18 1 4 191 5.8 lcd_gotoxy
0 45 1 1 354 4.7 lcd_putc
0 207 7 9 572 6.0 SHT25_get_temp
0 29 1 2 572 6.0 @ITOF
0 202 6 14 @DIVFF
0 117 4 13 @MULFF
0 321 10 16 @ADDFF
0 182 6 9 554 5.9 SHT25_get_hum
0 176 6 6 382 2.7 LTS01_get_temp
Inline 2 382 2.7 @SITOF
0 57 2 2 102 1.8 hmc5883l_write_reg
1 145 5 6 636 3.3 hmc5883l_read_data
1 443 14 15 1342 4.4 MAIN
0 6 0 0 1381 4.4 @const282
0 72 2 3 @PSTRINGC7_9600_62_63
0 9 0 0 @const284
0 7 0 0 @const285
0 8 0 0 @const286
0 70 2 3 @PSTRINGC7_98
0 6 0 0 @const288
0 31 1 5 @FTOSD
0 66 2 13 @DIV3232
1 218 7 13 @PRINTF_L32D_98FPFPF
1 118 4 9 @PRINTF_LD_9600_62_63
1 214 7 13 @PRINTF_L32D_9600_62_63FPFPF
 
Program metrics:
Functions 16
Statements 473
Comments 472
Volume (V) 14718
Difficilty (D) 64.8
Effort to implement (E) 953628
Time to implement (T) 14 hours, 43 minutes
Est Delivered Bugs (B) 3
Cyclomatic Complexity 8
Maintainability (MI) 123
 
Segment Used Free
----------- ---- ----
00000-00003 4 0
00004-007FF 2041 3
00800-00FFF 1138 910
01000-017FF 0 2048
01800-01FFF 0 2048
 
 
 
/Designs/Measuring_instruments/GeoMet01A/SW/PIC16F887/main.sym
0,0 → 1,224
004-005 @READ_PROGRAM_MEMORY8.P1
004 @WRITE_PROGRAM_MEMORY8.P2
015 CCP_1_LOW
015 CCP_1
016 CCP_1_HIGH
01B CCP_2
01B CCP_2_LOW
01C CCP_2_HIGH
020 @TRIS_C
021-026 compass
027-02A MAIN.temp1
02B-02E MAIN.temp2
02F-032 MAIN.humidity
033-034 MAIN.i
035-036 @PRINTF_LD_9600_62_63.P1
035 hmc5883l_read_data.x_lsb
035-038 @PRINTF_L32D_98FPFPF.P1
035 LTS01_get_temp.MSB
035-038 @PRINTF_L32D_9600_62_63FPFPF.P1
035 lcd_init.i
035 hmc5883l_write_reg.reg
035 SHT25_get_temp.MSB
035 SHT25_get_hum.MSB
035 MAIN.@SCRATCH1
035 @PSTRINGC7_9600_62_63.@SCRATCH1
035 @PSTRINGC7_98.@SCRATCH1
036 hmc5883l_read_data.x_msb
036 SHT25_get_hum.LSB
036 LTS01_get_temp.LSB
036 SHT25_get_temp.LSB
036 hmc5883l_write_reg.data
036 lcd_init.@SCRATCH1
036 @PSTRINGC7_9600_62_63.@SCRATCH2
036 @PSTRINGC7_98.@SCRATCH2
037 hmc5883l_read_data.y_lsb
037 SHT25_get_hum.Check
037-038 LTS01_get_temp.data
037 SHT25_get_temp.Check
037 @PSTRINGC7_9600_62_63.@SCRATCH3
037 @PSTRINGC7_98.@SCRATCH3
037 @PRINTF_LD_9600_62_63.@SCRATCH1
038-039 SHT25_get_temp.data
038 hmc5883l_read_data.y_msb
038-039 SHT25_get_hum.data
038 @PRINTF_LD_9600_62_63.@SCRATCH2
039 hmc5883l_read_data.z_lsb
039 @PRINTF_L32D_9600_62_63FPFPF.P1
039 @PRINTF_L32D_98FPFPF.P2
039 LTS01_get_temp.@SCRATCH1
039 @PRINTF_LD_9600_62_63.@SCRATCH3
03A-03D @ADDFF.P1
03A hmc5883l_read_data.z_msb
03A-03B @ITOF.P1
03A SHT25_get_temp.@SCRATCH1
03A SHT25_get_hum.@SCRATCH1
03A LTS01_get_temp.@SCRATCH2
03A @PRINTF_L32D_98FPFPF.@SCRATCH1
03A @PRINTF_LD_9600_62_63.@SCRATCH4
03A @PRINTF_L32D_9600_62_63FPFPF.@SCRATCH1
03B-03C @SITOF.P1
03B @I2C_WRITE_1.P2
03B @I2C_READ_1.P3
03B SHT25_get_temp.@SCRATCH2
03B SHT25_get_hum.@SCRATCH2
03B @PRINTF_L32D_98FPFPF.@SCRATCH2
03B @PRINTF_LD_9600_62_63.@SCRATCH5
03B @PRINTF_L32D_9600_62_63FPFPF.@SCRATCH2
03C @I2C_READ_1.@SCRATCH1
03C SHT25_get_temp.@SCRATCH3
03C SHT25_get_hum.@SCRATCH3
03C @PRINTF_L32D_98FPFPF.@SCRATCH3
03C @PRINTF_LD_9600_62_63.@SCRATCH6
03C @PRINTF_L32D_9600_62_63FPFPF.@SCRATCH3
03D @I2C_READ_1.@SCRATCH2
03D SHT25_get_temp.@SCRATCH4
03D SHT25_get_hum.@SCRATCH4
03D @PRINTF_L32D_98FPFPF.@SCRATCH4
03D @PRINTF_LD_9600_62_63.@SCRATCH7
03D @PRINTF_L32D_9600_62_63FPFPF.@SCRATCH4
03E-041 @DIVFF.P1
03E-041 @ADDFF.P2
03E @PRINTF_L32D_98FPFPF.@SCRATCH5
03E @PRINTF_L32D_9600_62_63FPFPF.@SCRATCH5
03F @PRINTF_L32D_98FPFPF.@SCRATCH6
03F @PRINTF_L32D_9600_62_63FPFPF.@SCRATCH6
040 @PRINTF_L32D_98FPFPF.@SCRATCH7
040 @PRINTF_L32D_9600_62_63FPFPF.@SCRATCH7
041 @PRINTF_L32D_98FPFPF.@SCRATCH8
041 @PRINTF_L32D_9600_62_63FPFPF.@SCRATCH8
042-045 @MULFF.P1
042-045 @DIV3232.P2
042-045 @DIVFF.P3
042-045 @FTOSD.P4
042 lcd_putc.c
042 @ADDFF.@SCRATCH1
043 lcd_gotoxy.x
043 @delay_ms1.P1
043 @ADDFF.@SCRATCH2
044 lcd_gotoxy.y
044 @ADDFF.@SCRATCH3
045 lcd_gotoxy.address
045 @ADDFF.@SCRATCH4
046-049 @DIV3232.P1
046-049 @MULFF.P2
046 lcd_gotoxy.@SCRATCH1
046 @DIVFF.@SCRATCH1
046 @ADDFF.@SCRATCH5
046 @FTOSD.@SCRATCH1
047 lcd_send_byte.address
047 @DIVFF.@SCRATCH2
047 @ADDFF.@SCRATCH6
048 lcd_send_byte.n
048 @DIVFF.@SCRATCH3
048 @ADDFF.@SCRATCH7
049 lcd_read_byte.low
049 lcd_send_byte.@SCRATCH1
049 @DIVFF.@SCRATCH4
049 @ADDFF.@SCRATCH8
04A lcd_read_byte.high
04A lcd_send_nibble.n
04A @DIVFF.@SCRATCH5
04A @MULFF.@SCRATCH1
04A @DIV3232.@SCRATCH1
04B lcd_read_nibble.n
04B lcd_read_byte.@SCRATCH1
04B @DIVFF.@SCRATCH6
04B @MULFF.@SCRATCH2
04B @DIV3232.@SCRATCH2
04C lcd_read_nibble.@SCRATCH1
04C @MULFF.@SCRATCH3
04C @DIV3232.@SCRATCH3
04D @MULFF.@SCRATCH4
04D @DIV3232.@SCRATCH4
04E @MULFF.@SCRATCH5
04E @DIV3232.@SCRATCH5
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:
00FB @delay_ms1
0285 @I2C_READ_1
0078 @I2C_WRITE_1
0004 LCD_INIT_STRING
0174 lcd_read_byte
013B lcd_read_nibble
010F lcd_send_nibble
016C lcd_send_byte
01C8 lcd_init
0200 lcd_gotoxy
0212 lcd_putc
0567 SHT25_get_temp
02CA @ITOF
02E7 @DIVFF
03B1 @MULFF
0426 @ADDFF
0636 SHT25_get_hum
06EC LTS01_get_temp
0767 @SITOF
00C2 hmc5883l_write_reg
0800 hmc5883l_read_data
0AB7 MAIN
000C @const282
0030 @PSTRINGC7_9600_62_63
0012 @const284
001B @const285
0022 @const286
023F @PSTRINGC7_98
002A @const288
079C @FTOSD
07BB @DIV3232
0891 @PRINTF_L32D_98FPFPF
096B @PRINTF_LD_9600_62_63
09E1 @PRINTF_L32D_9600_62_63FPFPF
0AB7 @cinit
 
 
User Memory space:
 
User Memory space:
 
Project Directory:
D:\MLAB\Designs\Measuring_instruments\GeoMet01A\SW\PIC16F887\
 
Project Files:
main.c
main.h
C:\Program Files (x86)\PICC\devices\16F887.h
C:\Program Files (x86)\PICC\drivers\lcd.c
..\SHT25.h
..\SHT25.c
..\LTS01.h
..\LTS01.c
..\.\HMC5883L.h
..\HMC5883L.c
C:\Program Files (x86)\PICC\drivers\math.h
 
Units:
D:\MLAB\Designs\Measuring_instruments\GeoMet01A\SW\PIC16F887\main (main)
 
Compiler Settings:
Processor: PIC16F887
Pointer Size: 16
ADC Range: 0-1023
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
/Designs/Measuring_instruments/GeoMet01A/SW/PIC16F887/main.tre
0,0 → 1,959
ÀÄmain
ÀÄMAIN 1/443 Ram=15
ÃÄ??0??
ÃÄ@PSTRINGC7_9600_62_63 0/72 Ram=3
ÃÄ@PSTRINGC7_9600_62_63 0/72 Ram=3
ÃÄ@PSTRINGC7_9600_62_63 0/72 Ram=3
ÃÄhmc5883l_write_reg 0/57 Ram=2
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÀÄ@I2C_WRITE_1 0/74 Ram=1
ÃÄhmc5883l_write_reg 0/57 Ram=2
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÀÄ@I2C_WRITE_1 0/74 Ram=1
ÃÄhmc5883l_write_reg 0/57 Ram=2
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÀÄ@I2C_WRITE_1 0/74 Ram=1
ÃÄlcd_init 0/56 Ram=2
³ ÃÄ@delay_ms1 0/20 Ram=1
³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ÃÄ@delay_ms1 0/20 Ram=1
³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ÃÄ@const80 0/8 Ram=0
³ ÀÄlcd_send_byte 0/92 Ram=3
³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_nibble 0/44 Ram=1
ÃÄ@PSTRINGC7_98 0/70 Ram=3
³ ÃÄlcd_putc 0/45 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄ@delay_ms1 0/20 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_putc 0/45 Ram=1
³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄ@delay_ms1 0/20 Ram=1
³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_byte 0/92 Ram=3
³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_nibble 0/44 Ram=1
ÃÄlcd_gotoxy 0/18 Ram=4
³ ÀÄlcd_send_byte 0/92 Ram=3
³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_nibble 0/44 Ram=1
ÃÄ@PSTRINGC7_98 0/70 Ram=3
³ ÃÄlcd_putc 0/45 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄ@delay_ms1 0/20 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_putc 0/45 Ram=1
³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄ@delay_ms1 0/20 Ram=1
³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_byte 0/92 Ram=3
³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_nibble 0/44 Ram=1
ÃÄ@delay_ms1 0/20 Ram=1
ÃÄlcd_init 0/56 Ram=2
³ ÃÄ@delay_ms1 0/20 Ram=1
³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ÃÄ@delay_ms1 0/20 Ram=1
³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ÃÄ@const80 0/8 Ram=0
³ ÀÄlcd_send_byte 0/92 Ram=3
³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_nibble 0/44 Ram=1
ÃÄlcd_gotoxy 0/18 Ram=4
³ ÀÄlcd_send_byte 0/92 Ram=3
³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_nibble 0/44 Ram=1
ÃÄSHT25_get_temp 0/207 Ram=9
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@delay_ms1 0/20 Ram=1
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@I2C_READ_1 0/69 Ram=3
³ ÃÄ@I2C_READ_1 0/69 Ram=3
³ ÃÄ@I2C_READ_1 0/69 Ram=3
³ ÃÄ@ITOF 0/29 Ram=2
³ ÃÄ@DIVFF 0/202 Ram=14
³ ÃÄ@MULFF 0/117 Ram=13
³ ÀÄ@ADDFF 0/321 Ram=16
ÃÄSHT25_get_hum 0/182 Ram=9
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@delay_ms1 0/20 Ram=1
³ ÃÄ@I2C_WRITE_1 0/74 Ram=1
³ ÃÄ@I2C_READ_1 0/69 Ram=3
³ ÃÄ@I2C_READ_1 0/69 Ram=3
³ ÃÄ@I2C_READ_1 0/69 Ram=3
³ ÃÄ@ITOF 0/29 Ram=2
³ ÃÄ@DIVFF 0/202 Ram=14
³ ÃÄ@MULFF 0/117 Ram=13
³ ÀÄ@ADDFF 0/321 Ram=16
ÃÄLTS01_get_temp 0/176 Ram=6
³ ÃÄ@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
³ ÃÄ@SITOF (Inline) Ram=2
³ ÀÄ@MULFF 0/117 Ram=13
ÃÄhmc5883l_read_data 1/145 Ram=6
³ ÃÄ@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_READ_1 0/69 Ram=3
³ ÃÄ@I2C_READ_1 0/69 Ram=3
³ ÃÄ@I2C_READ_1 0/69 Ram=3
³ ÀÄ@I2C_READ_1 0/69 Ram=3
ÃÄ@PRINTF_L32D_98FPFPF 1/218 Ram=13
³ ÃÄ@MULFF 0/117 Ram=13
³ ÃÄ@FTOSD 0/31 Ram=5
³ ÃÄ@DIV3232 0/66 Ram=13
³ ÃÄlcd_putc 0/45 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄ@delay_ms1 0/20 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_putc 0/45 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄ@delay_ms1 0/20 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_putc 0/45 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄ@delay_ms1 0/20 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_putc 0/45 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄ@delay_ms1 0/20 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÀÄ@DIV3232 0/66 Ram=13
ÃÄlcd_putc 0/45 Ram=1
³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄ@delay_ms1 0/20 Ram=1
³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_byte 0/92 Ram=3
³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_nibble 0/44 Ram=1
ÃÄlcd_putc 0/45 Ram=1
³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄ@delay_ms1 0/20 Ram=1
³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_byte 0/92 Ram=3
³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_nibble 0/44 Ram=1
ÃÄlcd_putc 0/45 Ram=1
³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄ@delay_ms1 0/20 Ram=1
³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_byte 0/92 Ram=3
³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_nibble 0/44 Ram=1
ÃÄ@PRINTF_L32D_98FPFPF 1/218 Ram=13
³ ÃÄ@MULFF 0/117 Ram=13
³ ÃÄ@FTOSD 0/31 Ram=5
³ ÃÄ@DIV3232 0/66 Ram=13
³ ÃÄlcd_putc 0/45 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄ@delay_ms1 0/20 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_putc 0/45 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄ@delay_ms1 0/20 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_putc 0/45 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄ@delay_ms1 0/20 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_putc 0/45 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄ@delay_ms1 0/20 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÀÄ@DIV3232 0/66 Ram=13
ÃÄlcd_putc 0/45 Ram=1
³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄ@delay_ms1 0/20 Ram=1
³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_byte 0/92 Ram=3
³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_nibble 0/44 Ram=1
ÃÄlcd_putc 0/45 Ram=1
³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄ@delay_ms1 0/20 Ram=1
³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_byte 0/92 Ram=3
³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_nibble 0/44 Ram=1
ÃÄlcd_gotoxy 0/18 Ram=4
³ ÀÄlcd_send_byte 0/92 Ram=3
³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_nibble 0/44 Ram=1
ÃÄlcd_putc 0/45 Ram=1
³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄ@delay_ms1 0/20 Ram=1
³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_byte 0/92 Ram=3
³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_nibble 0/44 Ram=1
ÃÄ@PRINTF_L32D_98FPFPF 1/218 Ram=13
³ ÃÄ@MULFF 0/117 Ram=13
³ ÃÄ@FTOSD 0/31 Ram=5
³ ÃÄ@DIV3232 0/66 Ram=13
³ ÃÄlcd_putc 0/45 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄ@delay_ms1 0/20 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_putc 0/45 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄ@delay_ms1 0/20 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_putc 0/45 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄ@delay_ms1 0/20 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_putc 0/45 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄ@delay_ms1 0/20 Ram=1
³ ³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÀÄ@DIV3232 0/66 Ram=13
ÃÄlcd_putc 0/45 Ram=1
³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄ@delay_ms1 0/20 Ram=1
³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_byte 0/92 Ram=3
³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_nibble 0/44 Ram=1
ÃÄlcd_putc 0/45 Ram=1
³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄ@delay_ms1 0/20 Ram=1
³ ÃÄlcd_gotoxy 0/18 Ram=4
³ ³ ÀÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÃÄlcd_send_byte 0/92 Ram=3
³ ³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ³ ÀÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_byte 0/92 Ram=3
³ ÃÄlcd_read_byte (Inline) Ram=3
³ ³ ÃÄlcd_read_nibble 0/49 Ram=2
³ ³ ÀÄlcd_read_nibble 0/49 Ram=2
³ ÃÄlcd_send_nibble 0/44 Ram=1
³ ÀÄlcd_send_nibble 0/44 Ram=1
ÃÄ@PRINTF_LD_9600_62_63 1/118 Ram=9
ÃÄ@PRINTF_L32D_9600_62_63FPFPF 1/214 Ram=13
³ ÃÄ@MULFF 0/117 Ram=13
³ ÃÄ@FTOSD 0/31 Ram=5
³ ÃÄ@DIV3232 0/66 Ram=13
³ ÀÄ@DIV3232 0/66 Ram=13
ÃÄ@PRINTF_L32D_9600_62_63FPFPF 1/214 Ram=13
³ ÃÄ@MULFF 0/117 Ram=13
³ ÃÄ@FTOSD 0/31 Ram=5
³ ÃÄ@DIV3232 0/66 Ram=13
³ ÀÄ@DIV3232 0/66 Ram=13
ÃÄ@PRINTF_L32D_9600_62_63FPFPF 1/214 Ram=13
³ ÃÄ@MULFF 0/117 Ram=13
³ ÃÄ@FTOSD 0/31 Ram=5
³ ÃÄ@DIV3232 0/66 Ram=13
³ ÀÄ@DIV3232 0/66 Ram=13
ÃÄ@PRINTF_LD_9600_62_63 1/118 Ram=9
ÃÄ@PRINTF_LD_9600_62_63 1/118 Ram=9
ÃÄ@PRINTF_LD_9600_62_63 1/118 Ram=9
ÀÄ@delay_ms1 0/20 Ram=1
/Designs/Measuring_instruments/GeoMet01A/SW/PIC16F887/main.h
0,0 → 1,21
#include <16F887.h>
#device adc=10
 
#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)
#use i2c(master, sda=PIN_C4, scl=PIN_C3)
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)