No changes between revisions
/Modules/HumanInterfaces/TOUCHBOARD01A/SW/PIC16F887/main.bak
0,0 → 1,47
#include "D:\Honza\MLAB\Modules\HumanInterfaces\TOUCHBOARD01A\SW\PIC16F887\main.h"
#define S_SDA PIN_C3
#define S_SCL PIN_C4
#use i2c(master, sda=S_SDA, scl=S_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=0;
i2c_start(); // If the write command is acknowledged,
ack = i2c_write(0xB5);// then the device is ready.
i2c_stop();
ack=!ack;
 
 
printf("Stav: %d (procenta)\r\n", ack);
//printf("Stav: %d (procenta)\r\n", STAV1);
delay_ms(500);
}
}
/Modules/HumanInterfaces/TOUCHBOARD01A/SW/PIC16F887/main.c
0,0 → 1,66
#include "D:\Honza\MLAB\Modules\HumanInterfaces\TOUCHBOARD01A\SW\PIC16F887\main.h"
#define S_SDA PIN_C3
#define S_SCL PIN_C4
#use i2c(master, sda=S_SDA, scl=S_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",);
 
unsigned int STAV1;
unsigned int data1;
 
while(TRUE)
{
 
 
//akcelerometr
int1 ack=0;
i2c_start(); // If the write command is acknowledged,
ack = i2c_write(0xB5);// then the device is ready.
i2c_stop();
ack=!ack;
i2c_stop();
 
i2c_start();
I2C_Write(0xB4);
I2C_write(0x00);
i2c_stop();
i2c_start();
I2C_Write(0xB5);
STAV1=i2c_read(0);
i2c_stop();
 
i2c_start();
I2C_Write(0xB4);
I2C_write(0x01);
i2c_stop();
i2c_start();
I2C_Write(0xB5);
data1=i2c_read(0);
i2c_stop();
 
 
printf("Stav: %d (procenta)\r\n", ack);
printf("Stav00: %d (procenta)\r\n", STAV1);
printf("Stav01: %d (procenta)\r\n", data1);
delay_ms(500);
}
}
/Modules/HumanInterfaces/TOUCHBOARD01A/SW/PIC16F887/main.cof
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Modules/HumanInterfaces/TOUCHBOARD01A/SW/PIC16F887/main.err
0,0 → 1,2
Memory usage: ROM=12% RAM=2% - 5%
0 Errors, 0 Warnings.
/Modules/HumanInterfaces/TOUCHBOARD01A/SW/PIC16F887/main.esym
0,0 → 1,417
D G "__PCM__" 0 49 ""4.106""
D G "__DEVICE__" 0 49 "887"
D G "__DATE__" 0 49 ""25-6-13""
D G "__TIME__" 0 49 ""09:31:57"" "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 "S_SDA" 0 2 "PIN_C3"
D G "S_SCL" 0 3 "PIN_C4"
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/HumanInterfaces/TOUCHBOARD01A/SW/PIC16F887/main.h
0,0 → 1,19
#include <16F887.h>
#device adc=8
 
