No changes between revisions
/Modules/Sensors/IMU01A/SW/PIC16F887/Gyroskop/main.bak
0,0 → 1,20
#include "C:\Users\Honza\Documents\pic\I2C_gyrsokop\main.h"
 
 
 
 
void main()
{
 
setup_adc_ports(NO_ANALOGS|VSS_VDD);
setup_adc(ADC_CLOCK_DIV_2);
setup_spi(SPI_SS_DISABLED);
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_ccp1(CCP_OFF);
setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard
 
//TODO: User Code
 
}
/Modules/Sensors/IMU01A/SW/PIC16F887/Gyroskop/main.c
0,0 → 1,70
#include "C:\Users\Honza\Documents\pic\I2C_magnetometr\main.h"
#define EEPROM_SDA PIN_B0
#define EEPROM_SCL PIN_B1
#use i2c(master, sda=EEPROM_SDA, scl=EEPROM_SCL)
#use rs232(baud=9600,parity=N,xmit=PIN_B3,rcv=PIN_B2,bits=8) //rcv TXD xmit RXD
 
 
void main()
{
 
setup_adc_ports(NO_ANALOGS|VSS_VDD);
setup_adc(ADC_CLOCK_DIV_2);
setup_spi(SPI_SS_DISABLED);
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_ccp1(CCP_OFF);
setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard
 
printf("Simple Thermomether \r\n",);
 
int STAV1;
unsigned int data1;
 
while(TRUE)
{
 
 
//akcelerometr
int1 ack;
i2c_start(); // If the write command is acknowledged,
ack = i2c_write(0xD1);// then the device is ready.
i2c_stop();
ack=!ack;
i2c_stop();
 
i2c_start();
I2C_Write(0xD0);
I2C_write(0x28);
i2c_stop();
i2c_start();
I2C_Write(0xD1);
STAV1=i2c_read(0);
i2c_stop();
 
i2c_start();
I2C_Write(0xD0);
I2C_write(0x0F);
i2c_stop();
i2c_start();
I2C_Write(0xD1);
data1=i2c_read(0);
i2c_stop();
 
 
 
printf("Stav: %d (procenta)\r\n", ack);
printf("Stav: %d (procenta)\r\n", STAV1);
printf("Stav: %du(procenta)\r\n", data1);
delay_ms (2000);
 
}
}
/Modules/Sensors/IMU01A/SW/PIC16F887/Gyroskop/main.cof
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Modules/Sensors/IMU01A/SW/PIC16F887/Gyroskop/main.err
0,0 → 1,2
Memory usage: ROM=10% RAM=2% - 5%
0 Errors, 0 Warnings.
/Modules/Sensors/IMU01A/SW/PIC16F887/Gyroskop/main.esym
0,0 → 1,417
D G "__PCM__" 0 72 ""4.106""
D G "__DEVICE__" 0 72 "887"
D G "__DATE__" 0 72 ""02-4-13""
D G "__TIME__" 0 72 ""10:53:48"" "Standard Header file for the PIC16F887 device ////////////////"
d G "PIN_A0" 2 20 "40"
d G "PIN_A1" 2 21 "41"
d G "PIN_A2" 2 22 "42"
d G "PIN_A3" 2 23 "43"
d G "PIN_A4" 2 24 "44"
d G "PIN_A5" 2 25 "45"
d G "PIN_A6" 2 26 "46"
d G "PIN_A7" 2 27 "47"
d G "PIN_B0" 2 29 "48"
d G "PIN_B1" 2 30 "49"
d G "PIN_B2" 2 31 "50"
d G "PIN_B3" 2 32 "51"
d G "PIN_B4" 2 33 "52"
d G "PIN_B5" 2 34 "53"
d G "PIN_B6" 2 35 "54"
d G "PIN_B7" 2 36 "55"
d G "PIN_C0" 2 38 "56"
d G "PIN_C1" 2 39 "57"
d G "PIN_C2" 2 40 "58"
d G "PIN_C3" 2 41 "59"
d G "PIN_C4" 2 42 "60"
d G "PIN_C5" 2 43 "61"
d G "PIN_C6" 2 44 "62"
d G "PIN_C7" 2 45 "63"
d G "PIN_D0" 2 47 "64"
d G "PIN_D1" 2 48 "65"
d G "PIN_D2" 2 49 "66"
d G "PIN_D3" 2 50 "67"
d G "PIN_D4" 2 51 "68"
d G "PIN_D5" 2 52 "69"
d G "PIN_D6" 2 53 "70"
d G "PIN_D7" 2 54 "71"
d G "PIN_E0" 2 56 "72"
d G "PIN_E1" 2 57 "73"
d G "PIN_E2" 2 58 "74"
d G "PIN_E3" 2 59 "75"
d G "FALSE" 2 62 "0"
d G "TRUE" 2 63 "1"
d G "BYTE" 2 65 "int8"
d G "BOOLEAN" 2 66 "int1"
d G "getc" 2 68 "getch"
d G "fgetc" 2 69 "getch"
d G "getchar" 2 70 "getch"
d G "putc" 2 71 "putchar"
d G "fputc" 2 72 "putchar"
d G "fgets" 2 73 "gets"
d G "fputs" 2 74 "puts"
d G "WDT_FROM_SLEEP" 2 79 "3"
d G "WDT_TIMEOUT" 2 80 "11"
d G "MCLR_FROM_SLEEP" 2 81 "19"
d G "MCLR_FROM_RUN" 2 82 "27"
d G "NORMAL_POWER_UP" 2 83 "25"
d G "BROWNOUT_RESTART" 2 84 "26"
d G "T0_INTERNAL" 2 91 "0"
d G "T0_EXT_L_TO_H" 2 92 "32"
d G "T0_EXT_H_TO_L" 2 93 "48"
d G "T0_DIV_1" 2 95 "8"
d G "T0_DIV_2" 2 96 "0"
d G "T0_DIV_4" 2 97 "1"
d G "T0_DIV_8" 2 98 "2"
d G "T0_DIV_16" 2 99 "3"
d G "T0_DIV_32" 2 100 "4"
d G "T0_DIV_64" 2 101 "5"
d G "T0_DIV_128" 2 102 "6"
d G "T0_DIV_256" 2 103 "7"
d G "T0_8_BIT" 2 106 "0"
d G "RTCC_INTERNAL" 2 108 "0" "The following are provided for compatibility"
d G "RTCC_EXT_L_TO_H" 2 109 "32" "with older compiler versions"
d G "RTCC_EXT_H_TO_L" 2 110 "48"
d G "RTCC_DIV_1" 2 111 "8"
d G "RTCC_DIV_2" 2 112 "0"
d G "RTCC_DIV_4" 2 113 "1"
d G "RTCC_DIV_8" 2 114 "2"
d G "RTCC_DIV_16" 2 115 "3"
d G "RTCC_DIV_32" 2 116 "4"
d G "RTCC_DIV_64" 2 117 "5"
d G "RTCC_DIV_128" 2 118 "6"
d G "RTCC_DIV_256" 2 119 "7"
d G "RTCC_8_BIT" 2 120 "0"
d G "WDT_18MS" 2 132 "8"
d G "WDT_36MS" 2 133 "9"
d G "WDT_72MS" 2 134 "10"
d G "WDT_144MS" 2 135 "11"
d G "WDT_288MS" 2 136 "12"
d G "WDT_576MS" 2 137 "13"
d G "WDT_1152MS" 2 138 "14"
d G "WDT_2304MS" 2 139 "15"
d G "WDT_ON" 2 143 "0x4100"
d G "WDT_OFF" 2 144 "0"
d G "WDT_DIV_16" 2 145 "0x100"
d G "WDT_DIV_8" 2 146 "0x300"
d G "WDT_DIV_4" 2 147 "0x500"
d G "WDT_DIV_2" 2 148 "0x700"
d G "WDT_TIMES_1" 2 149 "0x900" "Default"
d G "WDT_TIMES_2" 2 150 "0xB00"
d G "WDT_TIMES_4" 2 151 "0xD00"
d G "WDT_TIMES_8" 2 152 "0xF00"
d G "WDT_TIMES_16" 2 153 "0x1100"
d G "WDT_TIMES_32" 2 154 "0x1300"
d G "WDT_TIMES_64" 2 155 "0x1500"
d G "WDT_TIMES_128" 2 156 "0x1700"
d G "T1_DISABLED" 2 162 "0"
d G "T1_INTERNAL" 2 163 "5"
d G "T1_EXTERNAL" 2 164 "7"
d G "T1_EXTERNAL_SYNC" 2 165 "3"
d G "T1_CLK_OUT" 2 167 "8"
d G "T1_DIV_BY_1" 2 169 "0"
d G "T1_DIV_BY_2" 2 170 "0x10"
d G "T1_DIV_BY_4" 2 171 "0x20"
d G "T1_DIV_BY_8" 2 172 "0x30"
d G "T1_GATE" 2 174 "0x40"
d G "T1_GATE_INVERTED" 2 175 "0xC0"
d G "T2_DISABLED" 2 180 "0"
d G "T2_DIV_BY_1" 2 181 "4"
d G "T2_DIV_BY_4" 2 182 "5"
d G "T2_DIV_BY_16" 2 183 "6"
d G "CCP_OFF" 2 189 "0"
d G "CCP_CAPTURE_FE" 2 190 "4"
d G "CCP_CAPTURE_RE" 2 191 "5"
d G "CCP_CAPTURE_DIV_4" 2 192 "6"
d G "CCP_CAPTURE_DIV_16" 2 193 "7"
d G "CCP_COMPARE_SET_ON_MATCH" 2 194 "8"
d G "CCP_COMPARE_CLR_ON_MATCH" 2 195 "9"
d G "CCP_COMPARE_INT" 2 196 "0xA"
d G "CCP_COMPARE_RESET_TIMER" 2 197 "0xB"
d G "CCP_PWM" 2 198 "0xC"
d G "CCP_PWM_PLUS_1" 2 199 "0x1c"
d G "CCP_PWM_PLUS_2" 2 200 "0x2c"
d G "CCP_PWM_PLUS_3" 2 201 "0x3c"
d G "CCP_PWM_H_H" 2 206 "0x0c"
d G "CCP_PWM_H_L" 2 207 "0x0d"
d G "CCP_PWM_L_H" 2 208 "0x0e"
d G "CCP_PWM_L_L" 2 209 "0x0f"
d G "CCP_PWM_FULL_BRIDGE" 2 211 "0x40"
d G "CCP_PWM_FULL_BRIDGE_REV" 2 212 "0xC0"
d G "CCP_PWM_HALF_BRIDGE" 2 213 "0x80"
d G "CCP_SHUTDOWN_ON_COMP1" 2 215 "0x100000"
d G "CCP_SHUTDOWN_ON_COMP2" 2 216 "0x200000"
d G "CCP_SHUTDOWN_ON_COMP" 2 217 "0x300000"
d G "CCP_SHUTDOWN_ON_INT0" 2 218 "0x400000"
d G "CCP_SHUTDOWN_ON_COMP1_INT0" 2 219 "0x500000"
d G "CCP_SHUTDOWN_ON_COMP2_INT0" 2 220 "0x600000"
d G "CCP_SHUTDOWN_ON_COMP_INT0" 2 221 "0x700000"
d G "CCP_SHUTDOWN_AC_L" 2 223 "0x000000"
d G "CCP_SHUTDOWN_AC_H" 2 224 "0x040000"
d G "CCP_SHUTDOWN_AC_F" 2 225 "0x080000"
d G "CCP_SHUTDOWN_BD_L" 2 227 "0x000000"
d G "CCP_SHUTDOWN_BD_H" 2 228 "0x010000"
d G "CCP_SHUTDOWN_BD_F" 2 229 "0x020000"
d G "CCP_SHUTDOWN_RESTART" 2 231 "0x80000000"
d G "CCP_PULSE_STEERING_A" 2 233 "0x01000000"
d G "CCP_PULSE_STEERING_B" 2 234 "0x02000000"
d G "CCP_PULSE_STEERING_C" 2 235 "0x04000000"
d G "CCP_PULSE_STEERING_D" 2 236 "0x08000000"
d G "CCP_PULSE_STEERING_SYNC" 2 237 "0x10000000"
d G "SPI_MASTER" 2 245 "0x20"
d G "SPI_SLAVE" 2 246 "0x24"
d G "SPI_L_TO_H" 2 247 "0"
d G "SPI_H_TO_L" 2 248 "0x10"
d G "SPI_CLK_DIV_4" 2 249 "0"
d G "SPI_CLK_DIV_16" 2 250 "1"
d G "SPI_CLK_DIV_64" 2 251 "2"
d G "SPI_CLK_T2" 2 252 "3"
d G "SPI_SS_DISABLED" 2 253 "1"
d G "SPI_SAMPLE_AT_END" 2 255 "0x8000"
d G "SPI_XMIT_L_TO_H" 2 256 "0x4000"
d G "UART_ADDRESS" 2 262 "2"
d G "UART_DATA" 2 263 "4"
d G "UART_AUTODETECT" 2 264 "8"
d G "UART_AUTODETECT_NOWAIT" 2 265 "9"
d G "UART_WAKEUP_ON_RDA" 2 266 "10"
d G "UART_SEND_BREAK" 2 267 "13"
d G "NC_NC_NC_NC" 2 273 "0x00"
d G "NC_NC" 2 274 "0x00"
d G "CP1_A0_A3" 2 277 "0x00090080"
d G "CP1_A1_A3" 2 278 "0x000A0081"
d G "CP1_B3_A3" 2 279 "0x00880082"
d G "CP1_B1_A3" 2 280 "0x00280083"
d G "CP1_A0_VREF" 2 281 "0x00010084"
d G "CP1_A1_VREF" 2 282 "0x00020085"
d G "CP1_B3_VREF" 2 283 "0x00800086"
d G "CP1_B1_VREF" 2 284 "0x00200087"
d G "CP1_OUT_ON_A4" 2 286 "0x00000020"
d G "CP1_INVERT" 2 287 "0x00000010"
d G "CP1_ABSOLUTE_VREF" 2 288 "0x20000000"
d G "CP2_A0_A2" 2 291 "0x00058000"
d G "CP2_A1_A2" 2 292 "0x00068100"
d G "CP2_B3_A2" 2 293 "0x00848200"
d G "CP2_B1_A2" 2 294 "0x00248300"
d G "CP2_A0_VREF" 2 295 "0x00018400"
d G "CP2_A1_VREF" 2 296 "0x00028500"
d G "CP2_B3_VREF" 2 297 "0x00808600"
d G "CP2_B1_VREF" 2 298 "0x00208700"
d G "CP2_OUT_ON_A5" 2 300 "0x00002000"
d G "CP2_INVERT" 2 301 "0x00001000"
d G "CP2_ABSOLUTE_VREF" 2 302 "0x10000000"
d G "CP2_T1_SYNC" 2 305 "0x01000000"
d G "CP2_T1_GATE" 2 306 "0x02000000"
d G "VREF_LOW" 2 315 "0xa0"
d G "VREF_HIGH" 2 316 "0x80"
d G "OSC_31KHZ" 2 322 "1"
d G "OSC_125KHZ" 2 323 "0x11"
d G "OSC_250KHZ" 2 324 "0x21"
d G "OSC_500KHZ" 2 325 "0x31"
d G "OSC_1MHZ" 2 326 "0x41"
d G "OSC_2MHZ" 2 327 "0x51"
d G "OSC_4MHZ" 2 328 "0x61"
d G "OSC_8MHZ" 2 329 "0x71"
d G "OSC_INTRC" 2 330 "1"
d G "OSC_NORMAL" 2 331 "0"
d G "OSC_STATE_STABLE" 2 333 "4"
d G "OSC_31KHZ_STABLE" 2 334 "2"
d G "ADC_OFF" 2 342 "0" "ADC Off"
d G "ADC_CLOCK_DIV_2" 2 343 "0x100"
d G "ADC_CLOCK_DIV_8" 2 344 "0x40"
d G "ADC_CLOCK_DIV_32" 2 345 "0x80"
d G "ADC_CLOCK_INTERNAL" 2 346 "0xc0" "Internal 2-6us"
d G "sAN0" 2 350 "1" "| A0"
d G "sAN1" 2 351 "2" "| A1"
d G "sAN2" 2 352 "4" "| A2"
d G "sAN3" 2 353 "8" "| A3"
d G "sAN4" 2 354 "16" "| A5"
d G "sAN5" 2 355 "32" "| E0"
d G "sAN6" 2 356 "64" "| E1"
d G "sAN7" 2 357 "128" "| E2"
d G "sAN8" 2 358 "0x10000" "| B2"
d G "sAN9" 2 359 "0x20000" "| B3"
d G "sAN10" 2 360 "0x40000" "| B1"
d G "sAN11" 2 361 "0x80000" "| B4"
d G "sAN12" 2 362 "0x100000" "| B0"
d G "sAN13" 2 363 "0x200000" "| B5"
d G "NO_ANALOGS" 2 364 "0" "None"
d G "ALL_ANALOG" 2 365 "0x1F00FF" "A0 A1 A2 A3 A5 E0 E1 E2 B0 B1 B2 B3 B4 B5"
d G "VSS_VDD" 2 368 "0x0000" "| Range 0-Vdd"
d G "VSS_VREF" 2 369 "0x1000" "| Range 0-Vref"
d G "VREF_VREF" 2 370 "0x3000" "| Range Vref-Vref"
d G "VREF_VDD" 2 371 "0x2000" "| Range Vref-Vdd"
d G "ADC_START_AND_READ" 2 375 "7" "This is the default if nothing is specified"
d G "ADC_START_ONLY" 2 376 "1"
d G "ADC_READ_ONLY" 2 377 "6"
d G "L_TO_H" 2 389 "0x40"
d G "H_TO_L" 2 390 "0"
d G "GLOBAL" 2 392 "0x0BC0"
d G "INT_RTCC" 2 393 "0x000B20"
d G "INT_RB" 2 394 "0x01FF0B08"
d G "INT_EXT_L2H" 2 395 "0x50000B10"
d G "INT_EXT_H2L" 2 396 "0x60000B10"
d G "INT_EXT" 2 397 "0x000B10"
d G "INT_AD" 2 398 "0x008C40"
d G "INT_TBE" 2 399 "0x008C10"
d G "INT_RDA" 2 400 "0x008C20"
d G "INT_TIMER1" 2 401 "0x008C01"
d G "INT_TIMER2" 2 402 "0x008C02"
d G "INT_CCP1" 2 403 "0x008C04"
d G "INT_CCP2" 2 404 "0x008D01"
d G "INT_SSP" 2 405 "0x008C08"
d G "INT_BUSCOL" 2 406 "0x008D08"
d G "INT_EEPROM" 2 407 "0x008D10"
d G "INT_TIMER0" 2 408 "0x000B20"
d G "INT_OSC_FAIL" 2 409 "0x008D80"
d G "INT_COMP" 2 410 "0x008D20"
d G "INT_COMP2" 2 411 "0x008D40"
d G "INT_ULPWU" 2 412 "0x008D04"
d G "INT_RB0" 2 413 "0x0010B08"
d G "INT_RB1" 2 414 "0x0020B08"
d G "INT_RB2" 2 415 "0x0040B08"
d G "INT_RB3" 2 416 "0x0080B08"
d G "INT_RB4" 2 417 "0x0100B08"
d G "INT_RB5" 2 418 "0x0200B08"
d G "INT_RB6" 2 419 "0x0400B08"
d G "INT_RB7" 2 420 "0x0800B08"
D G "EEPROM_SDA" 0 2 "PIN_B0"
D G "EEPROM_SCL" 0 3 "PIN_B1"
F G "main" 0 8 "void()"
C L "main" 0 18 1 "FUNCTION"
V L "STAV1" 0 22 "int8"
V L "data1" 0 23 "int8"
C L "main" 0 18 1 "FUNCTION"
V L "ack" 0 32 "int1"
C L "main" 0 18 1 "FUNCTION"
C L "main" 0 18 1 "FUNCTION"
F B "reset_cpu" 0 0
F B "abs" 1 0
F B "sleep_ulpwu" 1 0
F B "sleep" 0 0
F B "delay_cycles" 1 0
F B "read_bank" 2 0
F B "write_bank" 3 0
F B "shift_left" 2 2
F B "shift_right" 2 2
F B "rotate_left" 2 0
F B "rotate_right" 2 0
F B "_mul" 2 0
F B "memset" 3 0
F B "isamoung" 2 0
F B "isamong" 2 0
F B "bit_set" 2 0
F B "bit_clear" 2 0
F B "bit_test" 2 0
F B "toupper" 1 0
F B "tolower" 1 0
F B "swap" 1 0
F B "printf" 1 255
F B "fprintf" 1 255
F B "sprintf" 1 255
F B "make8" 2 0
F B "make16" 2 0
F B "make32" 1 255
F B "label_address" 1 1
F B "goto_address" 1 0
F B "_va_arg" 1 0
F B "offsetofbit" 2 2
F B "enable_interrupts" 1 0
F B "disable_interrupts" 1 0
F B "interrupt_active" 1 0
F B "clear_interrupt" 1 0
F B "jump_to_isr" 1 0
F B "ext_int_edge" 1 2
F B "read_eeprom" 1 0
F B "write_eeprom" 2 0
F B "read_program_eeprom" 1 0
F B "write_program_eeprom" 2 0
F B "write_program_memory" 4 0
F B "write_program_memory8" 4 0
F B "read_program_memory" 4 0
F B "read_program_memory8" 4 0
F B "erase_program_eeprom" 1 0
F B "strcpy" 2 0
F B "memcpy" 3 0
F B "strstr100" 2 0
F B "output_high" 1 0
F B "output_low" 1 0
F B "input" 1 0
F B "input_state" 1 0
F B "output_float" 1 0
F B "output_drive" 1 0
F B "output_bit" 1 1
F B "output_toggle" 1 0
F B "output_a" 1 0
F B "output_b" 1 0
F B "output_c" 1 0
F B "output_d" 1 0
F B "output_e" 1 0
F B "input_a" 0 0
F B "input_b" 0 0
F B "input_c" 0 0
F B "input_d" 0 0
F B "input_e" 0 0
F B "set_tris_a" 1 0
F B "set_tris_b" 1 0
F B "set_tris_c" 1 0
F B "set_tris_d" 1 0
F B "set_tris_e" 1 0
F B "get_tris_a" 0 0
F B "get_tris_b" 0 0
F B "get_tris_c" 0 0
F B "get_tris_d" 0 0
F B "get_tris_e" 0 0
F B "input_change_a" 0 0
F B "input_change_b" 0 0
F B "input_change_c" 0 0
F B "input_change_d" 0 0
F B "input_change_e" 0 0
F B "port_b_pullups" 1 0
F B "setup_counters" 2 0
F B "setup_wdt" 1 0
F B "restart_cause" 0 0
F B "restart_wdt" 0 0
F B "get_rtcc" 0 0
F B "set_rtcc" 1 0
F B "get_timer0" 0 0
F B "set_timer0" 1 0
F B "setup_comparator" 1 0
F B "setup_port_a" 1 0
F B "setup_adc_ports" 1 0
F B "setup_adc" 1 0
F B "set_adc_channel" 1 0
F B "read_adc" 0 1
F B "adc_done" 0 0
F B "setup_timer_0" 1 0
F B "setup_vref" 1 0
F B "setup_timer_1" 1 0
F B "get_timer1" 0 0
F B "set_timer1" 1 0
F B "setup_timer_2" 3 0
F B "get_timer2" 0 0
F B "set_timer2" 1 0
F B "setup_ccp1" 1 2
F B "set_pwm1_duty" 1 0
F B "setup_ccp2" 1 0
F B "set_pwm2_duty" 1 0
F B "setup_oscillator" 1 2
F B "setup_spi" 1 0
F B "spi_read" 0 1
F B "spi_write" 1 0
F B "spi_data_is_in" 0 0
F B "setup_spi2" 1 0
F B "spi_read2" 0 1
F B "spi_write2" 1 0
F B "spi_data_is_in2" 0 0
F B "brownout_enable" 1 0
F B "delay_ms" 1 0
F B "delay_us" 1 0
F B "i2c_read" 0 2
F B "i2c_write" 1 2
F B "i2c_start" 0 2
F B "i2c_stop" 0 1
F B "i2c_isr_state" 0 1
F B "putchar" 1 2
F B "puts" 1 2
F B "getch" 0 1
F B "gets" 1 3
F B "kbhit" 0 1
/Modules/Sensors/IMU01A/SW/PIC16F887/Gyroskop/main.h
0,0 → 1,19
#include <16F887.h>
#device adc=8
 
