Problem with comparison.
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/Min_V_cl/v_min_reg.png |
---|
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/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/Min_V_cl/main.bak |
---|
0,0 → 1,154 |
#include "C:\Users\Honza\Documents\pic\I2C_bat_pam\Min_V_cl\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",); |
unsigned int8 STAV1,STAV2; |
unsigned int16 SOUCET, SOUCET1; |
unsigned int8 LSB=0,ZK,k=0,VH,VL; |
//unsigned int8 |
while(TRUE) |
{ |
i2c_start(); //blockdatacontrol |
I2C_Write(0xAA); |
I2C_write(0x61); |
i2c_start(); |
I2C_Write(0xAA); |
i2c_write(0x00); |
i2c_stop(); |
delay_ms (1); |
i2c_start();//dataflashclass |
I2C_Write(0xAA); |
I2C_write(0x3e); |
i2c_start(); |
I2C_Write(0xAA); |
i2c_write(0x50); |
i2c_stop(); |
delay_ms (1); |
i2c_start();//dataflashblock |
I2C_Write(0xAA); |
I2C_write(0x3f); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x02); |
i2c_stop(); |
delay_ms (1); |
i2c_start();//blockdata horni bit |
I2C_Write(0xAA); |
I2C_write(0x43); |
i2c_start(); |
I2C_Write(0xAB); |
VH=I2C_read(0); |
i2c_stop(); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x44); |
i2c_start(); |
I2C_Write(0xAB); |
VL=I2C_read(0); |
i2c_stop(); |
delay_ms (1); |
printf("VL %lX \r\n", VL); |
printf("LH %lX \r\n", VH); |
if(VH==0x0A) |
{ |
LSB=LSB-1; |
printf("Vysledne LSB %lX \r\n", LSB); |
while(TRUE) |
{ |
} |
} |
else |
{ |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x43); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x0A); |
i2c_stop(); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x44); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x5A); |
i2c_stop(); |
} |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x60); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(LSB); |
i2c_stop(); |
LSB=LSB+1; |
delay_ms (100); |
} |
} |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/Min_V_cl/main.c |
---|
0,0 → 1,154 |
#include "C:\Users\Honza\Documents\pic\I2C_bat_pam\Min_V_cl\main.h" |
#define EEPROM_SDA PIN_C4 |
#define EEPROM_SCL PIN_C3 |
#use i2c(master, sda=EEPROM_SDA, scl=EEPROM_SCL) |
#use rs232(baud=9600,parity=N,xmit=PIN_C7,rcv=PIN_C6,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 int8 STAV1,STAV2; |
unsigned int16 SOUCET, SOUCET1; |
unsigned int8 LSB=0,ZK,k=0,VH,VL; |
//unsigned int8 |
while(TRUE) |
{ |
i2c_start(); //blockdatacontrol |
I2C_Write(0xAA); |
I2C_write(0x61); |
i2c_start(); |
I2C_Write(0xAA); |
i2c_write(0x00); |
i2c_stop(); |
delay_ms (1); |
i2c_start();//dataflashclass |
I2C_Write(0xAA); |
I2C_write(0x3e); |
i2c_start(); |
I2C_Write(0xAA); |
i2c_write(0x50); |
i2c_stop(); |
delay_ms (1); |
i2c_start();//dataflashblock |
I2C_Write(0xAA); |
I2C_write(0x3f); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x02); |
i2c_stop(); |
delay_ms (1); |
i2c_start();//blockdata horni bit |
I2C_Write(0xAA); |
I2C_write(0x43); |
i2c_start(); |
I2C_Write(0xAB); |
VH=I2C_read(0); |
i2c_stop(); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x44); |
i2c_start(); |
I2C_Write(0xAB); |
VL=I2C_read(0); |
i2c_stop(); |
delay_ms (1); |
printf("VL %lX \r\n", VL); |
printf("LH %lX \r\n", VH); |
if(VH==0x0A) |
{ |
LSB=LSB-1; |
printf("Vysledne LSB %lX \r\n", LSB); |
while(TRUE) |
{ |
} |
} |
else |
{ |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x43); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x0A); |
i2c_stop(); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x44); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x5A); |
i2c_stop(); |
} |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x60); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(LSB); |
i2c_stop(); |
LSB=LSB+1; |
delay_ms (100); |
} |
} |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/Min_V_cl/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/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/Min_V_cl/main.err |
---|
0,0 → 1,8 |
>>> Warning 202 "main.c" Line 24(15,20): Variable never used: STAV1 |
>>> Warning 202 "main.c" Line 24(21,26): Variable never used: STAV2 |
>>> Warning 202 "main.c" Line 26(16,22): Variable never used: SOUCET |
>>> Warning 202 "main.c" Line 26(24,31): Variable never used: SOUCET1 |
>>> Warning 202 "main.c" Line 27(21,23): Variable never used: ZK |
>>> Warning 202 "main.c" Line 27(24,25): Variable never used: k |
Memory usage: ROM=16% RAM=2% - 6% |
0 Errors, 6 Warnings. |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/Min_V_cl/main.esym |
---|
0,0 → 1,428 |
D G "__PCM__" 0 158 ""4.106"" |
D G "__DEVICE__" 0 158 "887" |
D G "__DATE__" 0 158 ""22-4-13"" |
D G "__TIME__" 0 158 ""22:26:51"" "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 5 "PIN_C4" |
D G "EEPROM_SCL" 0 6 "PIN_C3" |
F G "main" 0 11 "void()" |
C L "main" 0 21 1 "FUNCTION" |
V L "STAV1" 0 24 "int8" |
V L "STAV2" 0 24 "int8" |
V L "SOUCET" 0 26 "int16" |
V L "SOUCET1" 0 26 "int16" |
V L "LSB" 0 27 "int8" |
V L "ZK" 0 27 "int8" |
V L "k" 0 27 "int8" |
V L "VH" 0 27 "int8" |
V L "VL" 0 27 "int8" "unsigned int8" |
C L "main" 0 21 1 "FUNCTION" |
C L "main" 0 21 1 "FUNCTION" |
C L "main" 0 21 1 "FUNCTION" |
C L "main" 0 21 1 "FUNCTION" |
C L "main" 0 21 1 "FUNCTION" |
C L "main" 0 21 1 "FUNCTION" |
C L "main" 0 21 1 "FUNCTION" |
C L "main" 0 21 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/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/Min_V_cl/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/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/Min_V_cl/main.hex |
---|
0,0 → 1,168 |
:1000000001308A009B290000D3346D38EC32202A5D |
:10001000E832F236EF36653AE8327210A0060A008E |
:10002000D63C73366532EE3220265321A0126C2C5A |
:10003000A0060A00A01320088316870083128713E6 |
:100040000830F80023280000F8173428F813B00C03 |
:1000500003188717031C8713781734287813F80BB5 |
:1000600027283228000087173F308400840B362869 |
:100070000000F81B2628781B2E280800831603177B |
:100080008C170C140000000083120C087F39031930 |
:1000900082280313AC0003170D080313AD000317E8 |
:1000A0000F080313AE002C08B0001A202D08031708 |
:1000B0008D0003132E0803178F0083168C170C1462 |
:1000C0000000000083120C0D0E0D7F3903198228E9 |
:1000D0000313AC0003170D080313AD0003170F083B |
:1000E0000313AE002C08B0001A202D0803178D0052 |
:1000F00003132E0803178F008D0A03198F0A0313A9 |
:100100003E28031703138A110A12072A0830F80041 |
:1001100000008711A01120088316870000008312B9 |
:10012000AC0D0712031C9A2820162008831687009E |
:100130009E28831220122008831687000000831255 |
:10014000A0152008831687008312871DA528F80BA9 |
:10015000882800008711A01120088316870000005E |
:1001600083122016200883168700000000008312E7 |
:10017000A0152008831687008312871DBD28F8016B |
:100180000000071A78148711A01120088316870031 |
:10019000831207122012200883168700831208009A |
:1001A0002C308400831300080319E3280230F80080 |
:1001B000F701F70BD928F80BD8289730F700F70B81 |
:1001C000DF28800BD62808000830AD007708AE0085 |
:1001D000201620088316870000008312A01520082F |
:1001E000831687008312871DF328071A0314071E3E |
:1001F0000310F80D0000A011200883168700831259 |
:100200008711AD0BE8282016200883168700000010 |
:10021000831207122E0803191229201220088316B0 |
:10022000870083120000A015200883168700831220 |
:10023000871D182900008711A01120088316870048 |
:1002400000008312071220122008831687008312F1 |
:100250000800AD1B3B290F30F7002C0EF7050A30C4 |
:100260007702031836293030F70738292D08F707A9 |
:100270007708B0001A200F30AC050A302C020318A2 |
:10028000432930304529AD132D08AC072C08B000A8 |
:100290001A200800831603178C170C1400000000A6 |
:1002A0000318792983120C087F390313AD00031753 |
:1002B0000D080313AE0003170F080313AF002D083A |
:1002C000B0001A202E0803178D0003132F08031700 |
:1002D0008F0083168C170C14000000008312031388 |
:1002E000AC0B73297629831603177929982983166D |
:1002F000031783120C0D0E0D7F390313AD00031786 |
:100300000D080313AE0003170F080313AF002D08E9 |
:10031000B0001A202E0803178D0003132F080317AF |
:100320008F008D0A03198F0A03100313AC0B4A299F |
:100330008A110A12022C840183131F308305713045 |
:1003400083168F000F088312A013200883168700DE |
:1003500083128717831603170908C039890003130E |
:100360001F129F1200300317880083128701880133 |
:100370008901FF300313A000831603170908C03951 |
:10038000890003131F129F12003003178800831285 |
:1003900003131F139F1383169F1383121F149412AA |
:1003A000A0122008831687008312201620088316C7 |
:1003B00087008312A0112008831687000130831262 |
:1003C00094000030831694000108C7390838810072 |
:1003D000831290010030F8009200003083169200E2 |
:1003E0008312201520088316870083129701831635 |
:1003F0009B019C0101309D00831203178701880136 |
:10040000890104308D0000308F0003133E28A701BE |
:10041000A901201620088316870000008312A0156A |
:10042000200883168700000083120712201220087C |
:1004300083168700000083128711A01120088316FD |
:100440008700AA308312AC0086206130AC00862081 |
:10045000201620088316870000008312A0152008AC |
:100460008316870000008312871D342A071220128A |
:10047000200883168700000083128711A01120082E |
:1004800083168700AA308312AC008620AC01862038 |
:10049000201220088316870000008312A015200870 |
:1004A000831687008312871D532A0000572A0000F5 |
:1004B0002016200883168700000001308312AC004C |
:1004C000D020201620088316870000008312A01574 |
:1004D00020088316870000008312071220122008CC |
:1004E00083168700000083128711A011200883164D |
:1004F0008700AA308312AC0086203E30AC008620F4 |
:10050000201620088316870000008312A0152008FB |
:100510008316870000008312871D8C2A0712201281 |
:10052000200883168700000083128711A01120087D |
:1005300083168700AA308312AC0086205030AC00AE |
:100540008620201220088316870000008312A01541 |
:100550002008831687008312871DAC2A0000B02A6A |
:100560000000201620088316870000000130831247 |
:10057000AC00D020201620088316870000008312CC |
:10058000A01520088316870000008312071220128E |
:10059000200883168700000083128711A01120080D |
:1005A00083168700AA308312AC0086203F30AC004F |
:1005B0008620201620088316870000008312A015CD |
:1005C00020088316870000008312871DE52A071282 |
:1005D0002012200883168700000083128711A011C3 |
:1005E000200883168700AA308312AC0086200230D0 |
:1005F000AC0086202012200883168700000083129A |
:10060000A0152008831687008312871D052B000084 |
:10061000092B0000201620088316870000000130F7 |
:100620008312AC00D020201620088316870000001B |
:100630008312A0152008831687000000831207127A |
:100640002012200883168700000083128711A01152 |
:10065000200883168700AA308312AC00862043301E |
:10066000AC00862020162008831687000000831225 |
:10067000A01520088316870000008312871D3E2BDB |
:1006800007122012200883168700000083128711AA |
:10069000A011200883168700AB308312AC0086209F |
:1006A000F701E4207808AA002012200883168700AA |
:1006B00000008312A0152008831687008312871D6F |
:1006C0005F2B0000632B0000201620088316870094 |
:1006D0000000831220162008831687000000831272 |
:1006E000A01520088316870000008312071220122D |
:1006F000200883168700000083128711A0112008AC |
:1007000083168700AA308312AC0086204430AC00E8 |
:100710008620201620088316870000008312A0156B |
:1007200020088316870000008312871D952B07126F |
:100730002012200883168700000083128711A01161 |
:10074000200883168700AB308312AC008620F701A7 |
:10075000E4207808AB0020122008831687000000F0 |
:100760008312A0152008831687008312871DB62BDD |
:100770000000BA2B00002016200883168700000016 |
:1007800001308312AC00D0205630B0001A204C301B |
:10079000B0001A202030B0001A202B08AC003730EF |
:1007A000AD0029212030B0001A200D30B0001A20F1 |
:1007B0000A30B0001A204C30B0001A204830B00087 |
:1007C0001A202030B0001A202A08AC003730AD00C3 |
:1007D00029212030B0001A200D30B0001A200A3034 |
:1007E000B0001A202A080A3C031D122C0130A7026F |
:1007F000103003178D0000308F0003100D300313ED |
:10080000AC004A292708AC003730AD002921203040 |
:10081000B0001A200D30B0001A200A30B0001A20A3 |
:10082000102CBE2C2016200883168700000083128F |
:10083000A0152008831687000000831207122012DB |
:10084000200883168700000083128711A01120085A |
:1008500083168700AA308312AC0086204330AC0098 |
:100860008620201620088316870000008312A0151A |
:1008700020088316870000008312871D3D2C071275 |
:100880002012200883168700000083128711A01110 |
:10089000200883168700AA308312AC0086200A3015 |
:1008A000AC008620201220088316870000008312E7 |
:1008B000A0152008831687008312871D5D2C000079 |
:1008C000612C000020162008831687000000831288 |
:1008D000201620088316870000008312A015200828 |
:1008E0008316870000008312071220122008831647 |
:1008F0008700000083128711A0112008831687004B |
:10090000AA308312AC0086204430AC00862020162A |
:1009100020088316870000008312A0152008831684 |
:10092000870000008312871D932C071220122008D5 |
:1009300083168700000083128711A01120088316F8 |
:100940008700AA308312AC0086205A30AC00862083 |
:10095000201220088316870000008312A0152008AB |
:10096000831687008312871DB32C0000B72C00006C |
:100970002016200883168700000083122016200806 |
:100980008316870000008312A015200883168700B5 |
:10099000000083120712201220088316870000002F |
:1009A00083128711A011200883168700AA308312B2 |
:1009B000AC0086206030AC0086202016200883160C |
:1009C000870000008312A01520088316870000000E |
:1009D0008312871DE92C0712201220088316870036 |
:1009E000000083128711A011200883168700AA3007 |
:1009F0008312AC0086202708AC0086202012200835 |
:100A00008316870000008312A01520088316870034 |
:100A10008312871D092D00000D2D000020162008CF |
:100A200083168700000001308312A7076430AC00F2 |
:060A3000D020092A63003A |
:04400E00F52CFF3F4F |
:00000001FF |
;PIC16F887 |
;CRC=CE45 CREATED="22-4-13 22:26" |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/Min_V_cl/main.lst |
---|
0,0 → 1,1295 |
CCS PCM C Compiler, Version 4.106, 47914 22-4-13 22:26 |
Filename: C:\Users\Honza\Documents\pic\I2C_bat_pam\Min_V_cl\main.lst |
ROM used: 1307 words (16%) |
Largest free fragment is 2048 |
RAM used: 6 (2%) at main() level |
22 (6%) worst case |
Stack: 2 locations |
* |
0000: MOVLW 01 |
0001: MOVWF 0A |
0002: GOTO 19B |
0003: NOP |
.................... #include "C:\Users\Honza\Documents\pic\I2C_bat_pam\Min_V_cl\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) |
* |
00D0: MOVLW 2C |
00D1: MOVWF 04 |
00D2: BCF 03.7 |
00D3: MOVF 00,W |
00D4: BTFSC 03.2 |
00D5: GOTO 0E3 |
00D6: MOVLW 02 |
00D7: MOVWF 78 |
00D8: CLRF 77 |
00D9: DECFSZ 77,F |
00DA: GOTO 0D9 |
00DB: DECFSZ 78,F |
00DC: GOTO 0D8 |
00DD: MOVLW 97 |
00DE: MOVWF 77 |
00DF: DECFSZ 77,F |
00E0: GOTO 0DF |
00E1: DECFSZ 00,F |
00E2: GOTO 0D6 |
00E3: RETURN |
.................... |
.................... |
.................... |
.................... |
.................... |
.................... #define EEPROM_SDA PIN_C4 |
.................... #define EEPROM_SCL PIN_C3 |
.................... #use i2c(master, sda=EEPROM_SDA, scl=EEPROM_SCL) |
* |
0086: MOVLW 08 |
0087: MOVWF 78 |
0088: NOP |
0089: BCF 07.3 |
008A: BCF 20.3 |
008B: MOVF 20,W |
008C: BSF 03.5 |
008D: MOVWF 07 |
008E: NOP |
008F: BCF 03.5 |
0090: RLF 2C,F |
0091: BCF 07.4 |
0092: BTFSS 03.0 |
0093: GOTO 09A |
0094: BSF 20.4 |
0095: MOVF 20,W |
0096: BSF 03.5 |
0097: MOVWF 07 |
0098: GOTO 09E |
0099: BCF 03.5 |
009A: BCF 20.4 |
009B: MOVF 20,W |
009C: BSF 03.5 |
009D: MOVWF 07 |
009E: NOP |
009F: BCF 03.5 |
00A0: BSF 20.3 |
00A1: MOVF 20,W |
00A2: BSF 03.5 |
00A3: MOVWF 07 |
00A4: BCF 03.5 |
00A5: BTFSS 07.3 |
00A6: GOTO 0A5 |
00A7: DECFSZ 78,F |
00A8: GOTO 088 |
00A9: NOP |
00AA: BCF 07.3 |
00AB: BCF 20.3 |
00AC: MOVF 20,W |
00AD: BSF 03.5 |
00AE: MOVWF 07 |
00AF: NOP |
00B0: BCF 03.5 |
00B1: BSF 20.4 |
00B2: MOVF 20,W |
00B3: BSF 03.5 |
00B4: MOVWF 07 |
00B5: NOP |
00B6: NOP |
00B7: BCF 03.5 |
00B8: BSF 20.3 |
00B9: MOVF 20,W |
00BA: BSF 03.5 |
00BB: MOVWF 07 |
00BC: BCF 03.5 |
00BD: BTFSS 07.3 |
00BE: GOTO 0BD |
00BF: CLRF 78 |
00C0: NOP |
00C1: BTFSC 07.4 |
00C2: BSF 78.0 |
00C3: BCF 07.3 |
00C4: BCF 20.3 |
00C5: MOVF 20,W |
00C6: BSF 03.5 |
00C7: MOVWF 07 |
00C8: BCF 03.5 |
00C9: BCF 07.4 |
00CA: BCF 20.4 |
00CB: MOVF 20,W |
00CC: BSF 03.5 |
00CD: MOVWF 07 |
00CE: BCF 03.5 |
00CF: RETURN |
* |
00E4: MOVLW 08 |
00E5: MOVWF 2D |
00E6: MOVF 77,W |
00E7: MOVWF 2E |
00E8: BSF 20.4 |
00E9: MOVF 20,W |
00EA: BSF 03.5 |
00EB: MOVWF 07 |
00EC: NOP |
00ED: BCF 03.5 |
00EE: BSF 20.3 |
00EF: MOVF 20,W |
00F0: BSF 03.5 |
00F1: MOVWF 07 |
00F2: BCF 03.5 |
00F3: BTFSS 07.3 |
00F4: GOTO 0F3 |
00F5: BTFSC 07.4 |
00F6: BSF 03.0 |
00F7: BTFSS 07.4 |
00F8: BCF 03.0 |
00F9: RLF 78,F |
00FA: NOP |
00FB: BCF 20.3 |
00FC: MOVF 20,W |
00FD: BSF 03.5 |
00FE: MOVWF 07 |
00FF: BCF 03.5 |
0100: BCF 07.3 |
0101: DECFSZ 2D,F |
0102: GOTO 0E8 |
0103: BSF 20.4 |
0104: MOVF 20,W |
0105: BSF 03.5 |
0106: MOVWF 07 |
0107: NOP |
0108: BCF 03.5 |
0109: BCF 07.4 |
010A: MOVF 2E,W |
010B: BTFSC 03.2 |
010C: GOTO 112 |
010D: BCF 20.4 |
010E: MOVF 20,W |
010F: BSF 03.5 |
0110: MOVWF 07 |
0111: BCF 03.5 |
0112: NOP |
0113: BSF 20.3 |
0114: MOVF 20,W |
0115: BSF 03.5 |
0116: MOVWF 07 |
0117: BCF 03.5 |
0118: BTFSS 07.3 |
0119: GOTO 118 |
011A: NOP |
011B: BCF 07.3 |
011C: BCF 20.3 |
011D: MOVF 20,W |
011E: BSF 03.5 |
011F: MOVWF 07 |
0120: NOP |
0121: BCF 03.5 |
0122: BCF 07.4 |
0123: BCF 20.4 |
0124: MOVF 20,W |
0125: BSF 03.5 |
0126: MOVWF 07 |
0127: BCF 03.5 |
0128: RETURN |
.................... #use rs232(baud=9600,parity=N,xmit=PIN_C7,rcv=PIN_C6,bits=8) //rcv TXD xmit RXD |
* |
001A: BCF 20.7 |
001B: MOVF 20,W |
001C: BSF 03.5 |
001D: MOVWF 07 |
001E: BCF 03.5 |
001F: BCF 07.7 |
0020: MOVLW 08 |
0021: MOVWF 78 |
0022: GOTO 023 |
0023: NOP |
0024: BSF 78.7 |
0025: GOTO 034 |
0026: BCF 78.7 |
0027: RRF 30,F |
0028: BTFSC 03.0 |
0029: BSF 07.7 |
002A: BTFSS 03.0 |
002B: BCF 07.7 |
002C: BSF 78.6 |
002D: GOTO 034 |
002E: BCF 78.6 |
002F: DECFSZ 78,F |
0030: GOTO 027 |
0031: GOTO 032 |
0032: NOP |
0033: BSF 07.7 |
0034: MOVLW 3F |
0035: MOVWF 04 |
0036: DECFSZ 04,F |
0037: GOTO 036 |
0038: NOP |
0039: BTFSC 78.7 |
003A: GOTO 026 |
003B: BTFSC 78.6 |
003C: GOTO 02E |
003D: RETURN |
.................... |
.................... |
.................... void main() |
.................... { |
* |
019B: CLRF 04 |
019C: BCF 03.7 |
019D: MOVLW 1F |
019E: ANDWF 03,F |
019F: MOVLW 71 |
01A0: BSF 03.5 |
01A1: MOVWF 0F |
01A2: MOVF 0F,W |
01A3: BCF 03.5 |
01A4: BCF 20.7 |
01A5: MOVF 20,W |
01A6: BSF 03.5 |
01A7: MOVWF 07 |
01A8: BCF 03.5 |
01A9: BSF 07.7 |
01AA: BSF 03.5 |
01AB: BSF 03.6 |
01AC: MOVF 09,W |
01AD: ANDLW C0 |
01AE: MOVWF 09 |
01AF: BCF 03.6 |
01B0: BCF 1F.4 |
01B1: BCF 1F.5 |
01B2: MOVLW 00 |
01B3: BSF 03.6 |
01B4: MOVWF 08 |
01B5: BCF 03.5 |
01B6: CLRF 07 |
01B7: CLRF 08 |
01B8: CLRF 09 |
.................... |
.................... setup_adc_ports(NO_ANALOGS|VSS_VDD); |
* |
01BC: BSF 03.5 |
01BD: BSF 03.6 |
01BE: MOVF 09,W |
01BF: ANDLW C0 |
01C0: MOVWF 09 |
01C1: BCF 03.6 |
01C2: BCF 1F.4 |
01C3: BCF 1F.5 |
01C4: MOVLW 00 |
01C5: BSF 03.6 |
01C6: MOVWF 08 |
.................... setup_adc(ADC_CLOCK_DIV_2); |
01C7: BCF 03.5 |
01C8: BCF 03.6 |
01C9: BCF 1F.6 |
01CA: BCF 1F.7 |
01CB: BSF 03.5 |
01CC: BCF 1F.7 |
01CD: BCF 03.5 |
01CE: BSF 1F.0 |
.................... setup_spi(SPI_SS_DISABLED); |
01CF: BCF 14.5 |
01D0: BCF 20.5 |
01D1: MOVF 20,W |
01D2: BSF 03.5 |
01D3: MOVWF 07 |
01D4: BCF 03.5 |
01D5: BSF 20.4 |
01D6: MOVF 20,W |
01D7: BSF 03.5 |
01D8: MOVWF 07 |
01D9: BCF 03.5 |
01DA: BCF 20.3 |
01DB: MOVF 20,W |
01DC: BSF 03.5 |
01DD: MOVWF 07 |
01DE: MOVLW 01 |
01DF: BCF 03.5 |
01E0: MOVWF 14 |
01E1: MOVLW 00 |
01E2: BSF 03.5 |
01E3: MOVWF 14 |
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); |
01E4: MOVF 01,W |
01E5: ANDLW C7 |
01E6: IORLW 08 |
01E7: MOVWF 01 |
.................... setup_timer_1(T1_DISABLED); |
01E8: BCF 03.5 |
01E9: CLRF 10 |
.................... setup_timer_2(T2_DISABLED,0,1); |
01EA: MOVLW 00 |
01EB: MOVWF 78 |
01EC: MOVWF 12 |
01ED: MOVLW 00 |
01EE: BSF 03.5 |
01EF: MOVWF 12 |
.................... setup_ccp1(CCP_OFF); |
01F0: BCF 03.5 |
01F1: BSF 20.2 |
01F2: MOVF 20,W |
01F3: BSF 03.5 |
01F4: MOVWF 07 |
01F5: BCF 03.5 |
01F6: CLRF 17 |
01F7: BSF 03.5 |
01F8: CLRF 1B |
01F9: CLRF 1C |
01FA: MOVLW 01 |
01FB: MOVWF 1D |
.................... setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard |
01FC: BCF 03.5 |
01FD: BSF 03.6 |
01FE: CLRF 07 |
01FF: CLRF 08 |
0200: CLRF 09 |
.................... |
.................... printf("Simple Thermomether \r\n",); |
0201: MOVLW 04 |
0202: MOVWF 0D |
0203: MOVLW 00 |
0204: MOVWF 0F |
0205: BCF 03.6 |
0206: GOTO 03E |
.................... unsigned int8 STAV1,STAV2; |
.................... |
.................... unsigned int16 SOUCET, SOUCET1; |
.................... unsigned int8 LSB=0,ZK,k=0,VH,VL; |
0207: CLRF 27 |
0208: CLRF 29 |
.................... //unsigned int8 |
.................... |
.................... while(TRUE) |
.................... { |
.................... |
.................... |
.................... |
.................... |
.................... i2c_start(); //blockdatacontrol |
0209: BSF 20.4 |
020A: MOVF 20,W |
020B: BSF 03.5 |
020C: MOVWF 07 |
020D: NOP |
020E: BCF 03.5 |
020F: BSF 20.3 |
0210: MOVF 20,W |
0211: BSF 03.5 |
0212: MOVWF 07 |
0213: NOP |
0214: BCF 03.5 |
0215: BCF 07.4 |
0216: BCF 20.4 |
0217: MOVF 20,W |
0218: BSF 03.5 |
0219: MOVWF 07 |
021A: NOP |
021B: BCF 03.5 |
021C: BCF 07.3 |
021D: BCF 20.3 |
021E: MOVF 20,W |
021F: BSF 03.5 |
0220: MOVWF 07 |
.................... I2C_Write(0xAA); |
0221: MOVLW AA |
0222: BCF 03.5 |
0223: MOVWF 2C |
0224: CALL 086 |
.................... I2C_write(0x61); |
0225: MOVLW 61 |
0226: MOVWF 2C |
0227: CALL 086 |
.................... i2c_start(); |
0228: BSF 20.4 |
0229: MOVF 20,W |
022A: BSF 03.5 |
022B: MOVWF 07 |
022C: NOP |
022D: BCF 03.5 |
022E: BSF 20.3 |
022F: MOVF 20,W |
0230: BSF 03.5 |
0231: MOVWF 07 |
0232: NOP |
0233: BCF 03.5 |
0234: BTFSS 07.3 |
0235: GOTO 234 |
0236: BCF 07.4 |
0237: BCF 20.4 |
0238: MOVF 20,W |
0239: BSF 03.5 |
023A: MOVWF 07 |
023B: NOP |
023C: BCF 03.5 |
023D: BCF 07.3 |
023E: BCF 20.3 |
023F: MOVF 20,W |
0240: BSF 03.5 |
0241: MOVWF 07 |
.................... I2C_Write(0xAA); |
0242: MOVLW AA |
0243: BCF 03.5 |
0244: MOVWF 2C |
0245: CALL 086 |
.................... i2c_write(0x00); |
0246: CLRF 2C |
0247: CALL 086 |
.................... i2c_stop(); |
0248: BCF 20.4 |
0249: MOVF 20,W |
024A: BSF 03.5 |
024B: MOVWF 07 |
024C: NOP |
024D: BCF 03.5 |
024E: BSF 20.3 |
024F: MOVF 20,W |
0250: BSF 03.5 |
0251: MOVWF 07 |
0252: BCF 03.5 |
0253: BTFSS 07.3 |
0254: GOTO 253 |
0255: NOP |
0256: GOTO 257 |
0257: NOP |
0258: BSF 20.4 |
0259: MOVF 20,W |
025A: BSF 03.5 |
025B: MOVWF 07 |
025C: NOP |
.................... delay_ms (1); |
025D: MOVLW 01 |
025E: BCF 03.5 |
025F: MOVWF 2C |
0260: CALL 0D0 |
.................... |
.................... |
.................... i2c_start();//dataflashclass |
0261: BSF 20.4 |
0262: MOVF 20,W |
0263: BSF 03.5 |
0264: MOVWF 07 |
0265: NOP |
0266: BCF 03.5 |
0267: BSF 20.3 |
0268: MOVF 20,W |
0269: BSF 03.5 |
026A: MOVWF 07 |
026B: NOP |
026C: BCF 03.5 |
026D: BCF 07.4 |
026E: BCF 20.4 |
026F: MOVF 20,W |
0270: BSF 03.5 |
0271: MOVWF 07 |
0272: NOP |
0273: BCF 03.5 |
0274: BCF 07.3 |
0275: BCF 20.3 |
0276: MOVF 20,W |
0277: BSF 03.5 |
0278: MOVWF 07 |
.................... I2C_Write(0xAA); |
0279: MOVLW AA |
027A: BCF 03.5 |
027B: MOVWF 2C |
027C: CALL 086 |
.................... I2C_write(0x3e); |
027D: MOVLW 3E |
027E: MOVWF 2C |
027F: CALL 086 |
.................... |
.................... i2c_start(); |
0280: BSF 20.4 |
0281: MOVF 20,W |
0282: BSF 03.5 |
0283: MOVWF 07 |
0284: NOP |
0285: BCF 03.5 |
0286: BSF 20.3 |
0287: MOVF 20,W |
0288: BSF 03.5 |
0289: MOVWF 07 |
028A: NOP |
028B: BCF 03.5 |
028C: BTFSS 07.3 |
028D: GOTO 28C |
028E: BCF 07.4 |
028F: BCF 20.4 |
0290: MOVF 20,W |
0291: BSF 03.5 |
0292: MOVWF 07 |
0293: NOP |
0294: BCF 03.5 |
0295: BCF 07.3 |
0296: BCF 20.3 |
0297: MOVF 20,W |
0298: BSF 03.5 |
0299: MOVWF 07 |
.................... I2C_Write(0xAA); |
029A: MOVLW AA |
029B: BCF 03.5 |
029C: MOVWF 2C |
029D: CALL 086 |
.................... i2c_write(0x50); |
029E: MOVLW 50 |
029F: MOVWF 2C |
02A0: CALL 086 |
.................... i2c_stop(); |
02A1: BCF 20.4 |
02A2: MOVF 20,W |
02A3: BSF 03.5 |
02A4: MOVWF 07 |
02A5: NOP |
02A6: BCF 03.5 |
02A7: BSF 20.3 |
02A8: MOVF 20,W |
02A9: BSF 03.5 |
02AA: MOVWF 07 |
02AB: BCF 03.5 |
02AC: BTFSS 07.3 |
02AD: GOTO 2AC |
02AE: NOP |
02AF: GOTO 2B0 |
02B0: NOP |
02B1: BSF 20.4 |
02B2: MOVF 20,W |
02B3: BSF 03.5 |
02B4: MOVWF 07 |
02B5: NOP |
.................... delay_ms (1); |
02B6: MOVLW 01 |
02B7: BCF 03.5 |
02B8: MOVWF 2C |
02B9: CALL 0D0 |
.................... |
.................... |
.................... i2c_start();//dataflashblock |
02BA: BSF 20.4 |
02BB: MOVF 20,W |
02BC: BSF 03.5 |
02BD: MOVWF 07 |
02BE: NOP |
02BF: BCF 03.5 |
02C0: BSF 20.3 |
02C1: MOVF 20,W |
02C2: BSF 03.5 |
02C3: MOVWF 07 |
02C4: NOP |
02C5: BCF 03.5 |
02C6: BCF 07.4 |
02C7: BCF 20.4 |
02C8: MOVF 20,W |
02C9: BSF 03.5 |
02CA: MOVWF 07 |
02CB: NOP |
02CC: BCF 03.5 |
02CD: BCF 07.3 |
02CE: BCF 20.3 |
02CF: MOVF 20,W |
02D0: BSF 03.5 |
02D1: MOVWF 07 |
.................... I2C_Write(0xAA); |
02D2: MOVLW AA |
02D3: BCF 03.5 |
02D4: MOVWF 2C |
02D5: CALL 086 |
.................... I2C_write(0x3f); |
02D6: MOVLW 3F |
02D7: MOVWF 2C |
02D8: CALL 086 |
.................... |
.................... i2c_start(); |
02D9: BSF 20.4 |
02DA: MOVF 20,W |
02DB: BSF 03.5 |
02DC: MOVWF 07 |
02DD: NOP |
02DE: BCF 03.5 |
02DF: BSF 20.3 |
02E0: MOVF 20,W |
02E1: BSF 03.5 |
02E2: MOVWF 07 |
02E3: NOP |
02E4: BCF 03.5 |
02E5: BTFSS 07.3 |
02E6: GOTO 2E5 |
02E7: BCF 07.4 |
02E8: BCF 20.4 |
02E9: MOVF 20,W |
02EA: BSF 03.5 |
02EB: MOVWF 07 |
02EC: NOP |
02ED: BCF 03.5 |
02EE: BCF 07.3 |
02EF: BCF 20.3 |
02F0: MOVF 20,W |
02F1: BSF 03.5 |
02F2: MOVWF 07 |
.................... I2C_Write(0xAA); |
02F3: MOVLW AA |
02F4: BCF 03.5 |
02F5: MOVWF 2C |
02F6: CALL 086 |
.................... I2C_write(0x02); |
02F7: MOVLW 02 |
02F8: MOVWF 2C |
02F9: CALL 086 |
.................... i2c_stop(); |
02FA: BCF 20.4 |
02FB: MOVF 20,W |
02FC: BSF 03.5 |
02FD: MOVWF 07 |
02FE: NOP |
02FF: BCF 03.5 |
0300: BSF 20.3 |
0301: MOVF 20,W |
0302: BSF 03.5 |
0303: MOVWF 07 |
0304: BCF 03.5 |
0305: BTFSS 07.3 |
0306: GOTO 305 |
0307: NOP |
0308: GOTO 309 |
0309: NOP |
030A: BSF 20.4 |
030B: MOVF 20,W |
030C: BSF 03.5 |
030D: MOVWF 07 |
030E: NOP |
.................... |
.................... delay_ms (1); |
030F: MOVLW 01 |
0310: BCF 03.5 |
0311: MOVWF 2C |
0312: CALL 0D0 |
.................... |
.................... |
.................... |
.................... |
.................... i2c_start();//blockdata horni bit |
0313: BSF 20.4 |
0314: MOVF 20,W |
0315: BSF 03.5 |
0316: MOVWF 07 |
0317: NOP |
0318: BCF 03.5 |
0319: BSF 20.3 |
031A: MOVF 20,W |
031B: BSF 03.5 |
031C: MOVWF 07 |
031D: NOP |
031E: BCF 03.5 |
031F: BCF 07.4 |
0320: BCF 20.4 |
0321: MOVF 20,W |
0322: BSF 03.5 |
0323: MOVWF 07 |
0324: NOP |
0325: BCF 03.5 |
0326: BCF 07.3 |
0327: BCF 20.3 |
0328: MOVF 20,W |
0329: BSF 03.5 |
032A: MOVWF 07 |
.................... I2C_Write(0xAA); |
032B: MOVLW AA |
032C: BCF 03.5 |
032D: MOVWF 2C |
032E: CALL 086 |
.................... I2C_write(0x43); |
032F: MOVLW 43 |
0330: MOVWF 2C |
0331: CALL 086 |
.................... |
.................... i2c_start(); |
0332: BSF 20.4 |
0333: MOVF 20,W |
0334: BSF 03.5 |
0335: MOVWF 07 |
0336: NOP |
0337: BCF 03.5 |
0338: BSF 20.3 |
0339: MOVF 20,W |
033A: BSF 03.5 |
033B: MOVWF 07 |
033C: NOP |
033D: BCF 03.5 |
033E: BTFSS 07.3 |
033F: GOTO 33E |
0340: BCF 07.4 |
0341: BCF 20.4 |
0342: MOVF 20,W |
0343: BSF 03.5 |
0344: MOVWF 07 |
0345: NOP |
0346: BCF 03.5 |
0347: BCF 07.3 |
0348: BCF 20.3 |
0349: MOVF 20,W |
034A: BSF 03.5 |
034B: MOVWF 07 |
.................... I2C_Write(0xAB); |
034C: MOVLW AB |
034D: BCF 03.5 |
034E: MOVWF 2C |
034F: CALL 086 |
.................... VH=I2C_read(0); |
0350: CLRF 77 |
0351: CALL 0E4 |
0352: MOVF 78,W |
0353: MOVWF 2A |
.................... |
.................... i2c_stop(); |
0354: BCF 20.4 |
0355: MOVF 20,W |
0356: BSF 03.5 |
0357: MOVWF 07 |
0358: NOP |
0359: BCF 03.5 |
035A: BSF 20.3 |
035B: MOVF 20,W |
035C: BSF 03.5 |
035D: MOVWF 07 |
035E: BCF 03.5 |
035F: BTFSS 07.3 |
0360: GOTO 35F |
0361: NOP |
0362: GOTO 363 |
0363: NOP |
0364: BSF 20.4 |
0365: MOVF 20,W |
0366: BSF 03.5 |
0367: MOVWF 07 |
0368: NOP |
.................... |
.................... i2c_start();//blockdata |
0369: BCF 03.5 |
036A: BSF 20.4 |
036B: MOVF 20,W |
036C: BSF 03.5 |
036D: MOVWF 07 |
036E: NOP |
036F: BCF 03.5 |
0370: BSF 20.3 |
0371: MOVF 20,W |
0372: BSF 03.5 |
0373: MOVWF 07 |
0374: NOP |
0375: BCF 03.5 |
0376: BCF 07.4 |
0377: BCF 20.4 |
0378: MOVF 20,W |
0379: BSF 03.5 |
037A: MOVWF 07 |
037B: NOP |
037C: BCF 03.5 |
037D: BCF 07.3 |
037E: BCF 20.3 |
037F: MOVF 20,W |
0380: BSF 03.5 |
0381: MOVWF 07 |
.................... I2C_Write(0xAA); |
0382: MOVLW AA |
0383: BCF 03.5 |
0384: MOVWF 2C |
0385: CALL 086 |
.................... I2C_write(0x44); |
0386: MOVLW 44 |
0387: MOVWF 2C |
0388: CALL 086 |
.................... |
.................... i2c_start(); |
0389: BSF 20.4 |
038A: MOVF 20,W |
038B: BSF 03.5 |
038C: MOVWF 07 |
038D: NOP |
038E: BCF 03.5 |
038F: BSF 20.3 |
0390: MOVF 20,W |
0391: BSF 03.5 |
0392: MOVWF 07 |
0393: NOP |
0394: BCF 03.5 |
0395: BTFSS 07.3 |
0396: GOTO 395 |
0397: BCF 07.4 |
0398: BCF 20.4 |
0399: MOVF 20,W |
039A: BSF 03.5 |
039B: MOVWF 07 |
039C: NOP |
039D: BCF 03.5 |
039E: BCF 07.3 |
039F: BCF 20.3 |
03A0: MOVF 20,W |
03A1: BSF 03.5 |
03A2: MOVWF 07 |
.................... I2C_Write(0xAB); |
03A3: MOVLW AB |
03A4: BCF 03.5 |
03A5: MOVWF 2C |
03A6: CALL 086 |
.................... |
.................... VL=I2C_read(0); |
03A7: CLRF 77 |
03A8: CALL 0E4 |
03A9: MOVF 78,W |
03AA: MOVWF 2B |
.................... i2c_stop(); |
03AB: BCF 20.4 |
03AC: MOVF 20,W |
03AD: BSF 03.5 |
03AE: MOVWF 07 |
03AF: NOP |
03B0: BCF 03.5 |
03B1: BSF 20.3 |
03B2: MOVF 20,W |
03B3: BSF 03.5 |
03B4: MOVWF 07 |
03B5: BCF 03.5 |
03B6: BTFSS 07.3 |
03B7: GOTO 3B6 |
03B8: NOP |
03B9: GOTO 3BA |
03BA: NOP |
03BB: BSF 20.4 |
03BC: MOVF 20,W |
03BD: BSF 03.5 |
03BE: MOVWF 07 |
03BF: NOP |
.................... |
.................... |
.................... delay_ms (1); |
03C0: MOVLW 01 |
03C1: BCF 03.5 |
03C2: MOVWF 2C |
03C3: CALL 0D0 |
.................... |
.................... printf("VL %lX \r\n", VL); |
03C4: MOVLW 56 |
03C5: MOVWF 30 |
03C6: CALL 01A |
03C7: MOVLW 4C |
03C8: MOVWF 30 |
03C9: CALL 01A |
03CA: MOVLW 20 |
03CB: MOVWF 30 |
03CC: CALL 01A |
03CD: MOVF 2B,W |
03CE: MOVWF 2C |
03CF: MOVLW 37 |
03D0: MOVWF 2D |
03D1: CALL 129 |
03D2: MOVLW 20 |
03D3: MOVWF 30 |
03D4: CALL 01A |
03D5: MOVLW 0D |
03D6: MOVWF 30 |
03D7: CALL 01A |
03D8: MOVLW 0A |
03D9: MOVWF 30 |
03DA: CALL 01A |
.................... printf("LH %lX \r\n", VH); |
03DB: MOVLW 4C |
03DC: MOVWF 30 |
03DD: CALL 01A |
03DE: MOVLW 48 |
03DF: MOVWF 30 |
03E0: CALL 01A |
03E1: MOVLW 20 |
03E2: MOVWF 30 |
03E3: CALL 01A |
03E4: MOVF 2A,W |
03E5: MOVWF 2C |
03E6: MOVLW 37 |
03E7: MOVWF 2D |
03E8: CALL 129 |
03E9: MOVLW 20 |
03EA: MOVWF 30 |
03EB: CALL 01A |
03EC: MOVLW 0D |
03ED: MOVWF 30 |
03EE: CALL 01A |
03EF: MOVLW 0A |
03F0: MOVWF 30 |
03F1: CALL 01A |
.................... |
.................... |
.................... |
.................... |
.................... |
.................... |
.................... if(VH==0x0A) |
03F2: MOVF 2A,W |
03F3: SUBLW 0A |
03F4: BTFSS 03.2 |
03F5: GOTO 412 |
.................... { |
.................... LSB=LSB-1; |
03F6: MOVLW 01 |
03F7: SUBWF 27,F |
.................... printf("Vysledne LSB %lX \r\n", LSB); |
03F8: MOVLW 10 |
03F9: BSF 03.6 |
03FA: MOVWF 0D |
03FB: MOVLW 00 |
03FC: MOVWF 0F |
03FD: BCF 03.0 |
03FE: MOVLW 0D |
03FF: BCF 03.6 |
0400: MOVWF 2C |
0401: GOTO 14A |
0402: MOVF 27,W |
0403: MOVWF 2C |
0404: MOVLW 37 |
0405: MOVWF 2D |
0406: CALL 129 |
0407: MOVLW 20 |
0408: MOVWF 30 |
0409: CALL 01A |
040A: MOVLW 0D |
040B: MOVWF 30 |
040C: CALL 01A |
040D: MOVLW 0A |
040E: MOVWF 30 |
040F: CALL 01A |
.................... while(TRUE) |
.................... { |
.................... } |
0410: GOTO 410 |
.................... } |
.................... |
.................... else |
0411: GOTO 4BE |
.................... { |
.................... |
.................... |
.................... i2c_start();//blockdata |
0412: BSF 20.4 |
0413: MOVF 20,W |
0414: BSF 03.5 |
0415: MOVWF 07 |
0416: NOP |
0417: BCF 03.5 |
0418: BSF 20.3 |
0419: MOVF 20,W |
041A: BSF 03.5 |
041B: MOVWF 07 |
041C: NOP |
041D: BCF 03.5 |
041E: BCF 07.4 |
041F: BCF 20.4 |
0420: MOVF 20,W |
0421: BSF 03.5 |
0422: MOVWF 07 |
0423: NOP |
0424: BCF 03.5 |
0425: BCF 07.3 |
0426: BCF 20.3 |
0427: MOVF 20,W |
0428: BSF 03.5 |
0429: MOVWF 07 |
.................... I2C_Write(0xAA); |
042A: MOVLW AA |
042B: BCF 03.5 |
042C: MOVWF 2C |
042D: CALL 086 |
.................... I2C_write(0x43); |
042E: MOVLW 43 |
042F: MOVWF 2C |
0430: CALL 086 |
.................... |
.................... i2c_start(); |
0431: BSF 20.4 |
0432: MOVF 20,W |
0433: BSF 03.5 |
0434: MOVWF 07 |
0435: NOP |
0436: BCF 03.5 |
0437: BSF 20.3 |
0438: MOVF 20,W |
0439: BSF 03.5 |
043A: MOVWF 07 |
043B: NOP |
043C: BCF 03.5 |
043D: BTFSS 07.3 |
043E: GOTO 43D |
043F: BCF 07.4 |
0440: BCF 20.4 |
0441: MOVF 20,W |
0442: BSF 03.5 |
0443: MOVWF 07 |
0444: NOP |
0445: BCF 03.5 |
0446: BCF 07.3 |
0447: BCF 20.3 |
0448: MOVF 20,W |
0449: BSF 03.5 |
044A: MOVWF 07 |
.................... I2C_Write(0xAA); |
044B: MOVLW AA |
044C: BCF 03.5 |
044D: MOVWF 2C |
044E: CALL 086 |
.................... I2C_write(0x0A); |
044F: MOVLW 0A |
0450: MOVWF 2C |
0451: CALL 086 |
.................... i2c_stop(); |
0452: BCF 20.4 |
0453: MOVF 20,W |
0454: BSF 03.5 |
0455: MOVWF 07 |
0456: NOP |
0457: BCF 03.5 |
0458: BSF 20.3 |
0459: MOVF 20,W |
045A: BSF 03.5 |
045B: MOVWF 07 |
045C: BCF 03.5 |
045D: BTFSS 07.3 |
045E: GOTO 45D |
045F: NOP |
0460: GOTO 461 |
0461: NOP |
0462: BSF 20.4 |
0463: MOVF 20,W |
0464: BSF 03.5 |
0465: MOVWF 07 |
0466: NOP |
.................... |
.................... i2c_start();//blockdata |
0467: BCF 03.5 |
0468: BSF 20.4 |
0469: MOVF 20,W |
046A: BSF 03.5 |
046B: MOVWF 07 |
046C: NOP |
046D: BCF 03.5 |
046E: BSF 20.3 |
046F: MOVF 20,W |
0470: BSF 03.5 |
0471: MOVWF 07 |
0472: NOP |
0473: BCF 03.5 |
0474: BCF 07.4 |
0475: BCF 20.4 |
0476: MOVF 20,W |
0477: BSF 03.5 |
0478: MOVWF 07 |
0479: NOP |
047A: BCF 03.5 |
047B: BCF 07.3 |
047C: BCF 20.3 |
047D: MOVF 20,W |
047E: BSF 03.5 |
047F: MOVWF 07 |
.................... I2C_Write(0xAA); |
0480: MOVLW AA |
0481: BCF 03.5 |
0482: MOVWF 2C |
0483: CALL 086 |
.................... I2C_write(0x44); |
0484: MOVLW 44 |
0485: MOVWF 2C |
0486: CALL 086 |
.................... |
.................... i2c_start(); |
0487: BSF 20.4 |
0488: MOVF 20,W |
0489: BSF 03.5 |
048A: MOVWF 07 |
048B: NOP |
048C: BCF 03.5 |
048D: BSF 20.3 |
048E: MOVF 20,W |
048F: BSF 03.5 |
0490: MOVWF 07 |
0491: NOP |
0492: BCF 03.5 |
0493: BTFSS 07.3 |
0494: GOTO 493 |
0495: BCF 07.4 |
0496: BCF 20.4 |
0497: MOVF 20,W |
0498: BSF 03.5 |
0499: MOVWF 07 |
049A: NOP |
049B: BCF 03.5 |
049C: BCF 07.3 |
049D: BCF 20.3 |
049E: MOVF 20,W |
049F: BSF 03.5 |
04A0: MOVWF 07 |
.................... I2C_Write(0xAA); |
04A1: MOVLW AA |
04A2: BCF 03.5 |
04A3: MOVWF 2C |
04A4: CALL 086 |
.................... I2C_write(0x5A); |
04A5: MOVLW 5A |
04A6: MOVWF 2C |
04A7: CALL 086 |
.................... i2c_stop(); |
04A8: BCF 20.4 |
04A9: MOVF 20,W |
04AA: BSF 03.5 |
04AB: MOVWF 07 |
04AC: NOP |
04AD: BCF 03.5 |
04AE: BSF 20.3 |
04AF: MOVF 20,W |
04B0: BSF 03.5 |
04B1: MOVWF 07 |
04B2: BCF 03.5 |
04B3: BTFSS 07.3 |
04B4: GOTO 4B3 |
04B5: NOP |
04B6: GOTO 4B7 |
04B7: NOP |
04B8: BSF 20.4 |
04B9: MOVF 20,W |
04BA: BSF 03.5 |
04BB: MOVWF 07 |
04BC: NOP |
04BD: BCF 03.5 |
.................... |
.................... |
.................... |
.................... |
.................... } |
.................... |
.................... i2c_start();//blockdata |
04BE: BSF 20.4 |
04BF: MOVF 20,W |
04C0: BSF 03.5 |
04C1: MOVWF 07 |
04C2: NOP |
04C3: BCF 03.5 |
04C4: BSF 20.3 |
04C5: MOVF 20,W |
04C6: BSF 03.5 |
04C7: MOVWF 07 |
04C8: NOP |
04C9: BCF 03.5 |
04CA: BCF 07.4 |
04CB: BCF 20.4 |
04CC: MOVF 20,W |
04CD: BSF 03.5 |
04CE: MOVWF 07 |
04CF: NOP |
04D0: BCF 03.5 |
04D1: BCF 07.3 |
04D2: BCF 20.3 |
04D3: MOVF 20,W |
04D4: BSF 03.5 |
04D5: MOVWF 07 |
.................... I2C_Write(0xAA); |
04D6: MOVLW AA |
04D7: BCF 03.5 |
04D8: MOVWF 2C |
04D9: CALL 086 |
.................... I2C_write(0x60); |
04DA: MOVLW 60 |
04DB: MOVWF 2C |
04DC: CALL 086 |
.................... |
.................... i2c_start(); |
04DD: BSF 20.4 |
04DE: MOVF 20,W |
04DF: BSF 03.5 |
04E0: MOVWF 07 |
04E1: NOP |
04E2: BCF 03.5 |
04E3: BSF 20.3 |
04E4: MOVF 20,W |
04E5: BSF 03.5 |
04E6: MOVWF 07 |
04E7: NOP |
04E8: BCF 03.5 |
04E9: BTFSS 07.3 |
04EA: GOTO 4E9 |
04EB: BCF 07.4 |
04EC: BCF 20.4 |
04ED: MOVF 20,W |
04EE: BSF 03.5 |
04EF: MOVWF 07 |
04F0: NOP |
04F1: BCF 03.5 |
04F2: BCF 07.3 |
04F3: BCF 20.3 |
04F4: MOVF 20,W |
04F5: BSF 03.5 |
04F6: MOVWF 07 |
.................... I2C_Write(0xAA); |
04F7: MOVLW AA |
04F8: BCF 03.5 |
04F9: MOVWF 2C |
04FA: CALL 086 |
.................... I2C_write(LSB); |
04FB: MOVF 27,W |
04FC: MOVWF 2C |
04FD: CALL 086 |
.................... i2c_stop(); |
04FE: BCF 20.4 |
04FF: MOVF 20,W |
0500: BSF 03.5 |
0501: MOVWF 07 |
0502: NOP |
0503: BCF 03.5 |
0504: BSF 20.3 |
0505: MOVF 20,W |
0506: BSF 03.5 |
0507: MOVWF 07 |
0508: BCF 03.5 |
0509: BTFSS 07.3 |
050A: GOTO 509 |
050B: NOP |
050C: GOTO 50D |
050D: NOP |
050E: BSF 20.4 |
050F: MOVF 20,W |
0510: BSF 03.5 |
0511: MOVWF 07 |
0512: NOP |
.................... |
.................... LSB=LSB+1; |
0513: MOVLW 01 |
0514: BCF 03.5 |
0515: ADDWF 27,F |
.................... |
.................... delay_ms (100); |
0516: MOVLW 64 |
0517: MOVWF 2C |
0518: CALL 0D0 |
.................... |
.................... } |
0519: GOTO 209 |
.................... |
.................... } |
.................... |
051A: SLEEP |
Configuration Fuses: |
Word 1: 2CF5 INTRC NOWDT NOPUT MCLR NOPROTECT NOCPD NOBROWNOUT IESO FCMEN NOLVP NODEBUG |
Word 2: 3FFF NOWRT BORV40 |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/Min_V_cl/main.pjt |
---|
0,0 → 1,24 |
[PROJECT] |
Target=C:\Users\Honza\Documents\pic\I2C_bat_pam\Min_V_cl\main.hex |
Development_Mode= |
Processor_Text=PIC16F887 |
ToolSuite=CCS |
Processor=0x887F |
[C:\Users\Honza\Documents\pic\I2C_bat_pam\Min_V_cl\main] |
Type=4 |
Path= |
FileList= |
BuildTool= |
OptionString= |
AdditionalOptionString= |
[mru-list] |
1=C:\Users\Honza\Documents\pic\I2C_bat_pam\Min_V_cl\main.c |
[Windows] |
0=0000 %S 0 0 796 451 3 0 |
[Units] |
Link=0 |
Count=1 |
1=C:\Users\Honza\Documents\pic\I2C_bat_pam\Min_V_cl\main |
[Opened Files] |
1=..\Min_V_cl\main.c |
2= |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/Min_V_cl/main.sta |
---|
0,0 → 1,55 |
ROM used: 1307 (16%) |
1307 (16%) including unused fragments |
2 Average locations per line |
16 Average locations per statement |
RAM used: 6 (2%) at main() level |
22 (6%) worst case |
Stack used: 2 worst case (out of 8 total available) |
Lines Stmts % Files |
----- ----- --- ----- |
155 83 100 main.c |
20 0 0 main.h |
423 0 0 ..\..\..\..\..\..\Program Files (x86)\PICC\devices\16F887.h |
----- ----- |
598 83 Total |
Page ROM % RAM Vol Diff Functions: |
---- --- --- --- --- ---- ---------- |
0 20 2 1 @delay_ms1 |
0 69 5 3 @I2C_READ_1 |
0 74 6 1 @I2C_WRITE_1 |
0 36 3 1 @PUTCHAR_1_ |
0 896 69 0 2556 6.0 main |
0 12 1 0 @const78 |
0 72 6 3 @PSTRINGC7_69 |
0 33 3 2 @PRINTF_X_69 |
0 10 1 0 @const94 |
0 81 6 4 @PSTRINGCN7_69 |
Program metrics: |
Functions 1 |
Statements 83 |
Comments 93 |
Volume (V) 2582 |
Difficilty (D) 5.7 |
Effort to implement (E) 14657 |
Time to implement (T) 14 minutes |
Est Delivered Bugs (B) 0 |
Cyclomatic Complexity 1 |
Maintainability (MI) 93 |
Segment Used Free |
----------- ---- ---- |
00000-00003 4 0 |
00004-007FF 1303 741 |
00800-00FFF 0 2048 |
01000-017FF 0 2048 |
01800-01FFF 0 2048 |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/Min_V_cl/main.sym |
---|
0,0 → 1,90 |
004-005 @READ_PROGRAM_MEMORY8.P1 |
004 @WRITE_PROGRAM_MEMORY8.P2 |
015 CCP_1 |
015 CCP_1_LOW |
016 CCP_1_HIGH |
01B CCP_2_LOW |
01B CCP_2 |
01C CCP_2_HIGH |
020 @TRIS_C |
021 main.STAV1 |
022 main.STAV2 |
023-024 main.SOUCET |
025-026 main.SOUCET1 |
027 main.LSB |
028 main.ZK |
029 main.k |
02A main.VH |
02B main.VL |
02C @PRINTF_X_69.P1 |
02C @delay_ms1.P2 |
02C @I2C_READ_1.P3 |
02C @I2C_WRITE_1.P4 |
02C @PSTRINGCN7_69.P5 |
02C @PSTRINGC7_69.@SCRATCH1 |
02D @PRINTF_X_69.P1 |
02D @I2C_READ_1.@SCRATCH1 |
02D @PSTRINGC7_69.@SCRATCH2 |
02D @PSTRINGCN7_69.@SCRATCH1 |
02E @I2C_READ_1.@SCRATCH2 |
02E @PSTRINGC7_69.@SCRATCH3 |
02E @PSTRINGCN7_69.@SCRATCH2 |
02F @PSTRINGCN7_69.@SCRATCH3 |
030 @PUTCHAR_1_.P1 |
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: |
00D0 @delay_ms1 |
00E4 @I2C_READ_1 |
0086 @I2C_WRITE_1 |
001A @PUTCHAR_1_ |
019B main |
0004 @const78 |
003E @PSTRINGC7_69 |
0129 @PRINTF_X_69 |
0010 @const94 |
014A @PSTRINGCN7_69 |
019B @cinit |
User Memory space: |
User Memory space: |
Project Directory: |
C:\Users\Honza\Documents\pic\I2C_bat_pam\Min_V_cl\ |
Project Files: |
main.c |
main.h |
..\..\..\..\..\..\Program Files (x86)\PICC\devices\16F887.h |
Units: |
C:\Users\Honza\Documents\pic\I2C_bat_pam\Min_V_cl\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/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/Min_V_cl/main.tre |
---|
0,0 → 1,70 |
ÀÄmain |
ÀÄmain 0/896 Ram=0 |
ÃÄ??0?? |
ÃÄ@PSTRINGC7_69 0/72 Ram=3 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/36 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 |
ÃÄ@delay_ms1 0/20 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 |
ÃÄ@delay_ms1 0/20 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 |
ÃÄ@delay_ms1 0/20 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 |
ÃÄ@delay_ms1 0/20 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PRINTF_X_69 0/33 Ram=2 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PRINTF_X_69 0/33 Ram=2 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PSTRINGCN7_69 0/81 Ram=4 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PRINTF_X_69 0/33 Ram=2 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/36 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_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_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 |
ÀÄ@delay_ms1 0/20 Ram=1 |