#FUSES NOWDT //No Watch Dog Timer
#FUSES INTRC_IO //Internal RC Osc, no CLKOUT
#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/HumanInterfaces/TOUCHBOARD01A/SW/PIC16F887/main.hex
0,0 → 1,130
:1000000002308A000B2A0000D3346D38EC32202AEB
:10001000E832F236EF36653AE8327210A0060A008E
:10002000533A613B3A10253220147039EF3165376D
:10003000F430A9060A00533A613B30183A102532D1
:1000400020147039EF316537F430A9060A00533AAD
:10005000613BB0183A10253220147039EF31653702
:10006000F430A9060A00831686118312861108301F
:10007000F8003A280000F8174B28F813AB0C0318C7
:100080008615031C861178174B287813F80B3E2829
:100090004928000086153F308400840B4D2800005D
:1000A000F81B3D28781B45280800831603178C177A
:1000B0000C140000000083120C087F3903199928E2
:1000C0000313A40003170D080313A50003170F085B
:1000D0000313A6002408AB003320250803178D0066
:1000E0000313260803178F0083168C170C140000C7
:1000F000000083120C0D0E0D7F390319992803138C
:10010000A40003170D080313A50003170F0803131A
:10011000A6002408AB003320250803178D00031325
:10012000260803178F008D0A03198F0A0313552819
:10013000031703138A110A12732A0830F80000000B
:100140000712201220088316870000008312A40DD6
:100150008711031CB128A015200883168700B52835
:100160008312A01120088316870000008312201636
:100170002008831687008312071EBC28F80B9F28CF
:100180000000071220122008831687000000831247
:10019000A015200883168700000000008312201697
:1001A0002008831687008312071ED428F801000058
:1001B00087197814071220122008831687008312EB
:1001C0008711A011200883168700831208000830C9
:1001D000A5007708A600A015200883168700000058
:1001E000831220162008831687008312071EF62824
:1001F00087190314871D0310F80D00002012200832
:100200008316870083120712A50BEB28A015200880
:100210008316870000008312871126080319152909
:10022000A0112008831687008312000020162008E2
:10023000831687008312071E1B2900000712201255
:10024000200883168700000083128711A011200860
:100250008316870083120800831603178C170C146B
:100260000000000003185B2983120C087F39031378
:10027000A60003170D080313A70003170F080313A5
:10028000A8002608AB003320270803178D000313AE
:10029000280803178F0083168C170C140000000029
:1002A00083120313A50B55295829831603175B29BD
:1002B0007A298316031783120C0D0E0D7F39031351
:1002C000A60003170D080313A70003170F08031355
:1002D000A8002608AB003320270803178D0003135E
:1002E000280803178F008D0A03198F0A03100313C0
:1002F000A50B2C2908002C08F8012B0203188329D0
:100300002B08F7008F29F7010830AD00AB0DF70D72
:100310002C0877020318F700F80DAD0B86290800AA
:100320002030261E3030A7002508F700A51F9F2982
:10033000F709F70A7708A5002D30A700A6172508AA
:10034000AB006430AC007B217708A5003030780723
:10035000A8002508AB000A30AC007B2130307707BD
:10036000AA0030307807A9002708F700A61DBA298F
:10037000A61F2611261AC729A61FE2292619E22937
:100380007708A800A618E2297708A900E2293030EA
:100390002802031DE2297708A8002030A700A61D27
:1003A000D5292611A614A61FA61030302902031D38
:1003B000E2297708A9002030A800A61DD529A6109B
:1003C000A61F2610261DE7292708AB003320A61CF0
:1003D000EC292808AB003320261CF1292908AB00A2
:1003E00033202A08AB003320080025308400831313
:1003F00000080319082A0230F800F701F70BFE295C
:10040000F80BFD299730F700F70B042A800BFB2926
:100410008A110A12EB2B840183131F30830571307C
:1004200083168F000F088611831286158316031713
:100430000908C039890003131F129F1200300317E7
:1004400088008312870188018901FF300313A0000F
:10045000831603170908C039890003131F129F125E
:10046000003003178800831203131F139F13831692
:100470009F1383121F149412A01220088316870062
:10048000831220162008831687008312A0112008EB
:100490008316870001308312940000308316940085
:1004A0000108C73908388100831290010030F80034
:1004B00092000030831692008312201520088316C4
:1004C00087008312970183169B019C0101309D00D8
:1004D0008312031787018801890104308D000030E1
:1004E0008F00031355282310A015200883168700BA
:1004F0000000831220162008831687000000831254
:100500008711A011200883168700000083120712AC
:100510002012200883168700B5308312A4009D2086
:100520007808231078182314A01120088316870058
:100530000000831220162008831687008312071EEE
:100540009F2A0000A32A0000A01520088316870018
:10055000000001308312A306A01120088316870033
:100560000000831220162008831687008312071EBE
:10057000B72A0000BB2A0000A015200883168700B8
:1005800000008312A0152008831687000000831244
:100590002016200883168700000083128711A011FF
:1005A00020088316870000008312071220122008FB
:1005B00083168700B4308312A4009D20A4019D20DF
:1005C000A01120088316870000008312201620083F
:1005D000831687008312071EEB2A0000EF2A000013
:1005E000A01520088316870000008312A01520089C
:1005F00083168700000083122016200883168700C8
:10060000000083128711A0112008831687000000C4
:10061000831207122012200883168700B530831238
:10062000A4009D20F701E7207808A100A011200870
:100630008316870000008312201620088316870087
:100640008312071E212B0000252B0000A015200877
:100650008316870000008312A015200883168700E8
:1006600000008312201620088316870000008312E2
:100670008711A0112008831687000000831207123B
:100680002012200883168700B4308312A4009D2016
:100690000130A4009D20A0112008831687000000CF
:1006A000831220162008831687008312071E562BFC
:1006B00000005A2B0000A0152008831687000000B8
:1006C0008312A015200883168700000083122016CD
:1006D000200883168700000083128711A0112008CC
:1006E0008316870000008312071220122008831649
:1006F0008700B5308312A4009D20F701E720780819
:10070000A200A01120088316870000008312201683
:100710002008831687008312071E8C2B0000902B65
:100720000000A01520088316870000000030831207
:1007300023180130A400103003178D0000308F0003
:10074000031006300313A5002C212408A5001F3038
:10075000A6009021143003178D0000308F00031085
:100760000D300313A5002C211B3003178D00003022
:100770008F00031008300313A5002C212108A500C9
:100780001F30A6009021203003178D0000308F000D
:1007900003100D300313A5002C21273003178D0003
:1007A00000308F00031008300313A5002C2122080D
:1007B000A5001F30A60090212C3003178D000030BB
:1007C0008F0003100D300313A5002C210230A4006C
:0E07D000FA30A500F529A40BE82B732A63006C
:04400E00F42CFF3F50
:00000001FF
;PIC16F887
;CRC=4DBE CREATED="25-6-13 09:31"
/Modules/HumanInterfaces/TOUCHBOARD01A/SW/PIC16F887/main.lst
0,0 → 1,794
CCS PCM C Compiler, Version 4.106, 47914 25-6-13 09:31
 