#FUSES NOWDT //No Watch Dog Timer
#FUSES INTRC //Internal RC Osc
#FUSES NOPUT //No Power Up Timer
#FUSES MCLR //Master Clear pin enabled
#FUSES NOPROTECT //Code not protected from reading
#FUSES NOCPD //No EE protection
#FUSES NOBROWNOUT //No brownout reset
#FUSES IESO //Internal External Switch Over mode enabled
#FUSES FCMEN //Fail-safe clock monitor enabled
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NODEBUG //No Debug mode for ICD
#FUSES NOWRT //Program memory not write protected
#FUSES BORV40 //Brownout reset at 4.0V
 
#use delay(clock=8000000)
 
/Modules/Sensors/IMU01A/SW/PIC16F887/Gyroskop/main.hex
0,0 → 1,112
:1000000001308A00E1290000D3346D38EC32202A17
:10001000E832F236EF36653AE8327210A0060A008E
:10002000533A613B3A10253220147039EF3165376D
:10003000F430A9060A00533A613B3A1025322014E5
:100040007039EF316537F430A9060A00533A613B45
:100050003A10253275147039EF316537F430A9063E
:100060000A0083168611831286110830F80038289A
:100070000000F8174928F813AB0C03188615031C69
:100080008611781749287813F80B3C284728000078
:1000900086153F308400840B4B280000F81B3B285A
:1000A000781B43280800831603178C170C140000D4
:1000B000000083120C087F39031997280313A4004A
:1000C00003170D080313A50003170F080313A60059
:1000D0002408AB003120250803178D0003132608E0
:1000E00003178F0083168C170C1400000000831276
:1000F0000C0D0E0D7F39031997280313A400031765
:100100000D080313A50003170F080313A600240806
:10011000AB003120250803178D00031326080317B1
:100120008F008D0A03198F0A031353280317031333
:100130008A110A12492A0830F80000008610831636
:10014000861000008312A40D0610031CAA28831633
:10015000061483120318AF28831606108312831621
:1001600086148312861CB228F80B9D280000861086
:100170008316861000000614000000008614831207
:10018000861CC028F8010000061878148610831613
:10019000861083120610831606108312080008309A
:1001A000A5007708A60083160614000086148312A3
:1001B000861CD82806180314061C0310F80D00002E
:1001C0008316861083128610A50BD3288316061477
:1001D00000008312061026080319F1288316061062
:1001E00083120000831686148312861CF5280000F3
:1001F00086108316861000008312061083160610E0
:1002000083120800831603178C170C1400000000DB
:100210000318312983120C087F390313A600031732
:100220000D080313A70003170F080313A8002608DF
:10023000AB003120270803178D000313280803178C
:100240008F0083168C170C14000000008312031318
:10025000A50B2B292E298316031731295029831624
:10026000031783120C0D0E0D7F390313A60003171D
:100270000D080313A70003170F080313A80026088F
:10028000AB003120270803178D000313280803173C
:100290008F008D0A03198F0A03100313A50B02297F
:1002A00008002C08F8012B02031859292B08F70025
:1002B0006529F7010830AD00AB0DF70D2C0877026A
:1002C0000318F700F80DAD0B5C2908002030261E3E
:1002D0003030A7002508F700A51F7529F709F70A90
:1002E0007708A5002D30A700A6172508AB006430BD
:1002F000AC0051217708A50030307807A800250808
:10030000AB000A30AC00512130307707AA00303002
:100310007807A9002708F700A61D9029A61F261117
:10032000261A9D29A61FB8292619B8297708A800DA
:10033000A618B8297708A900B82930302802031D6B
:10034000B8297708A8002030A700A61DAB292611E0
:10035000A614A61FA61030302902031DB82977085D
:10036000A9002030A800A61DAB29A610A61F2610A4
:10037000261DBD292708AB003120A61CC22928084C
:10038000AB003120261CC7292908AB0031202A08E0
:10039000AB003120080025308400831300080319C6
:1003A000DE290230F800F701F70BD429F80BD32926
:1003B0009730F700F70BDA29800BD1298A110A123E
:1003C000572B840183131F308305713083168F00F0
:1003D0000F08861183128615831603170908C03982
:1003E000890003131F129F12003003178800831225
:1003F000870188018901FF300313A00083160317CA
:100400000908C039890003131F129F120030031717
:100410008800831203131F139F1383169F138312E5
:100420001F149412A012200883168700831220162E
:100430002008831687008312A011200883168700E6
:100440000130831294000030831694000108C739EC
:1004500008388100831290010030F80092000030CB
:1004600083169200831220152008831687008312BA
:10047000970183169B019C0101309D008312031795
:1004800087018801890104308D0000308F0003133B
:1004900053288316061400008614000083120610E9
:1004A0008316061000008312861083168610D13042
:1004B0008312A4009B207808231078182314831635
:1004C0000610000086148312861C642A0000682A25
:1004D000000083160614000001308312A306831661
:1004E0000610000086148312861C742A0000782AE5
:1004F0000000831606140000061400008614000095
:1005000083120610831606100000831286108316CD
:100510008610D0308312A4009B202830A4009B209A
:1005200083160610000086148312861C952A00008C
:10053000992A000083160614000006140000861491
:100540000000831206108316061000008312861026
:1005500083168610D1308312A4009B20F701CF2090
:100560007808A10083160610000086148312861CEA
:10057000B72A0000BB2A00008316061400000614E8
:100580000000861400008312061083160610000077
:100590008312861083168610D0308312A4009B200D
:1005A0000F30A4009B2083160610000086148312CF
:1005B000861CD82A0000DC2A0000831606140000DE
:1005C000061400008614000083120610831606101D
:1005D00000008312861083168610D1308312A40087
:1005E0009B20F701CF207808A20083160610000098
:1005F00086148312861CFA2A0000FE2A0000831645
:10060000061400000030831223180130A4001030BB
:1006100003178D0000308F00031006300313A50070
:1006200002212408A5001F30A600662114300317FC
:100630008D0000308F0003100D300313A500022140
:100640001B3003178D0000308F000310063003139A
:10065000A50002212108A5001F30A60066211F3039
:1006600003178D0000308F0003100D300313A50019
:100670000221263003178D0000308F000310063052
:100680000313A50002212208A5001F30A600662141
:100690002A3003178D0000308F0003100D30031334
:1006A000A50002210830A400FA30A500CB29A40B34
:0606B000542B492A6300EF
:04400E00F52CFF3F4F
:00000001FF
;PIC16F887
;CRC=CFC6 CREATED="02-4-13 10:53"
/Modules/Sensors/IMU01A/SW/PIC16F887/Gyroskop/main.lst
0,0 → 1,652
CCS PCM C Compiler, Version 4.106, 47914 02-4-13 10:53
 