Filename: D:\Honza\MLAB\Modules\HumanInterfaces\TOUCHBOARD01A\SW\PIC16F887\main.lst
 
ROM used: 1007 words (12%)
Largest free fragment is 2048
RAM used: 7 (2%) at main() level
19 (5%) worst case
Stack: 2 locations
 
*
0000: MOVLW 02
0001: MOVWF 0A
0002: GOTO 20B
0003: NOP
.................... #include "D:\Honza\MLAB\Modules\HumanInterfaces\TOUCHBOARD01A\SW\PIC16F887\main.h"
.................... #include <16F887.h>
.................... //////// Standard Header file for the PIC16F887 device ////////////////
.................... #device PIC16F887
.................... #list
....................
.................... #device adc=8
....................
.................... #FUSES NOWDT //No Watch Dog Timer
.................... #FUSES INTRC_IO //Internal RC Osc, no CLKOUT
.................... #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)
*
01F5: MOVLW 25
01F6: MOVWF 04
01F7: BCF 03.7
01F8: MOVF 00,W
01F9: BTFSC 03.2
01FA: GOTO 208
01FB: MOVLW 02
01FC: MOVWF 78
01FD: CLRF 77
01FE: DECFSZ 77,F
01FF: GOTO 1FE
0200: DECFSZ 78,F
0201: GOTO 1FD
0202: MOVLW 97
0203: MOVWF 77
0204: DECFSZ 77,F
0205: GOTO 204
0206: DECFSZ 00,F
0207: GOTO 1FB
0208: BCF 0A.3
0209: BCF 0A.4
020A: GOTO 3EB (RETURN)
....................
....................
.................... #define S_SDA PIN_C3
.................... #define S_SCL PIN_C4
.................... #use i2c(master, sda=S_SDA, scl=S_SCL)
*
009D: MOVLW 08
009E: MOVWF 78
009F: NOP
00A0: BCF 07.4
00A1: BCF 20.4
00A2: MOVF 20,W
00A3: BSF 03.5
00A4: MOVWF 07
00A5: NOP
00A6: BCF 03.5
00A7: RLF 24,F
00A8: BCF 07.3
00A9: BTFSS 03.0
00AA: GOTO 0B1
00AB: BSF 20.3
00AC: MOVF 20,W
00AD: BSF 03.5
00AE: MOVWF 07
00AF: GOTO 0B5
00B0: BCF 03.5
00B1: BCF 20.3
00B2: MOVF 20,W
00B3: BSF 03.5
00B4: MOVWF 07
00B5: NOP
00B6: BCF 03.5
00B7: BSF 20.4
00B8: MOVF 20,W
00B9: BSF 03.5
00BA: MOVWF 07
00BB: BCF 03.5
00BC: BTFSS 07.4
00BD: GOTO 0BC
00BE: DECFSZ 78,F
00BF: GOTO 09F
00C0: NOP
00C1: BCF 07.4
00C2: BCF 20.4
00C3: MOVF 20,W
00C4: BSF 03.5
00C5: MOVWF 07
00C6: NOP
00C7: BCF 03.5
00C8: BSF 20.3
00C9: MOVF 20,W
00CA: BSF 03.5
00CB: MOVWF 07
00CC: NOP
00CD: NOP
00CE: BCF 03.5
00CF: BSF 20.4
00D0: MOVF 20,W
00D1: BSF 03.5
00D2: MOVWF 07
00D3: BCF 03.5
00D4: BTFSS 07.4
00D5: GOTO 0D4
00D6: CLRF 78
00D7: NOP
00D8: BTFSC 07.3
00D9: BSF 78.0
00DA: BCF 07.4
00DB: BCF 20.4
00DC: MOVF 20,W
00DD: BSF 03.5
00DE: MOVWF 07
00DF: BCF 03.5
00E0: BCF 07.3
00E1: BCF 20.3
00E2: MOVF 20,W
00E3: BSF 03.5
00E4: MOVWF 07
00E5: BCF 03.5
00E6: RETURN
00E7: MOVLW 08
00E8: MOVWF 25
00E9: MOVF 77,W
00EA: MOVWF 26
00EB: BSF 20.3
00EC: MOVF 20,W
00ED: BSF 03.5
00EE: MOVWF 07
00EF: NOP
00F0: BCF 03.5
00F1: BSF 20.4
00F2: MOVF 20,W
00F3: BSF 03.5
00F4: MOVWF 07
00F5: BCF 03.5
00F6: BTFSS 07.4
00F7: GOTO 0F6
00F8: BTFSC 07.3
00F9: BSF 03.0
00FA: BTFSS 07.3
00FB: BCF 03.0
00FC: RLF 78,F
00FD: NOP
00FE: BCF 20.4
00FF: MOVF 20,W
0100: BSF 03.5
0101: MOVWF 07
0102: BCF 03.5
0103: BCF 07.4
0104: DECFSZ 25,F
0105: GOTO 0EB
0106: BSF 20.3
0107: MOVF 20,W
0108: BSF 03.5
0109: MOVWF 07
010A: NOP
010B: BCF 03.5
010C: BCF 07.3
010D: MOVF 26,W
010E: BTFSC 03.2
010F: GOTO 115
0110: BCF 20.3
0111: MOVF 20,W
0112: BSF 03.5
0113: MOVWF 07
0114: BCF 03.5
0115: NOP
0116: BSF 20.4
0117: MOVF 20,W
0118: BSF 03.5
0119: MOVWF 07
011A: BCF 03.5
011B: BTFSS 07.4
011C: GOTO 11B
011D: NOP
011E: BCF 07.4
011F: BCF 20.4
0120: MOVF 20,W
0121: BSF 03.5
0122: MOVWF 07
0123: NOP
0124: BCF 03.5
0125: BCF 07.3
0126: BCF 20.3
0127: MOVF 20,W
0128: BSF 03.5
0129: MOVWF 07
012A: BCF 03.5
012B: RETURN
.................... #use rs232(baud=9600,parity=N,xmit=PIN_B3,rcv=PIN_B2,bits=8) //rcv TXD xmit RXD
*
0033: BSF 03.5
0034: BCF 06.3
0035: BCF 03.5
0036: BCF 06.3
0037: MOVLW 08
0038: MOVWF 78
0039: GOTO 03A
003A: NOP
003B: BSF 78.7
003C: GOTO 04B
003D: BCF 78.7
003E: RRF 2B,F
003F: BTFSC 03.0
0040: BSF 06.3
0041: BTFSS 03.0
0042: BCF 06.3
0043: BSF 78.6
0044: GOTO 04B
0045: BCF 78.6
0046: DECFSZ 78,F
0047: GOTO 03E
0048: GOTO 049
0049: NOP
004A: BSF 06.3
004B: MOVLW 3F
004C: MOVWF 04
004D: DECFSZ 04,F
004E: GOTO 04D
004F: NOP
0050: BTFSC 78.7
0051: GOTO 03D
0052: BTFSC 78.6
0053: GOTO 045
0054: RETURN
....................
....................
.................... void main()
.................... {
*
020B: CLRF 04
020C: BCF 03.7
020D: MOVLW 1F
020E: ANDWF 03,F
020F: MOVLW 71
0210: BSF 03.5
0211: MOVWF 0F
0212: MOVF 0F,W
0213: BCF 06.3
0214: BCF 03.5
0215: BSF 06.3
0216: BSF 03.5
0217: BSF 03.6
0218: MOVF 09,W
0219: ANDLW C0
021A: MOVWF 09
021B: BCF 03.6
021C: BCF 1F.4
021D: BCF 1F.5
021E: MOVLW 00
021F: BSF 03.6
0220: MOVWF 08
0221: BCF 03.5
0222: CLRF 07
0223: CLRF 08
0224: CLRF 09
....................
.................... setup_adc_ports(NO_ANALOGS|VSS_VDD);
*
0228: BSF 03.5
0229: BSF 03.6
022A: MOVF 09,W
022B: ANDLW C0
022C: MOVWF 09
022D: BCF 03.6
022E: BCF 1F.4
022F: BCF 1F.5
0230: MOVLW 00
0231: BSF 03.6
0232: MOVWF 08
.................... setup_adc(ADC_CLOCK_DIV_2);
0233: BCF 03.5
0234: BCF 03.6
0235: BCF 1F.6
0236: BCF 1F.7
0237: BSF 03.5
0238: BCF 1F.7
0239: BCF 03.5
023A: BSF 1F.0
.................... setup_spi(SPI_SS_DISABLED);
023B: BCF 14.5
023C: BCF 20.5
023D: MOVF 20,W
023E: BSF 03.5
023F: MOVWF 07
0240: BCF 03.5
0241: BSF 20.4
0242: MOVF 20,W
0243: BSF 03.5
0244: MOVWF 07
0245: BCF 03.5
0246: BCF 20.3
0247: MOVF 20,W
0248: BSF 03.5
0249: MOVWF 07
024A: MOVLW 01
024B: BCF 03.5
024C: MOVWF 14
024D: MOVLW 00
024E: BSF 03.5
024F: MOVWF 14
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
0250: MOVF 01,W
0251: ANDLW C7
0252: IORLW 08
0253: MOVWF 01
.................... setup_timer_1(T1_DISABLED);
0254: BCF 03.5
0255: CLRF 10
.................... setup_timer_2(T2_DISABLED,0,1);
0256: MOVLW 00
0257: MOVWF 78
0258: MOVWF 12
0259: MOVLW 00
025A: BSF 03.5
025B: MOVWF 12
.................... setup_ccp1(CCP_OFF);
025C: BCF 03.5
025D: BSF 20.2
025E: MOVF 20,W
025F: BSF 03.5
0260: MOVWF 07
0261: BCF 03.5
0262: CLRF 17
0263: BSF 03.5
0264: CLRF 1B
0265: CLRF 1C
0266: MOVLW 01
0267: MOVWF 1D
.................... setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard
0268: BCF 03.5
0269: BSF 03.6
026A: CLRF 07
026B: CLRF 08
026C: CLRF 09
....................
.................... printf("Simple Thermomether \r\n",);
026D: MOVLW 04
026E: MOVWF 0D
026F: MOVLW 00
0270: MOVWF 0F
0271: BCF 03.6
0272: GOTO 055
....................
.................... unsigned int STAV1;
.................... unsigned int data1;
....................
....................
.................... while(TRUE)
.................... {
....................
....................
....................
.................... //akcelerometr
.................... int1 ack=0;
0273: BCF 23.0
.................... i2c_start(); // If the write command is acknowledged,
0274: BSF 20.3
0275: MOVF 20,W
0276: BSF 03.5
0277: MOVWF 07
0278: NOP
0279: BCF 03.5
027A: BSF 20.4
027B: MOVF 20,W
027C: BSF 03.5
027D: MOVWF 07
027E: NOP
027F: BCF 03.5
0280: BCF 07.3
0281: BCF 20.3
0282: MOVF 20,W
0283: BSF 03.5
0284: MOVWF 07
0285: NOP
0286: BCF 03.5
0287: BCF 07.4
0288: BCF 20.4
0289: MOVF 20,W
028A: BSF 03.5
028B: MOVWF 07
.................... ack = i2c_write(0xB5);// then the device is ready.
028C: MOVLW B5
028D: BCF 03.5
028E: MOVWF 24
028F: CALL 09D
0290: MOVF 78,W
0291: BCF 23.0
0292: BTFSC 78.0
0293: BSF 23.0
.................... i2c_stop();
0294: BCF 20.3
0295: MOVF 20,W
0296: BSF 03.5
0297: MOVWF 07
0298: NOP
0299: BCF 03.5
029A: BSF 20.4
029B: MOVF 20,W
029C: BSF 03.5
029D: MOVWF 07
029E: BCF 03.5
029F: BTFSS 07.4
02A0: GOTO 29F
02A1: NOP
02A2: GOTO 2A3
02A3: NOP
02A4: BSF 20.3
02A5: MOVF 20,W
02A6: BSF 03.5
02A7: MOVWF 07
02A8: NOP
.................... ack=!ack;
02A9: MOVLW 01
02AA: BCF 03.5
02AB: XORWF 23,F
....................
.................... i2c_stop();
02AC: BCF 20.3
02AD: MOVF 20,W
02AE: BSF 03.5
02AF: MOVWF 07
02B0: NOP
02B1: BCF 03.5
02B2: BSF 20.4
02B3: MOVF 20,W
02B4: BSF 03.5
02B5: MOVWF 07
02B6: BCF 03.5
02B7: BTFSS 07.4
02B8: GOTO 2B7
02B9: NOP
02BA: GOTO 2BB
02BB: NOP
02BC: BSF 20.3
02BD: MOVF 20,W
02BE: BSF 03.5
02BF: MOVWF 07
02C0: NOP
....................
.................... i2c_start();
02C1: BCF 03.5
02C2: BSF 20.3
02C3: MOVF 20,W
02C4: BSF 03.5
02C5: MOVWF 07
02C6: NOP
02C7: BCF 03.5
02C8: BSF 20.4
02C9: MOVF 20,W
02CA: BSF 03.5
02CB: MOVWF 07
02CC: NOP
02CD: BCF 03.5
02CE: BCF 07.3
02CF: BCF 20.3
02D0: MOVF 20,W
02D1: BSF 03.5
02D2: MOVWF 07
02D3: NOP
02D4: BCF 03.5
02D5: BCF 07.4
02D6: BCF 20.4
02D7: MOVF 20,W
02D8: BSF 03.5
02D9: MOVWF 07
.................... I2C_Write(0xB4);
02DA: MOVLW B4
02DB: BCF 03.5
02DC: MOVWF 24
02DD: CALL 09D
.................... I2C_write(0x00);
02DE: CLRF 24
02DF: CALL 09D
.................... i2c_stop();
02E0: BCF 20.3
02E1: MOVF 20,W
02E2: BSF 03.5
02E3: MOVWF 07
02E4: NOP
02E5: BCF 03.5
02E6: BSF 20.4
02E7: MOVF 20,W
02E8: BSF 03.5
02E9: MOVWF 07
02EA: BCF 03.5
02EB: BTFSS 07.4
02EC: GOTO 2EB
02ED: NOP
02EE: GOTO 2EF
02EF: NOP
02F0: BSF 20.3
02F1: MOVF 20,W
02F2: BSF 03.5
02F3: MOVWF 07
02F4: NOP
.................... i2c_start();
02F5: BCF 03.5
02F6: BSF 20.3
02F7: MOVF 20,W
02F8: BSF 03.5
02F9: MOVWF 07
02FA: NOP
02FB: BCF 03.5
02FC: BSF 20.4
02FD: MOVF 20,W
02FE: BSF 03.5
02FF: MOVWF 07
0300: NOP
0301: BCF 03.5
0302: BCF 07.3
0303: BCF 20.3
0304: MOVF 20,W
0305: BSF 03.5
0306: MOVWF 07
0307: NOP
0308: BCF 03.5
0309: BCF 07.4
030A: BCF 20.4
030B: MOVF 20,W
030C: BSF 03.5
030D: MOVWF 07
.................... I2C_Write(0xB5);
030E: MOVLW B5
030F: BCF 03.5
0310: MOVWF 24
0311: CALL 09D
.................... STAV1=i2c_read(0);
0312: CLRF 77
0313: CALL 0E7
0314: MOVF 78,W
0315: MOVWF 21
.................... i2c_stop();
0316: BCF 20.3
0317: MOVF 20,W
0318: BSF 03.5
0319: MOVWF 07
031A: NOP
031B: BCF 03.5
031C: BSF 20.4
031D: MOVF 20,W
031E: BSF 03.5
031F: MOVWF 07
0320: BCF 03.5
0321: BTFSS 07.4
0322: GOTO 321
0323: NOP
0324: GOTO 325
0325: NOP
0326: BSF 20.3
0327: MOVF 20,W
0328: BSF 03.5
0329: MOVWF 07
032A: NOP
....................
.................... i2c_start();
032B: BCF 03.5
032C: BSF 20.3
032D: MOVF 20,W
032E: BSF 03.5
032F: MOVWF 07
0330: NOP
0331: BCF 03.5
0332: BSF 20.4
0333: MOVF 20,W
0334: BSF 03.5
0335: MOVWF 07
0336: NOP
0337: BCF 03.5
0338: BCF 07.3
0339: BCF 20.3
033A: MOVF 20,W
033B: BSF 03.5
033C: MOVWF 07
033D: NOP
033E: BCF 03.5
033F: BCF 07.4
0340: BCF 20.4
0341: MOVF 20,W
0342: BSF 03.5
0343: MOVWF 07
.................... I2C_Write(0xB4);
0344: MOVLW B4
0345: BCF 03.5
0346: MOVWF 24
0347: CALL 09D
.................... I2C_write(0x01);
0348: MOVLW 01
0349: MOVWF 24
034A: CALL 09D
.................... i2c_stop();
034B: BCF 20.3
034C: MOVF 20,W
034D: BSF 03.5
034E: MOVWF 07
034F: NOP
0350: BCF 03.5
0351: BSF 20.4
0352: MOVF 20,W
0353: BSF 03.5
0354: MOVWF 07
0355: BCF 03.5
0356: BTFSS 07.4
0357: GOTO 356
0358: NOP
0359: GOTO 35A
035A: NOP
035B: BSF 20.3
035C: MOVF 20,W
035D: BSF 03.5
035E: MOVWF 07
035F: NOP
.................... i2c_start();
0360: BCF 03.5
0361: BSF 20.3
0362: MOVF 20,W
0363: BSF 03.5
0364: MOVWF 07
0365: NOP
0366: BCF 03.5
0367: BSF 20.4
0368: MOVF 20,W
0369: BSF 03.5
036A: MOVWF 07
036B: NOP
036C: BCF 03.5
036D: BCF 07.3
036E: BCF 20.3
036F: MOVF 20,W
0370: BSF 03.5
0371: MOVWF 07
0372: NOP
0373: BCF 03.5
0374: BCF 07.4
0375: BCF 20.4
0376: MOVF 20,W
0377: BSF 03.5
0378: MOVWF 07
.................... I2C_Write(0xB5);
0379: MOVLW B5
037A: BCF 03.5
037B: MOVWF 24
037C: CALL 09D
.................... data1=i2c_read(0);
037D: CLRF 77
037E: CALL 0E7
037F: MOVF 78,W
0380: MOVWF 22
.................... i2c_stop();
0381: BCF 20.3
0382: MOVF 20,W
0383: BSF 03.5
0384: MOVWF 07
0385: NOP
0386: BCF 03.5
0387: BSF 20.4
0388: MOVF 20,W
0389: BSF 03.5
038A: MOVWF 07
038B: BCF 03.5
038C: BTFSS 07.4
038D: GOTO 38C
038E: NOP
038F: GOTO 390
0390: NOP
0391: BSF 20.3
0392: MOVF 20,W
0393: BSF 03.5
0394: MOVWF 07
0395: NOP
....................
....................
....................
....................
.................... printf("Stav: %d (procenta)\r\n", ack);
0396: MOVLW 00
0397: BCF 03.5
0398: BTFSC 23.0
0399: MOVLW 01
039A: MOVWF 24
039B: MOVLW 10
039C: BSF 03.6
039D: MOVWF 0D
039E: MOVLW 00
039F: MOVWF 0F
03A0: BCF 03.0
03A1: MOVLW 06
03A2: BCF 03.6
03A3: MOVWF 25
03A4: CALL 12C
03A5: MOVF 24,W
03A6: MOVWF 25
03A7: MOVLW 1F
03A8: MOVWF 26
03A9: CALL 190
03AA: MOVLW 14
03AB: BSF 03.6
03AC: MOVWF 0D
03AD: MOVLW 00
03AE: MOVWF 0F
03AF: BCF 03.0
03B0: MOVLW 0D
03B1: BCF 03.6
03B2: MOVWF 25
03B3: CALL 12C
.................... printf("Stav00: %d (procenta)\r\n", STAV1);
03B4: MOVLW 1B
03B5: BSF 03.6
03B6: MOVWF 0D
03B7: MOVLW 00
03B8: MOVWF 0F
03B9: BCF 03.0
03BA: MOVLW 08
03BB: BCF 03.6
03BC: MOVWF 25
03BD: CALL 12C
03BE: MOVF 21,W
03BF: MOVWF 25
03C0: MOVLW 1F
03C1: MOVWF 26
03C2: CALL 190
03C3: MOVLW 20
03C4: BSF 03.6
03C5: MOVWF 0D
03C6: MOVLW 00
03C7: MOVWF 0F
03C8: BCF 03.0
03C9: MOVLW 0D
03CA: BCF 03.6
03CB: MOVWF 25
03CC: CALL 12C
.................... printf("Stav01: %d (procenta)\r\n", data1);
03CD: MOVLW 27
03CE: BSF 03.6
03CF: MOVWF 0D
03D0: MOVLW 00
03D1: MOVWF 0F
03D2: BCF 03.0
03D3: MOVLW 08
03D4: BCF 03.6
03D5: MOVWF 25
03D6: CALL 12C
03D7: MOVF 22,W
03D8: MOVWF 25
03D9: MOVLW 1F
03DA: MOVWF 26
03DB: CALL 190
03DC: MOVLW 2C
03DD: BSF 03.6
03DE: MOVWF 0D
03DF: MOVLW 00
03E0: MOVWF 0F
03E1: BCF 03.0
03E2: MOVLW 0D
03E3: BCF 03.6
03E4: MOVWF 25
03E5: CALL 12C
.................... delay_ms(500);
03E6: MOVLW 02
03E7: MOVWF 24
03E8: MOVLW FA
03E9: MOVWF 25
03EA: GOTO 1F5
03EB: DECFSZ 24,F
03EC: GOTO 3E8
.................... }
03ED: GOTO 273
.................... }
03EE: SLEEP
 
Configuration Fuses:
Word 1: 2CF4 INTRC_IO NOWDT NOPUT MCLR NOPROTECT NOCPD NOBROWNOUT IESO FCMEN NOLVP NODEBUG
Word 2: 3FFF NOWRT BORV40
/Modules/HumanInterfaces/TOUCHBOARD01A/SW/PIC16F887/main.pjt
0,0 → 1,24
[PROJECT]
Target=D:\Honza\MLAB\Modules\HumanInterfaces\TOUCHBOARD01A\SW\PIC16F887\main.hex
Development_Mode=
Processor_Text=PIC16F887
ToolSuite=CCS
Processor=0x887F
[D:\Honza\MLAB\Modules\HumanInterfaces\TOUCHBOARD01A\SW\PIC16F887\main]
Type=4
Path=
FileList=
BuildTool=
OptionString=
AdditionalOptionString=
[mru-list]
1=D:\Honza\MLAB\Modules\HumanInterfaces\TOUCHBOARD01A\SW\PIC16F887\main.c
[Windows]
0=0000 %S 0 0 796 451 3 0
[Units]
Link=0
Count=1
1=D:\Honza\MLAB\Modules\HumanInterfaces\TOUCHBOARD01A\SW\PIC16F887\main
[Opened Files]
1=main.c
2=
/Modules/HumanInterfaces/TOUCHBOARD01A/SW/PIC16F887/main.sta
0,0 → 1,58
 