Filename: C:\Users\Honza\Documents\pic\I2C_gyrsokop\main.lst
 
ROM used: 859 words (10%)
Largest free fragment is 2048
RAM used: 7 (2%) at main() level
19 (5%) worst case
Stack: 2 locations
 
*
0000: MOVLW 01
0001: MOVWF 0A
0002: GOTO 1E1
0003: NOP
.................... #include "C:\Users\Honza\Documents\pic\I2C_magnetometr\main.h"
.................... #include <16F887.h>
.................... //////// Standard Header file for the PIC16F887 device ////////////////
.................... #device PIC16F887
.................... #list
....................
.................... #device adc=8
....................
.................... #FUSES NOWDT //No Watch Dog Timer
.................... #FUSES INTRC //Internal RC Osc
.................... #FUSES NOPUT //No Power Up Timer
.................... #FUSES MCLR //Master Clear pin enabled
.................... #FUSES NOPROTECT //Code not protected from reading
.................... #FUSES NOCPD //No EE protection
.................... #FUSES NOBROWNOUT //No brownout reset
.................... #FUSES IESO //Internal External Switch Over mode enabled
.................... #FUSES FCMEN //Fail-safe clock monitor enabled
.................... #FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
.................... #FUSES NODEBUG //No Debug mode for ICD
.................... #FUSES NOWRT //Program memory not write protected
.................... #FUSES BORV40 //Brownout reset at 4.0V
....................
.................... #use delay(clock=8000000)
*
01CB: MOVLW 25
01CC: MOVWF 04
01CD: BCF 03.7
01CE: MOVF 00,W
01CF: BTFSC 03.2
01D0: GOTO 1DE
01D1: MOVLW 02
01D2: MOVWF 78
01D3: CLRF 77
01D4: DECFSZ 77,F
01D5: GOTO 1D4
01D6: DECFSZ 78,F
01D7: GOTO 1D3
01D8: MOVLW 97
01D9: MOVWF 77
01DA: DECFSZ 77,F
01DB: GOTO 1DA
01DC: DECFSZ 00,F
01DD: GOTO 1D1
01DE: BCF 0A.3
01DF: BCF 0A.4
01E0: GOTO 357 (RETURN)
....................
....................
.................... #define EEPROM_SDA PIN_B0
.................... #define EEPROM_SCL PIN_B1
.................... #use i2c(master, sda=EEPROM_SDA, scl=EEPROM_SCL)
*
009B: MOVLW 08
009C: MOVWF 78
009D: NOP
009E: BCF 06.1
009F: BSF 03.5
00A0: BCF 06.1
00A1: NOP
00A2: BCF 03.5
00A3: RLF 24,F
00A4: BCF 06.0
00A5: BTFSS 03.0
00A6: GOTO 0AA
00A7: BSF 03.5
00A8: BSF 06.0
00A9: BCF 03.5
00AA: BTFSC 03.0
00AB: GOTO 0AF
00AC: BSF 03.5
00AD: BCF 06.0
00AE: BCF 03.5
00AF: BSF 03.5
00B0: BSF 06.1
00B1: BCF 03.5
00B2: BTFSS 06.1
00B3: GOTO 0B2
00B4: DECFSZ 78,F
00B5: GOTO 09D
00B6: NOP
00B7: BCF 06.1
00B8: BSF 03.5
00B9: BCF 06.1
00BA: NOP
00BB: BSF 06.0
00BC: NOP
00BD: NOP
00BE: BSF 06.1
00BF: BCF 03.5
00C0: BTFSS 06.1
00C1: GOTO 0C0
00C2: CLRF 78
00C3: NOP
00C4: BTFSC 06.0
00C5: BSF 78.0
00C6: BCF 06.1
00C7: BSF 03.5
00C8: BCF 06.1
00C9: BCF 03.5
00CA: BCF 06.0
00CB: BSF 03.5
00CC: BCF 06.0
00CD: BCF 03.5
00CE: RETURN
00CF: MOVLW 08
00D0: MOVWF 25
00D1: MOVF 77,W
00D2: MOVWF 26
00D3: BSF 03.5
00D4: BSF 06.0
00D5: NOP
00D6: BSF 06.1
00D7: BCF 03.5
00D8: BTFSS 06.1
00D9: GOTO 0D8
00DA: BTFSC 06.0
00DB: BSF 03.0
00DC: BTFSS 06.0
00DD: BCF 03.0
00DE: RLF 78,F
00DF: NOP
00E0: BSF 03.5
00E1: BCF 06.1
00E2: BCF 03.5
00E3: BCF 06.1
00E4: DECFSZ 25,F
00E5: GOTO 0D3
00E6: BSF 03.5
00E7: BSF 06.0
00E8: NOP
00E9: BCF 03.5
00EA: BCF 06.0
00EB: MOVF 26,W
00EC: BTFSC 03.2
00ED: GOTO 0F1
00EE: BSF 03.5
00EF: BCF 06.0
00F0: BCF 03.5
00F1: NOP
00F2: BSF 03.5
00F3: BSF 06.1
00F4: BCF 03.5
00F5: BTFSS 06.1
00F6: GOTO 0F5
00F7: NOP
00F8: BCF 06.1
00F9: BSF 03.5
00FA: BCF 06.1
00FB: NOP
00FC: BCF 03.5
00FD: BCF 06.0
00FE: BSF 03.5
00FF: BCF 06.0
0100: BCF 03.5
0101: RETURN
.................... #use rs232(baud=9600,parity=N,xmit=PIN_B3,rcv=PIN_B2,bits=8) //rcv TXD xmit RXD
*
0031: BSF 03.5
0032: BCF 06.3
0033: BCF 03.5
0034: BCF 06.3
0035: MOVLW 08
0036: MOVWF 78
0037: GOTO 038
0038: NOP
0039: BSF 78.7
003A: GOTO 049
003B: BCF 78.7
003C: RRF 2B,F
003D: BTFSC 03.0
003E: BSF 06.3
003F: BTFSS 03.0
0040: BCF 06.3
0041: BSF 78.6
0042: GOTO 049
0043: BCF 78.6
0044: DECFSZ 78,F
0045: GOTO 03C
0046: GOTO 047
0047: NOP
0048: BSF 06.3
0049: MOVLW 3F
004A: MOVWF 04
004B: DECFSZ 04,F
004C: GOTO 04B
004D: NOP
004E: BTFSC 78.7
004F: GOTO 03B
0050: BTFSC 78.6
0051: GOTO 043
0052: RETURN
....................
....................
.................... void main()
.................... {
*
01E1: CLRF 04
01E2: BCF 03.7
01E3: MOVLW 1F
01E4: ANDWF 03,F
01E5: MOVLW 71
01E6: BSF 03.5
01E7: MOVWF 0F
01E8: MOVF 0F,W
01E9: BCF 06.3
01EA: BCF 03.5
01EB: BSF 06.3
01EC: BSF 03.5
01ED: BSF 03.6
01EE: MOVF 09,W
01EF: ANDLW C0
01F0: MOVWF 09
01F1: BCF 03.6
01F2: BCF 1F.4
01F3: BCF 1F.5
01F4: MOVLW 00
01F5: BSF 03.6
01F6: MOVWF 08
01F7: BCF 03.5
01F8: CLRF 07
01F9: CLRF 08
01FA: CLRF 09
....................
.................... setup_adc_ports(NO_ANALOGS|VSS_VDD);
*
01FE: BSF 03.5
01FF: BSF 03.6
0200: MOVF 09,W
0201: ANDLW C0
0202: MOVWF 09
0203: BCF 03.6
0204: BCF 1F.4
0205: BCF 1F.5
0206: MOVLW 00
0207: BSF 03.6
0208: MOVWF 08
.................... setup_adc(ADC_CLOCK_DIV_2);
0209: BCF 03.5
020A: BCF 03.6
020B: BCF 1F.6
020C: BCF 1F.7
020D: BSF 03.5
020E: BCF 1F.7
020F: BCF 03.5
0210: BSF 1F.0
.................... setup_spi(SPI_SS_DISABLED);
0211: BCF 14.5
0212: BCF 20.5
0213: MOVF 20,W
0214: BSF 03.5
0215: MOVWF 07
0216: BCF 03.5
0217: BSF 20.4
0218: MOVF 20,W
0219: BSF 03.5
021A: MOVWF 07
021B: BCF 03.5
021C: BCF 20.3
021D: MOVF 20,W
021E: BSF 03.5
021F: MOVWF 07
0220: MOVLW 01
0221: BCF 03.5
0222: MOVWF 14
0223: MOVLW 00
0224: BSF 03.5
0225: MOVWF 14
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
0226: MOVF 01,W
0227: ANDLW C7
0228: IORLW 08
0229: MOVWF 01
.................... setup_timer_1(T1_DISABLED);
022A: BCF 03.5
022B: CLRF 10
.................... setup_timer_2(T2_DISABLED,0,1);
022C: MOVLW 00
022D: MOVWF 78
022E: MOVWF 12
022F: MOVLW 00
0230: BSF 03.5
0231: MOVWF 12
.................... setup_ccp1(CCP_OFF);
0232: BCF 03.5
0233: BSF 20.2
0234: MOVF 20,W
0235: BSF 03.5
0236: MOVWF 07
0237: BCF 03.5
0238: CLRF 17
0239: BSF 03.5
023A: CLRF 1B
023B: CLRF 1C
023C: MOVLW 01
023D: MOVWF 1D
.................... setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard
023E: BCF 03.5
023F: BSF 03.6
0240: CLRF 07
0241: CLRF 08
0242: CLRF 09
....................
.................... printf("Simple Thermomether \r\n",);
0243: MOVLW 04
0244: MOVWF 0D
0245: MOVLW 00
0246: MOVWF 0F
0247: BCF 03.6
0248: GOTO 053
....................
.................... int STAV1;
.................... unsigned int data1;
....................
....................
.................... while(TRUE)
.................... {
....................
....................
....................
.................... //akcelerometr
.................... int1 ack;
.................... i2c_start(); // If the write command is acknowledged,
0249: BSF 03.5
024A: BSF 06.0
024B: NOP
024C: BSF 06.1
024D: NOP
024E: BCF 03.5
024F: BCF 06.0
0250: BSF 03.5
0251: BCF 06.0
0252: NOP
0253: BCF 03.5
0254: BCF 06.1
0255: BSF 03.5
0256: BCF 06.1
.................... ack = i2c_write(0xD1);// then the device is ready.
0257: MOVLW D1
0258: BCF 03.5
0259: MOVWF 24
025A: CALL 09B
025B: MOVF 78,W
025C: BCF 23.0
025D: BTFSC 78.0
025E: BSF 23.0
.................... i2c_stop();
025F: BSF 03.5
0260: BCF 06.0
0261: NOP
0262: BSF 06.1
0263: BCF 03.5
0264: BTFSS 06.1
0265: GOTO 264
0266: NOP
0267: GOTO 268
0268: NOP
0269: BSF 03.5
026A: BSF 06.0
026B: NOP
.................... ack=!ack;
026C: MOVLW 01
026D: BCF 03.5
026E: XORWF 23,F
....................
....................
....................
.................... i2c_stop();
026F: BSF 03.5
0270: BCF 06.0
0271: NOP
0272: BSF 06.1
0273: BCF 03.5
0274: BTFSS 06.1
0275: GOTO 274
0276: NOP
0277: GOTO 278
0278: NOP
0279: BSF 03.5
027A: BSF 06.0
027B: NOP
....................
.................... i2c_start();
027C: BSF 06.0
027D: NOP
027E: BSF 06.1
027F: NOP
0280: BCF 03.5
0281: BCF 06.0
0282: BSF 03.5
0283: BCF 06.0
0284: NOP
0285: BCF 03.5
0286: BCF 06.1
0287: BSF 03.5
0288: BCF 06.1
.................... I2C_Write(0xD0);
0289: MOVLW D0
028A: BCF 03.5
028B: MOVWF 24
028C: CALL 09B
.................... I2C_write(0x28);
028D: MOVLW 28
028E: MOVWF 24
028F: CALL 09B
.................... i2c_stop();
0290: BSF 03.5
0291: BCF 06.0
0292: NOP
0293: BSF 06.1
0294: BCF 03.5
0295: BTFSS 06.1
0296: GOTO 295
0297: NOP
0298: GOTO 299
0299: NOP
029A: BSF 03.5
029B: BSF 06.0
029C: NOP
.................... i2c_start();
029D: BSF 06.0
029E: NOP
029F: BSF 06.1
02A0: NOP
02A1: BCF 03.5
02A2: BCF 06.0
02A3: BSF 03.5
02A4: BCF 06.0
02A5: NOP
02A6: BCF 03.5
02A7: BCF 06.1
02A8: BSF 03.5
02A9: BCF 06.1
.................... I2C_Write(0xD1);
02AA: MOVLW D1
02AB: BCF 03.5
02AC: MOVWF 24
02AD: CALL 09B
.................... STAV1=i2c_read(0);
02AE: CLRF 77
02AF: CALL 0CF
02B0: MOVF 78,W
02B1: MOVWF 21
.................... i2c_stop();
02B2: BSF 03.5
02B3: BCF 06.0
02B4: NOP
02B5: BSF 06.1
02B6: BCF 03.5
02B7: BTFSS 06.1
02B8: GOTO 2B7
02B9: NOP
02BA: GOTO 2BB
02BB: NOP
02BC: BSF 03.5
02BD: BSF 06.0
02BE: NOP
....................
.................... i2c_start();
02BF: BSF 06.0
02C0: NOP
02C1: BSF 06.1
02C2: NOP
02C3: BCF 03.5
02C4: BCF 06.0
02C5: BSF 03.5
02C6: BCF 06.0
02C7: NOP
02C8: BCF 03.5
02C9: BCF 06.1
02CA: BSF 03.5
02CB: BCF 06.1
.................... I2C_Write(0xD0);
02CC: MOVLW D0
02CD: BCF 03.5
02CE: MOVWF 24
02CF: CALL 09B
.................... I2C_write(0x0F);
02D0: MOVLW 0F
02D1: MOVWF 24
02D2: CALL 09B
.................... i2c_stop();
02D3: BSF 03.5
02D4: BCF 06.0
02D5: NOP
02D6: BSF 06.1
02D7: BCF 03.5
02D8: BTFSS 06.1
02D9: GOTO 2D8
02DA: NOP
02DB: GOTO 2DC
02DC: NOP
02DD: BSF 03.5
02DE: BSF 06.0
02DF: NOP
.................... i2c_start();
02E0: BSF 06.0
02E1: NOP
02E2: BSF 06.1
02E3: NOP
02E4: BCF 03.5
02E5: BCF 06.0
02E6: BSF 03.5
02E7: BCF 06.0
02E8: NOP
02E9: BCF 03.5
02EA: BCF 06.1
02EB: BSF 03.5
02EC: BCF 06.1
.................... I2C_Write(0xD1);
02ED: MOVLW D1
02EE: BCF 03.5
02EF: MOVWF 24
02F0: CALL 09B
.................... data1=i2c_read(0);
02F1: CLRF 77
02F2: CALL 0CF
02F3: MOVF 78,W
02F4: MOVWF 22
.................... i2c_stop();
02F5: BSF 03.5
02F6: BCF 06.0
02F7: NOP
02F8: BSF 06.1
02F9: BCF 03.5
02FA: BTFSS 06.1
02FB: GOTO 2FA
02FC: NOP
02FD: GOTO 2FE
02FE: NOP
02FF: BSF 03.5
0300: BSF 06.0
0301: NOP
....................
....................
....................
....................
....................
.................... printf("Stav: %d (procenta)\r\n", ack);
0302: MOVLW 00
0303: BCF 03.5
0304: BTFSC 23.0
0305: MOVLW 01
0306: MOVWF 24
0307: MOVLW 10
0308: BSF 03.6
0309: MOVWF 0D
030A: MOVLW 00
030B: MOVWF 0F
030C: BCF 03.0
030D: MOVLW 06
030E: BCF 03.6
030F: MOVWF 25
0310: CALL 102
0311: MOVF 24,W
0312: MOVWF 25
0313: MOVLW 1F
0314: MOVWF 26
0315: CALL 166
0316: MOVLW 14
0317: BSF 03.6
0318: MOVWF 0D
0319: MOVLW 00
031A: MOVWF 0F
031B: BCF 03.0
031C: MOVLW 0D
031D: BCF 03.6
031E: MOVWF 25
031F: CALL 102
.................... printf("Stav: %d (procenta)\r\n", STAV1);
0320: MOVLW 1B
0321: BSF 03.6
0322: MOVWF 0D
0323: MOVLW 00
0324: MOVWF 0F
0325: BCF 03.0
0326: MOVLW 06
0327: BCF 03.6
0328: MOVWF 25
0329: CALL 102
032A: MOVF 21,W
032B: MOVWF 25
032C: MOVLW 1F
032D: MOVWF 26
032E: CALL 166
032F: MOVLW 1F
0330: BSF 03.6
0331: MOVWF 0D
0332: MOVLW 00
0333: MOVWF 0F
0334: BCF 03.0
0335: MOVLW 0D
0336: BCF 03.6
0337: MOVWF 25
0338: CALL 102
.................... printf("Stav: %du(procenta)\r\n", data1);
0339: MOVLW 26
033A: BSF 03.6
033B: MOVWF 0D
033C: MOVLW 00
033D: MOVWF 0F
033E: BCF 03.0
033F: MOVLW 06
0340: BCF 03.6
0341: MOVWF 25
0342: CALL 102
0343: MOVF 22,W
0344: MOVWF 25
0345: MOVLW 1F
0346: MOVWF 26
0347: CALL 166
0348: MOVLW 2A
0349: BSF 03.6
034A: MOVWF 0D
034B: MOVLW 00
034C: MOVWF 0F
034D: BCF 03.0
034E: MOVLW 0D
034F: BCF 03.6
0350: MOVWF 25
0351: CALL 102
.................... delay_ms (2000);
0352: MOVLW 08
0353: MOVWF 24
0354: MOVLW FA
0355: MOVWF 25
0356: GOTO 1CB
0357: DECFSZ 24,F
0358: GOTO 354
....................
.................... }
0359: GOTO 249
.................... }
035A: SLEEP
 