ROM used: 1007 (12%)
1007 (12%) including unused fragments
 
2 Average locations per line
27 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
----- ----- --- -----
67 37 100 main.c
20 0 0 main.h
423 0 0 C:\Program Files (x86)\PICC\devices\16F887.h
----- -----
510 37 Total
 
Page ROM % RAM Vol Diff Functions:
---- --- --- --- --- ---- ----------
0 22 2 1 @delay_ms1
0 69 7 3 @I2C_READ_1
0 74 7 1 @I2C_WRITE_1
0 34 3 1 @PUTCHAR_1_
0 484 48 1 1067 3.9 main
0 12 1 0 @const78
0 72 7 3 @PSTRINGC7_69
0 11 1 0 @const83
0 79 8 4 @PSTRINGCN7_69
0 21 2 3 @DIV88
0 101 10 6 @PRINTF_D_69
0 12 1 0 @const92
0 12 1 0 @const93
 
Program metrics:
Functions 1
Statements 37
Comments 87
Volume (V) 1098
Difficilty (D) 3.4
Effort to implement (E) 3758
Time to implement (T) 3 minutes
Est Delivered Bugs (B) 0
Cyclomatic Complexity 1
Maintainability (MI) 123
 
Segment Used Free
----------- ---- ----
00000-00003 4 0
00004-007FF 1003 1041
00800-00FFF 0 2048
01000-017FF 0 2048
01800-01FFF 0 2048
 
 
 
/Modules/HumanInterfaces/TOUCHBOARD01A/SW/PIC16F887/main.sym
0,0 → 1,95
004-005 @READ_PROGRAM_MEMORY8.P1
004 @WRITE_PROGRAM_MEMORY8.P2
015 CCP_1
015 CCP_1_LOW
016 CCP_1_HIGH
01B CCP_2
01B CCP_2_LOW
01C CCP_2_HIGH
020 @TRIS_C
021 main.STAV1
022 main.data1
023.0 ack
024 @I2C_WRITE_1.P1
024 @I2C_READ_1.P2
024 main.@SCRATCH1
024 @PSTRINGC7_69.@SCRATCH1
025 @PSTRINGCN7_69.P1
025 @delay_ms1.P2
025 @PRINTF_D_69.P3
025 @I2C_READ_1.@SCRATCH1
025 @PSTRINGC7_69.@SCRATCH2
026 @PRINTF_D_69.P1
026 @I2C_READ_1.@SCRATCH2
026 @PSTRINGC7_69.@SCRATCH3
026 @PSTRINGCN7_69.@SCRATCH1
027 @PSTRINGCN7_69.@SCRATCH2
027 @PRINTF_D_69.@SCRATCH1
028 @PSTRINGCN7_69.@SCRATCH3
028 @PRINTF_D_69.@SCRATCH2
029 @PRINTF_D_69.@SCRATCH3
02A @PRINTF_D_69.@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:
01F5 @delay_ms1
00E7 @I2C_READ_1
009D @I2C_WRITE_1
0033 @PUTCHAR_1_
020B main
0004 @const78
0055 @PSTRINGC7_69
0010 @const83
012C @PSTRINGCN7_69
017B @DIV88
0190 @PRINTF_D_69
001B @const92
0027 @const93
020B @cinit
 
 
User Memory space:
 