Configuration Fuses:
Word 1: 2CF5 INTRC NOWDT NOPUT MCLR NOPROTECT NOCPD NOBROWNOUT IESO FCMEN NOLVP NODEBUG
Word 2: 3FFF NOWRT BORV40
/Modules/Sensors/IMU01A/SW/PIC16F887/Gyroskop/main.pjt
0,0 → 1,24
[PROJECT]
Target=C:\Users\Honza\Documents\pic\I2C_gyrsokop\main.hex
Development_Mode=
Processor_Text=PIC16F887
ToolSuite=CCS
Processor=0x887F
[C:\Users\Honza\Documents\pic\I2C_gyrsokop\main]
Type=4
Path=
FileList=
BuildTool=
OptionString=
AdditionalOptionString=
[mru-list]
1=C:\Users\Honza\Documents\pic\I2C_gyrsokop\main.c
[Windows]
0=0000 %S 0 0 796 451 3 0
[Units]
Link=0
Count=1
1=C:\Users\Honza\Documents\pic\I2C_gyrsokop\main
[Opened Files]
1=main.c
2=
/Modules/Sensors/IMU01A/SW/PIC16F887/Gyroskop/main.sta
0,0 → 1,58
 
ROM used: 859 (10%)
859 (10%) including unused fragments
 
2 Average locations per line
23 Average locations per statement
 
RAM used: 7 (2%) at main() level
19 (5%) worst case
 
Stack used: 2 worst case (out of 8 total available)
 
Lines Stmts % Files
----- ----- --- -----
71 37 100 main.c
20 0 0 ..\I2C_magnetometr\main.h
423 0 0 ..\..\..\..\..\Program Files (x86)\PICC\devices\16F887.h
----- -----
514 37 Total
 
Page ROM % RAM Vol Diff Functions:
---- --- --- --- --- ---- ----------
0 22 3 1 @delay_ms1
0 51 6 3 @I2C_READ_1
0 52 6 1 @I2C_WRITE_1
0 34 4 1 @PUTCHAR_1_
0 378 44 1 1045 3.9 main
0 12 1 0 @const78
0 72 8 3 @PSTRINGC7_68
0 11 1 0 @const83
0 79 9 4 @PSTRINGCN7_68
0 21 2 3 @DIV88
0 101 12 6 @PRINTF_D_68
0 11 1 0 @const92
0 11 1 0 @const93
 
Program metrics:
Functions 1
Statements 37
Comments 87
Volume (V) 1076
Difficilty (D) 3.4
Effort to implement (E) 3626
Time to implement (T) 3 minutes
Est Delivered Bugs (B) 0
Cyclomatic Complexity 1
Maintainability (MI) 124
 