User Memory space:
 
Project Directory:
D:\Honza\MLAB\Modules\HumanInterfaces\TOUCHBOARD01A\SW\PIC16F887\
 
Project Files:
main.c
main.h
C:\Program Files (x86)\PICC\devices\16F887.h
 
Units:
D:\Honza\MLAB\Modules\HumanInterfaces\TOUCHBOARD01A\SW\PIC16F887\main (main)
 
Compiler Settings:
Processor: PIC16F887
Pointer Size: 16
ADC Range: 0-255
Opt Level: 9
Short,Int,Long: UNSIGNED: 1,8,16
Float,Double: 32,32
 
Output Files:
Errors: main.err
Ext Symbols: main.esym
INHX8: main.hex
Symbols: main.sym
List: main.lst
Debug/COFF: main.cof
Project: main.PJT
Call Tree: main.tre
Statistics: main.sta
/Modules/HumanInterfaces/TOUCHBOARD01A/SW/PIC16F887/main.tre
0,0 → 1,55
ÀÄmain
ÀÄmain 0/484 Ram=1
ÃÄ??0??
ÃÄ@PSTRINGC7_69 0/72 Ram=3
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@I2C_WRITE_1 0/74 Ram=1
ÃÄ@I2C_WRITE_1 0/74 Ram=1
ÃÄ@I2C_WRITE_1 0/74 Ram=1
ÃÄ@I2C_WRITE_1 0/74 Ram=1
ÃÄ@I2C_READ_1 0/69 Ram=3
ÃÄ@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
ÃÄ@PSTRINGCN7_69 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PRINTF_D_69 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_69 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PSTRINGCN7_69 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PRINTF_D_69 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_69 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PSTRINGCN7_69 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÃÄ@PRINTF_D_69 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_69 0/79 Ram=4
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1
ÀÄ@delay_ms1 0/22 Ram=1