Segment Used Free
----------- ---- ----
00000-00003 4 0
00004-007FF 855 1189
00800-00FFF 0 2048
01000-017FF 0 2048
01800-01FFF 0 2048
 
 
 
/Modules/Sensors/IMU01A/SW/PIC16F887/Gyroskop/main.sym
0,0 → 1,95
004 @WRITE_PROGRAM_MEMORY8.P1
004-005 @READ_PROGRAM_MEMORY8.P2
015 CCP_1_LOW
015 CCP_1
016 CCP_1_HIGH
01B CCP_2
01B CCP_2_LOW
01C CCP_2_HIGH
020 @TRIS_C
021 main.STAV1
022 main.data1
023.0 ack
024 @I2C_READ_1.P1
024 @I2C_WRITE_1.P2
024 main.@SCRATCH1
024 @PSTRINGC7_68.@SCRATCH1
025 @delay_ms1.P1
025 @PRINTF_D_68.P2
025 @PSTRINGCN7_68.P3
025 @I2C_READ_1.@SCRATCH1
025 @PSTRINGC7_68.@SCRATCH2
026 @PRINTF_D_68.P1
026 @I2C_READ_1.@SCRATCH2
026 @PSTRINGC7_68.@SCRATCH3
026 @PSTRINGCN7_68.@SCRATCH1
027 @PSTRINGCN7_68.@SCRATCH2
027 @PRINTF_D_68.@SCRATCH1
028 @PSTRINGCN7_68.@SCRATCH3
028 @PRINTF_D_68.@SCRATCH2
029 @PRINTF_D_68.@SCRATCH3
02A @PRINTF_D_68.@SCRATCH4
02B @PUTCHAR_1_.P1
02B @DIV88.P2
02C @DIV88.P1
02D @DIV88.@SCRATCH1
077 @SCRATCH
078 @SCRATCH
078 _RETURN_
079 @SCRATCH
07A @SCRATCH
107.6 C1OUT
108.6 C2OUT
10D-10E @READ_PROGRAM_MEMORY8.P1
10D-10E @WRITE_PROGRAM_MEMORY8.P2
 
ROM Allocation:
01CB @delay_ms1
00CF @I2C_READ_1
009B @I2C_WRITE_1
0031 @PUTCHAR_1_
01E1 main
0004 @const78
0053 @PSTRINGC7_68
0010 @const83
0102 @PSTRINGCN7_68
0151 @DIV88
0166 @PRINTF_D_68
001B @const92
0026 @const93
01E1 @cinit
 
 
User Memory space:
 
User Memory space:
 
Project Directory:
C:\Users\Honza\Documents\pic\I2C_gyrsokop\
 
Project Files:
main.c
..\I2C_magnetometr\main.h
..\..\..\..\..\Program Files (x86)\PICC\devices\16F887.h
 
Units:
C:\Users\Honza\Documents\pic\I2C_gyrsokop\main (main)
 
Compiler Settings:
Processor: PIC16F887
Pointer Size: 16
ADC Range: 0-255
Opt Level: 9
Short,Int,Long: UNSIGNED: 1,8,16
Float,Double: 32,32
 
Output Files:
Errors: main.err
Ext Symbols: main.esym
INHX8: main.hex
Symbols: main.sym
List: main.lst
Debug/COFF: main.cof
Project: main.PJT
Call Tree: main.tre
Statistics: main.sta
/Modules/Sensors/IMU01A/SW/PIC16F887/Gyroskop/main.tre
0,0 → 1,55
ÀÄmain
ÀÄmain 0/378 Ram=1
ÃÄ??0??
ÃÄ@PSTRINGC7_68 0/72 Ram=3
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@I2C_WRITE_1 0/52 Ram=1
ÃÄ@I2C_WRITE_1 0/52 Ram=1
ÃÄ@I2C_WRITE_1 0/52 Ram=1
ÃÄ@I2C_WRITE_1 0/52 Ram=1
ÃÄ@I2C_READ_1 0/51 Ram=3
ÃÄ@I2C_WRITE_1 0/52 Ram=1
ÃÄ@I2C_WRITE_1 0/52 Ram=1
ÃÄ@I2C_WRITE_1 0/52 Ram=1
ÃÄ@I2C_READ_1 0/51 Ram=3
ÃÄ@PSTRINGCN7_68 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PRINTF_D_68 0/101 Ram=6
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PSTRINGCN7_68 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PSTRINGCN7_68 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PRINTF_D_68 0/101 Ram=6
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PSTRINGCN7_68 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PSTRINGCN7_68 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PRINTF_D_68 0/101 Ram=6
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄ@DIV88 0/21 Ram=3
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PSTRINGCN7_68 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÀÄ@delay_ms1 0/22 Ram=1