Problem with comparison.
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/LED_BAT7/led_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/LED_BAT7/main.c |
---|
0,0 → 1,146 |
#include "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; |
//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(0x40); |
i2c_stop(); |
delay_ms (1); |
i2c_start();//dataflashblock |
I2C_Write(0xAA); |
I2C_write(0x3f); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x00); |
i2c_stop(); |
delay_ms (1); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x44); |
i2c_start(); |
I2C_Write(0xAB); |
ZK=I2C_read(0); |
i2c_stop(); |
delay_ms (1); |
printf("LED %lX \r\n", ZK); |
if(ZK==0x73) |
{ |
LSB=LSB-1; |
printf("Vysledne LSB %lX \r\n", LSB); |
while(TRUE){} |
} |
else |
{ |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x44); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x73); //pro 5LED 0x53 pro 7led 0x73 |
i2c_stop(); |
int i=64; |
SOUCET=0; |
SOUCET1=0; |
/* |
for (i=64;i<96;++i) |
{ |
printf("%u\r\n",i); |
i2c_stop(); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(i); |
i2c_start(); |
I2C_Write(0xAB); |
STAV1=I2C_read(0); |
i2c_stop(); |
printf("STAV %lX \r\n", STAV1); |
SOUCET=SOUCET+STAV1; |
} |
printf("SOUCET: %lX (procenta)\r\n", SOUCET); |
SOUCET1=SOUCET; |
SOUCET1=SOUCET1>>8; |
printf("Deleno 256: %lX (procenta)\r\n", SOUCET1); |
SOUCET1=SOUCET-SOUCET1; |
printf("Soucet - soucet/256: %lX \r\n", SOUCET1); |
LSB=(unsigned int8)SOUCET1; |
printf("LSB: %lX\r\n", LSB); |
//printf("Stav: %X (procenta)\r\n", STAV2); |
*/ |
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/LED_BAT7/main.bak |
---|
0,0 → 1,153 |
#include "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; |
//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(0x40); |
i2c_stop(); |
delay_ms (1); |
i2c_start();//dataflashblock |
I2C_Write(0xAA); |
I2C_write(0x3f); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x00); |
i2c_stop(); |
delay_ms (1); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x44); |
i2c_start(); |
I2C_Write(0xAB); |
ZK=I2C_read(0); |
i2c_stop(); |
delay_ms (1); |
printf("LED %lX \r\n", ZK); |
if(ZK==0x73) |
{ |
LSB=LSB-1; |
printf("Vysledne LSB %lX \r\n", LSB); |
while(TRUE) |
{ |
} |
} |
else |
{ |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x44); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x73); //pro 5LED 0x53 pro 7led 0x73 |
i2c_stop(); |
int i=64; |
SOUCET=0; |
SOUCET1=0; |
/* |
for (i=64;i<96;++i) |
{ |
printf("%u\r\n",i); |
i2c_stop(); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(i); |
i2c_start(); |
I2C_Write(0xAB); |
STAV1=I2C_read(0); |
i2c_stop(); |
printf("STAV %lX \r\n", STAV1); |
SOUCET=SOUCET+STAV1; |
} |
printf("SOUCET: %lX (procenta)\r\n", SOUCET); |
SOUCET1=SOUCET; |
SOUCET1=SOUCET1>>8; |
printf("Deleno 256: %lX (procenta)\r\n", SOUCET1); |
SOUCET1=SOUCET-SOUCET1; |
printf("Soucet - soucet/256: %lX \r\n", SOUCET1); |
LSB=(unsigned int8)SOUCET1; |
printf("LSB: %lX\r\n", LSB); |
//printf("Stav: %X (procenta)\r\n", STAV2); |
*/ |
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/LED_BAT7/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/LED_BAT7/main.err |
---|
0,0 → 1,6 |
>>> Warning 202 "main.c" Line 22(15,20): Variable never used: STAV1 |
>>> Warning 202 "main.c" Line 22(21,26): Variable never used: STAV2 |
>>> Warning 202 "main.c" Line 25(24,25): Variable never used: k |
>>> Warning 202 "main.c" Line 100(5,6): Variable never used: i |
Memory usage: ROM=14% RAM=2% - 6% |
0 Errors, 4 Warnings. |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/LED_BAT7/main.esym |
---|
0,0 → 1,428 |
D G "__PCM__" 0 155 ""4.106"" |
D G "__DEVICE__" 0 155 "887" |
D G "__DATE__" 0 155 ""22-4-13"" |
D G "__TIME__" 0 155 ""21:36:09"" "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 3 "PIN_C4" |
D G "EEPROM_SCL" 0 4 "PIN_C3" |
F G "main" 0 9 "void()" |
C L "main" 0 19 1 "FUNCTION" |
V L "STAV1" 0 22 "int8" |
V L "STAV2" 0 22 "int8" |
V L "SOUCET" 0 24 "int16" |
V L "SOUCET1" 0 24 "int16" |
V L "LSB" 0 25 "int8" |
V L "ZK" 0 25 "int8" |
V L "k" 0 25 "int8" |
C L "main" 0 19 1 "FUNCTION" |
C L "main" 0 19 1 "FUNCTION" |
C L "main" 0 19 1 "FUNCTION" |
C L "main" 0 19 1 "FUNCTION" |
C L "main" 0 19 1 "FUNCTION" |
C L "main" 0 19 1 "FUNCTION" |
C L "main" 0 19 1 "FUNCTION" |
V L "i" 0 100 "int8" |
C L "main" 0 19 21 "FUNCTION" |
C L "main" 0 19 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/LED_BAT7/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/LED_BAT7/main.hex |
---|
0,0 → 1,145 |
:1000000001308A00A1290000D3346D38EC32202A57 |
:10001000E832F236EF36653AE8327210A0060A008E |
:10002000CC224410253658100D050000D63C7336FE |
:100030006532EE3220265321A0126C2CA0060A0055 |
:10004000A013200883168700831287130830F80056 |
:1000500029280000F8173A28F813AF0C031887175F |
:10006000031C871378173A287813F80B2D283828A3 |
:10007000000087173F308400840B3C280000F81BE9 |
:100080002C28781B34280800831603178C170C14AF |
:100090000000000083120C087F390319882803131D |
:1000A000AB0003170D080313AC0003170F0803136D |
:1000B000AD002B08AF0020202C0803178D00031380 |
:1000C0002D0803178F0083168C170C1400000000F6 |
:1000D00083120C0D0E0D7F39031988280313AB0012 |
:1000E00003170D080313AC0003170F080313AD002B |
:1000F0002B08AF0020202C0803178D0003132D08B8 |
:1001000003178F008D0A03198F0A0313442803175E |
:1001100003138A110A120D2A0830F8000000871113 |
:10012000A01120088316870000008312AB0D071270 |
:10013000031CA0282016200883168700A4288312F9 |
:10014000201220088316870000008312A0152008C3 |
:10015000831687008312871DAB28F80B8E280000BA |
:100160008711A01120088316870000008312201633 |
:10017000200883168700000000008312A0152008C5 |
:10018000831687008312871DC328F8010000071A11 |
:1001900078148711A0112008831687008312071294 |
:1001A0002012200883168700831208002B30840059 |
:1001B000831300080319E9280230F800F701F70B50 |
:1001C000DF28F80BDE289730F700F70BE528800BC7 |
:1001D000DC2808000830AC007708AD0020162008A5 |
:1001E0008316870000008312A0152008831687005D |
:1001F0008312871DF928071A0314071E0310F80D30 |
:100200000000A01120088316870083128711AC0B11 |
:10021000EE2820162008831687000000831207129C |
:100220002D0803191829201220088316870083122D |
:100230000000A0152008831687008312871D1E2941 |
:1002400000008711A0112008831687000000831288 |
:100250000712201220088316870083128A110A12BF |
:10026000572B831603178C170C140000000003187B |
:10027000602983120C087F390313AC0003170D08A3 |
:100280000313AD0003170F080313AE002C08AF00D3 |
:1002900020202D0803178D0003132E0803178F004D |
:1002A00083168C170C140000000083120313AB0B91 |
:1002B0005A295D298316031760297F29831603179E |
:1002C00083120C0D0E0D7F390313AC0003170D08BC |
:1002D0000313AD0003170F080313AE002C08AF0083 |
:1002E00020202D0803178D0003132E0803178F00FD |
:1002F0008D0A03198F0A03100313AB0B3129080071 |
:10030000AC1B92290F30F7002B0EF7050A3077024D |
:1003100003188D293030F7078F292C08F707770845 |
:10032000AF0020200F30AB050A302B0203189A29AA |
:1003300030309C29AC132C08AB072B08AF002020D1 |
:100340000800840183131F308305713083168F00EA |
:100350000F088312A01320088316870083128717C3 |
:10036000831603170908C039890003131F129F124F |
:100370000030031788008312870188018901FF304C |
:100380000313A000831603170908C039890003135B |
:100390001F129F12003003178800831203131F13CC |
:1003A0009F1383169F1383121F149412A012200808 |
:1003B0008316870083122016200883168700831275 |
:1003C000A0112008831687000130831294000030AA |
:1003D000831694000108C739083881008312900100 |
:1003E0000030F8009200003083169200831220152E |
:1003F0002008831687008312970183169B019C01B6 |
:1004000001309D00831203178701880189010430A0 |
:100410008D0000308F0003134428A701A901201686 |
:1004200020088316870000008312A0152008831679 |
:10043000870000008312071220122008831687000D |
:10044000000083128711A011200883168700AA30AC |
:100450008312AB008C206130AB008C20201620086A |
:100460008316870000008312A015200883168700DA |
:1004700000008312871D3A2A0712201220088316D3 |
:100480008700000083128711A011200883168700BF |
:10049000AA308312AB008C20AB018C2020122008E4 |
:1004A0008316870000008312A0152008831687009A |
:1004B0008312871D592A00005D2A0000201620089B |
:1004C00083168700000001308312AB00D62020166F |
:1004D00020088316870000008312A01520088316C9 |
:1004E000870000008312071220122008831687005D |
:1004F000000083128711A011200883168700AA30FC |
:100500008312AB008C203E30AB008C2020162008DC |
:100510008316870000008312A01520088316870029 |
:1005200000008312871D922A0712201220088316CA |
:100530008700000083128711A0112008831687000E |
:10054000AA308312AB008C204030AB008C202012EC |
:1005500020088316870000008312A0152008831648 |
:1005600087008312871DB22A0000B62A00002016D9 |
:10057000200883168700000001308312AB00D620CC |
:10058000201620088316870000008312A01520087B |
:10059000831687000000831207122012200883169A |
:1005A0008700000083128711A0112008831687009E |
:1005B000AA308312AB008C203F30AB008C20201679 |
:1005C00020088316870000008312A01520088316D8 |
:1005D000870000008312871DEB2A071220122008D3 |
:1005E00083168700000083128711A011200883164C |
:1005F0008700AA308312AB008C20AB018C20201224 |
:1006000020088316870000008312A0152008831697 |
:1006100087008312871D0A2B00000E2B0000201676 |
:10062000200883168700000001308312AB00D6201B |
:10063000201620088316870000008312A0152008CA |
:1006400083168700000083120712201220088316E9 |
:100650008700000083128711A011200883168700ED |
:10066000AA308312AB008C204430AB008C202016C3 |
:1006700020088316870000008312A0152008831627 |
:10068000870000008312871D432B071220122008C9 |
:1006900083168700000083128711A011200883169B |
:1006A0008700AB308312AB008C20F701EA28780872 |
:1006B000A800201220088316870000008312A015CE |
:1006C0002008831687008312871D642B0000682B87 |
:1006D00000002016200883168700000001308312D6 |
:1006E000AB00D620103003178D0000308F000310B0 |
:1006F00004300313AB0031212808AB003730AC00C5 |
:1007000080212030AF0020200D30AF0020200A30A3 |
:10071000AF0020202808733C031DAA2B0130A7023C |
:10072000163003178D0000308F0003100D300313B7 |
:10073000AB0031212708AB003730AC0080212030DE |
:10074000AF0020200D30AF0020200A30AF00202065 |
:10075000A82B5C2C2016200883168700000083122B |
:10076000A0152008831687000000831207122012AC |
:10077000200883168700000083128711A01120082B |
:1007800083168700AA308312AB008C204430AB0064 |
:100790008C20201620088316870000008312A015E5 |
:1007A00020088316870000008312871DD52B0712AF |
:1007B0002012200883168700000083128711A011E1 |
:1007C000200883168700AA308312AB008C20733078 |
:1007D000AB008C20201220088316870000008312B3 |
:1007E000A0152008831687008312871DF52B0000B3 |
:1007F000F92B0000201620088316870000004030E7 |
:100800008312AA00A401A301A601A50120162008B5 |
:100810008316870000008312A01520088316870026 |
:1008200000008312071220122008831687000000A0 |
:1008300083128711A011200883168700AA30831223 |
:10084000AB008C206030AB008C2020162008831673 |
:10085000870000008312A01520088316870000007F |
:100860008312871D312C071220122008831687005F |
:10087000000083128711A011200883168700AA3078 |
:100880008312AB008C202708AB008C20201220089C |
:100890008316870000008312A015200883168700A6 |
:1008A0008312871D512C0000552C000020162008B3 |
:1008B00083168700000083120130A7076430AB0065 |
:0608C000D6200F2A6300A0 |
:04400E00F52CFF3F4F |
:00000001FF |
;PIC16F887 |
;CRC=A765 CREATED="22-4-13 21:36" |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/LED_BAT7/main.lst |
---|
0,0 → 1,1106 |
CCS PCM C Compiler, Version 4.106, 47914 22-4-13 21:36 |
Filename: C:\Users\Honza\Documents\pic\I2C_bat_pam\LED_BAT7\main.lst |
ROM used: 1123 words (14%) |
Largest free fragment is 2048 |
RAM used: 6 (2%) at main() level |
21 (6%) worst case |
Stack: 2 locations |
* |
0000: MOVLW 01 |
0001: MOVWF 0A |
0002: GOTO 1A1 |
0003: NOP |
.................... |
.................... #include "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) |
* |
00D6: MOVLW 2B |
00D7: MOVWF 04 |
00D8: BCF 03.7 |
00D9: MOVF 00,W |
00DA: BTFSC 03.2 |
00DB: GOTO 0E9 |
00DC: MOVLW 02 |
00DD: MOVWF 78 |
00DE: CLRF 77 |
00DF: DECFSZ 77,F |
00E0: GOTO 0DF |
00E1: DECFSZ 78,F |
00E2: GOTO 0DE |
00E3: MOVLW 97 |
00E4: MOVWF 77 |
00E5: DECFSZ 77,F |
00E6: GOTO 0E5 |
00E7: DECFSZ 00,F |
00E8: GOTO 0DC |
00E9: RETURN |
.................... |
.................... |
.................... #define EEPROM_SDA PIN_C4 |
.................... #define EEPROM_SCL PIN_C3 |
.................... #use i2c(master, sda=EEPROM_SDA, scl=EEPROM_SCL) |
* |
008C: MOVLW 08 |
008D: MOVWF 78 |
008E: NOP |
008F: BCF 07.3 |
0090: BCF 20.3 |
0091: MOVF 20,W |
0092: BSF 03.5 |
0093: MOVWF 07 |
0094: NOP |
0095: BCF 03.5 |
0096: RLF 2B,F |
0097: BCF 07.4 |
0098: BTFSS 03.0 |
0099: GOTO 0A0 |
009A: BSF 20.4 |
009B: MOVF 20,W |
009C: BSF 03.5 |
009D: MOVWF 07 |
009E: GOTO 0A4 |
009F: BCF 03.5 |
00A0: BCF 20.4 |
00A1: MOVF 20,W |
00A2: BSF 03.5 |
00A3: MOVWF 07 |
00A4: NOP |
00A5: BCF 03.5 |
00A6: BSF 20.3 |
00A7: MOVF 20,W |
00A8: BSF 03.5 |
00A9: MOVWF 07 |
00AA: BCF 03.5 |
00AB: BTFSS 07.3 |
00AC: GOTO 0AB |
00AD: DECFSZ 78,F |
00AE: GOTO 08E |
00AF: NOP |
00B0: BCF 07.3 |
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: NOP |
00BC: NOP |
00BD: BCF 03.5 |
00BE: BSF 20.3 |
00BF: MOVF 20,W |
00C0: BSF 03.5 |
00C1: MOVWF 07 |
00C2: BCF 03.5 |
00C3: BTFSS 07.3 |
00C4: GOTO 0C3 |
00C5: CLRF 78 |
00C6: NOP |
00C7: BTFSC 07.4 |
00C8: BSF 78.0 |
00C9: BCF 07.3 |
00CA: BCF 20.3 |
00CB: MOVF 20,W |
00CC: BSF 03.5 |
00CD: MOVWF 07 |
00CE: BCF 03.5 |
00CF: BCF 07.4 |
00D0: BCF 20.4 |
00D1: MOVF 20,W |
00D2: BSF 03.5 |
00D3: MOVWF 07 |
00D4: BCF 03.5 |
00D5: RETURN |
* |
00EA: MOVLW 08 |
00EB: MOVWF 2C |
00EC: MOVF 77,W |
00ED: MOVWF 2D |
00EE: BSF 20.4 |
00EF: MOVF 20,W |
00F0: BSF 03.5 |
00F1: MOVWF 07 |
00F2: NOP |
00F3: BCF 03.5 |
00F4: BSF 20.3 |
00F5: MOVF 20,W |
00F6: BSF 03.5 |
00F7: MOVWF 07 |
00F8: BCF 03.5 |
00F9: BTFSS 07.3 |
00FA: GOTO 0F9 |
00FB: BTFSC 07.4 |
00FC: BSF 03.0 |
00FD: BTFSS 07.4 |
00FE: BCF 03.0 |
00FF: RLF 78,F |
0100: NOP |
0101: BCF 20.3 |
0102: MOVF 20,W |
0103: BSF 03.5 |
0104: MOVWF 07 |
0105: BCF 03.5 |
0106: BCF 07.3 |
0107: DECFSZ 2C,F |
0108: GOTO 0EE |
0109: BSF 20.4 |
010A: MOVF 20,W |
010B: BSF 03.5 |
010C: MOVWF 07 |
010D: NOP |
010E: BCF 03.5 |
010F: BCF 07.4 |
0110: MOVF 2D,W |
0111: BTFSC 03.2 |
0112: GOTO 118 |
0113: BCF 20.4 |
0114: MOVF 20,W |
0115: BSF 03.5 |
0116: MOVWF 07 |
0117: BCF 03.5 |
0118: NOP |
0119: BSF 20.3 |
011A: MOVF 20,W |
011B: BSF 03.5 |
011C: MOVWF 07 |
011D: BCF 03.5 |
011E: BTFSS 07.3 |
011F: GOTO 11E |
0120: NOP |
0121: BCF 07.3 |
0122: BCF 20.3 |
0123: MOVF 20,W |
0124: BSF 03.5 |
0125: MOVWF 07 |
0126: NOP |
0127: BCF 03.5 |
0128: BCF 07.4 |
0129: BCF 20.4 |
012A: MOVF 20,W |
012B: BSF 03.5 |
012C: MOVWF 07 |
012D: BCF 03.5 |
012E: BCF 0A.3 |
012F: BCF 0A.4 |
0130: GOTO 357 (RETURN) |
.................... #use rs232(baud=9600,parity=N,xmit=PIN_C7,rcv=PIN_C6,bits=8) //rcv TXD xmit RXD |
* |
0020: BCF 20.7 |
0021: MOVF 20,W |
0022: BSF 03.5 |
0023: MOVWF 07 |
0024: BCF 03.5 |
0025: BCF 07.7 |
0026: MOVLW 08 |
0027: MOVWF 78 |
0028: GOTO 029 |
0029: NOP |
002A: BSF 78.7 |
002B: GOTO 03A |
002C: BCF 78.7 |
002D: RRF 2F,F |
002E: BTFSC 03.0 |
002F: BSF 07.7 |
0030: BTFSS 03.0 |
0031: BCF 07.7 |
0032: BSF 78.6 |
0033: GOTO 03A |
0034: BCF 78.6 |
0035: DECFSZ 78,F |
0036: GOTO 02D |
0037: GOTO 038 |
0038: NOP |
0039: BSF 07.7 |
003A: MOVLW 3F |
003B: MOVWF 04 |
003C: DECFSZ 04,F |
003D: GOTO 03C |
003E: NOP |
003F: BTFSC 78.7 |
0040: GOTO 02C |
0041: BTFSC 78.6 |
0042: GOTO 034 |
0043: RETURN |
.................... |
.................... |
.................... void main() |
.................... { |
* |
01A1: CLRF 04 |
01A2: BCF 03.7 |
01A3: MOVLW 1F |
01A4: ANDWF 03,F |
01A5: MOVLW 71 |
01A6: BSF 03.5 |
01A7: MOVWF 0F |
01A8: MOVF 0F,W |
01A9: BCF 03.5 |
01AA: BCF 20.7 |
01AB: MOVF 20,W |
01AC: BSF 03.5 |
01AD: MOVWF 07 |
01AE: BCF 03.5 |
01AF: BSF 07.7 |
01B0: BSF 03.5 |
01B1: BSF 03.6 |
01B2: MOVF 09,W |
01B3: ANDLW C0 |
01B4: MOVWF 09 |
01B5: BCF 03.6 |
01B6: BCF 1F.4 |
01B7: BCF 1F.5 |
01B8: MOVLW 00 |
01B9: BSF 03.6 |
01BA: MOVWF 08 |
01BB: BCF 03.5 |
01BC: CLRF 07 |
01BD: CLRF 08 |
01BE: CLRF 09 |
.................... |
.................... setup_adc_ports(NO_ANALOGS|VSS_VDD); |
* |
01C2: BSF 03.5 |
01C3: BSF 03.6 |
01C4: MOVF 09,W |
01C5: ANDLW C0 |
01C6: MOVWF 09 |
01C7: BCF 03.6 |
01C8: BCF 1F.4 |
01C9: BCF 1F.5 |
01CA: MOVLW 00 |
01CB: BSF 03.6 |
01CC: MOVWF 08 |
.................... setup_adc(ADC_CLOCK_DIV_2); |
01CD: BCF 03.5 |
01CE: BCF 03.6 |
01CF: BCF 1F.6 |
01D0: BCF 1F.7 |
01D1: BSF 03.5 |
01D2: BCF 1F.7 |
01D3: BCF 03.5 |
01D4: BSF 1F.0 |
.................... setup_spi(SPI_SS_DISABLED); |
01D5: BCF 14.5 |
01D6: BCF 20.5 |
01D7: MOVF 20,W |
01D8: BSF 03.5 |
01D9: MOVWF 07 |
01DA: BCF 03.5 |
01DB: BSF 20.4 |
01DC: MOVF 20,W |
01DD: BSF 03.5 |
01DE: MOVWF 07 |
01DF: BCF 03.5 |
01E0: BCF 20.3 |
01E1: MOVF 20,W |
01E2: BSF 03.5 |
01E3: MOVWF 07 |
01E4: MOVLW 01 |
01E5: BCF 03.5 |
01E6: MOVWF 14 |
01E7: MOVLW 00 |
01E8: BSF 03.5 |
01E9: MOVWF 14 |
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); |
01EA: MOVF 01,W |
01EB: ANDLW C7 |
01EC: IORLW 08 |
01ED: MOVWF 01 |
.................... setup_timer_1(T1_DISABLED); |
01EE: BCF 03.5 |
01EF: CLRF 10 |
.................... setup_timer_2(T2_DISABLED,0,1); |
01F0: MOVLW 00 |
01F1: MOVWF 78 |
01F2: MOVWF 12 |
01F3: MOVLW 00 |
01F4: BSF 03.5 |
01F5: MOVWF 12 |
.................... setup_ccp1(CCP_OFF); |
01F6: BCF 03.5 |
01F7: BSF 20.2 |
01F8: MOVF 20,W |
01F9: BSF 03.5 |
01FA: MOVWF 07 |
01FB: BCF 03.5 |
01FC: CLRF 17 |
01FD: BSF 03.5 |
01FE: CLRF 1B |
01FF: CLRF 1C |
0200: MOVLW 01 |
0201: MOVWF 1D |
.................... setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard |
0202: BCF 03.5 |
0203: BSF 03.6 |
0204: CLRF 07 |
0205: CLRF 08 |
0206: CLRF 09 |
.................... |
.................... printf("Simple Thermomether \r\n",); |
0207: MOVLW 04 |
0208: MOVWF 0D |
0209: MOVLW 00 |
020A: MOVWF 0F |
020B: BCF 03.6 |
020C: GOTO 044 |
.................... unsigned int8 STAV1,STAV2; |
.................... |
.................... unsigned int16 SOUCET, SOUCET1; |
.................... unsigned int8 LSB=0,ZK,k=0; |
020D: CLRF 27 |
020E: CLRF 29 |
.................... //unsigned int8 |
.................... |
.................... while(TRUE) |
.................... { |
.................... |
.................... |
.................... |
.................... |
.................... i2c_start(); //blockdatacontrol |
020F: BSF 20.4 |
0210: MOVF 20,W |
0211: BSF 03.5 |
0212: MOVWF 07 |
0213: NOP |
0214: BCF 03.5 |
0215: BSF 20.3 |
0216: MOVF 20,W |
0217: BSF 03.5 |
0218: MOVWF 07 |
0219: NOP |
021A: BCF 03.5 |
021B: BCF 07.4 |
021C: BCF 20.4 |
021D: MOVF 20,W |
021E: BSF 03.5 |
021F: MOVWF 07 |
0220: NOP |
0221: BCF 03.5 |
0222: BCF 07.3 |
0223: BCF 20.3 |
0224: MOVF 20,W |
0225: BSF 03.5 |
0226: MOVWF 07 |
.................... I2C_Write(0xAA); |
0227: MOVLW AA |
0228: BCF 03.5 |
0229: MOVWF 2B |
022A: CALL 08C |
.................... I2C_write(0x61); |
022B: MOVLW 61 |
022C: MOVWF 2B |
022D: CALL 08C |
.................... i2c_start(); |
022E: BSF 20.4 |
022F: MOVF 20,W |
0230: BSF 03.5 |
0231: MOVWF 07 |
0232: NOP |
0233: BCF 03.5 |
0234: BSF 20.3 |
0235: MOVF 20,W |
0236: BSF 03.5 |
0237: MOVWF 07 |
0238: NOP |
0239: BCF 03.5 |
023A: BTFSS 07.3 |
023B: GOTO 23A |
023C: BCF 07.4 |
023D: BCF 20.4 |
023E: MOVF 20,W |
023F: BSF 03.5 |
0240: MOVWF 07 |
0241: NOP |
0242: BCF 03.5 |
0243: BCF 07.3 |
0244: BCF 20.3 |
0245: MOVF 20,W |
0246: BSF 03.5 |
0247: MOVWF 07 |
.................... I2C_Write(0xAA); |
0248: MOVLW AA |
0249: BCF 03.5 |
024A: MOVWF 2B |
024B: CALL 08C |
.................... i2c_write(0x00); |
024C: CLRF 2B |
024D: CALL 08C |
.................... i2c_stop(); |
024E: BCF 20.4 |
024F: MOVF 20,W |
0250: BSF 03.5 |
0251: MOVWF 07 |
0252: NOP |
0253: BCF 03.5 |
0254: BSF 20.3 |
0255: MOVF 20,W |
0256: BSF 03.5 |
0257: MOVWF 07 |
0258: BCF 03.5 |
0259: BTFSS 07.3 |
025A: GOTO 259 |
025B: NOP |
025C: GOTO 25D |
025D: NOP |
025E: BSF 20.4 |
025F: MOVF 20,W |
0260: BSF 03.5 |
0261: MOVWF 07 |
0262: NOP |
.................... delay_ms (1); |
0263: MOVLW 01 |
0264: BCF 03.5 |
0265: MOVWF 2B |
0266: CALL 0D6 |
.................... |
.................... |
.................... i2c_start();//dataflashclass |
0267: BSF 20.4 |
0268: MOVF 20,W |
0269: BSF 03.5 |
026A: MOVWF 07 |
026B: NOP |
026C: BCF 03.5 |
026D: BSF 20.3 |
026E: MOVF 20,W |
026F: BSF 03.5 |
0270: MOVWF 07 |
0271: NOP |
0272: BCF 03.5 |
0273: BCF 07.4 |
0274: BCF 20.4 |
0275: MOVF 20,W |
0276: BSF 03.5 |
0277: MOVWF 07 |
0278: NOP |
0279: BCF 03.5 |
027A: BCF 07.3 |
027B: BCF 20.3 |
027C: MOVF 20,W |
027D: BSF 03.5 |
027E: MOVWF 07 |
.................... I2C_Write(0xAA); |
027F: MOVLW AA |
0280: BCF 03.5 |
0281: MOVWF 2B |
0282: CALL 08C |
.................... I2C_write(0x3e); |
0283: MOVLW 3E |
0284: MOVWF 2B |
0285: CALL 08C |
.................... |
.................... i2c_start(); |
0286: BSF 20.4 |
0287: MOVF 20,W |
0288: BSF 03.5 |
0289: MOVWF 07 |
028A: NOP |
028B: BCF 03.5 |
028C: BSF 20.3 |
028D: MOVF 20,W |
028E: BSF 03.5 |
028F: MOVWF 07 |
0290: NOP |
0291: BCF 03.5 |
0292: BTFSS 07.3 |
0293: GOTO 292 |
0294: BCF 07.4 |
0295: BCF 20.4 |
0296: MOVF 20,W |
0297: BSF 03.5 |
0298: MOVWF 07 |
0299: NOP |
029A: BCF 03.5 |
029B: BCF 07.3 |
029C: BCF 20.3 |
029D: MOVF 20,W |
029E: BSF 03.5 |
029F: MOVWF 07 |
.................... I2C_Write(0xAA); |
02A0: MOVLW AA |
02A1: BCF 03.5 |
02A2: MOVWF 2B |
02A3: CALL 08C |
.................... i2c_write(0x40); |
02A4: MOVLW 40 |
02A5: MOVWF 2B |
02A6: CALL 08C |
.................... i2c_stop(); |
02A7: BCF 20.4 |
02A8: MOVF 20,W |
02A9: BSF 03.5 |
02AA: MOVWF 07 |
02AB: NOP |
02AC: BCF 03.5 |
02AD: BSF 20.3 |
02AE: MOVF 20,W |
02AF: BSF 03.5 |
02B0: MOVWF 07 |
02B1: BCF 03.5 |
02B2: BTFSS 07.3 |
02B3: GOTO 2B2 |
02B4: NOP |
02B5: GOTO 2B6 |
02B6: NOP |
02B7: BSF 20.4 |
02B8: MOVF 20,W |
02B9: BSF 03.5 |
02BA: MOVWF 07 |
02BB: NOP |
.................... delay_ms (1); |
02BC: MOVLW 01 |
02BD: BCF 03.5 |
02BE: MOVWF 2B |
02BF: CALL 0D6 |
.................... |
.................... |
.................... i2c_start();//dataflashblock |
02C0: BSF 20.4 |
02C1: MOVF 20,W |
02C2: BSF 03.5 |
02C3: MOVWF 07 |
02C4: NOP |
02C5: BCF 03.5 |
02C6: BSF 20.3 |
02C7: MOVF 20,W |
02C8: BSF 03.5 |
02C9: MOVWF 07 |
02CA: NOP |
02CB: BCF 03.5 |
02CC: BCF 07.4 |
02CD: BCF 20.4 |
02CE: MOVF 20,W |
02CF: BSF 03.5 |
02D0: MOVWF 07 |
02D1: NOP |
02D2: BCF 03.5 |
02D3: BCF 07.3 |
02D4: BCF 20.3 |
02D5: MOVF 20,W |
02D6: BSF 03.5 |
02D7: MOVWF 07 |
.................... I2C_Write(0xAA); |
02D8: MOVLW AA |
02D9: BCF 03.5 |
02DA: MOVWF 2B |
02DB: CALL 08C |
.................... I2C_write(0x3f); |
02DC: MOVLW 3F |
02DD: MOVWF 2B |
02DE: CALL 08C |
.................... |
.................... i2c_start(); |
02DF: BSF 20.4 |
02E0: MOVF 20,W |
02E1: BSF 03.5 |
02E2: MOVWF 07 |
02E3: NOP |
02E4: BCF 03.5 |
02E5: BSF 20.3 |
02E6: MOVF 20,W |
02E7: BSF 03.5 |
02E8: MOVWF 07 |
02E9: NOP |
02EA: BCF 03.5 |
02EB: BTFSS 07.3 |
02EC: GOTO 2EB |
02ED: BCF 07.4 |
02EE: BCF 20.4 |
02EF: MOVF 20,W |
02F0: BSF 03.5 |
02F1: MOVWF 07 |
02F2: NOP |
02F3: BCF 03.5 |
02F4: BCF 07.3 |
02F5: BCF 20.3 |
02F6: MOVF 20,W |
02F7: BSF 03.5 |
02F8: MOVWF 07 |
.................... I2C_Write(0xAA); |
02F9: MOVLW AA |
02FA: BCF 03.5 |
02FB: MOVWF 2B |
02FC: CALL 08C |
.................... I2C_write(0x00); |
02FD: CLRF 2B |
02FE: CALL 08C |
.................... i2c_stop(); |
02FF: BCF 20.4 |
0300: MOVF 20,W |
0301: BSF 03.5 |
0302: MOVWF 07 |
0303: NOP |
0304: BCF 03.5 |
0305: BSF 20.3 |
0306: MOVF 20,W |
0307: BSF 03.5 |
0308: MOVWF 07 |
0309: BCF 03.5 |
030A: BTFSS 07.3 |
030B: GOTO 30A |
030C: NOP |
030D: GOTO 30E |
030E: NOP |
030F: BSF 20.4 |
0310: MOVF 20,W |
0311: BSF 03.5 |
0312: MOVWF 07 |
0313: NOP |
.................... |
.................... delay_ms (1); |
0314: MOVLW 01 |
0315: BCF 03.5 |
0316: MOVWF 2B |
0317: CALL 0D6 |
.................... |
.................... i2c_start();//blockdata |
0318: BSF 20.4 |
0319: MOVF 20,W |
031A: BSF 03.5 |
031B: MOVWF 07 |
031C: NOP |
031D: BCF 03.5 |
031E: BSF 20.3 |
031F: MOVF 20,W |
0320: BSF 03.5 |
0321: MOVWF 07 |
0322: NOP |
0323: BCF 03.5 |
0324: BCF 07.4 |
0325: BCF 20.4 |
0326: MOVF 20,W |
0327: BSF 03.5 |
0328: MOVWF 07 |
0329: NOP |
032A: BCF 03.5 |
032B: BCF 07.3 |
032C: BCF 20.3 |
032D: MOVF 20,W |
032E: BSF 03.5 |
032F: MOVWF 07 |
.................... I2C_Write(0xAA); |
0330: MOVLW AA |
0331: BCF 03.5 |
0332: MOVWF 2B |
0333: CALL 08C |
.................... I2C_write(0x44); |
0334: MOVLW 44 |
0335: MOVWF 2B |
0336: CALL 08C |
.................... |
.................... i2c_start(); |
0337: BSF 20.4 |
0338: MOVF 20,W |
0339: BSF 03.5 |
033A: MOVWF 07 |
033B: NOP |
033C: BCF 03.5 |
033D: BSF 20.3 |
033E: MOVF 20,W |
033F: BSF 03.5 |
0340: MOVWF 07 |
0341: NOP |
0342: BCF 03.5 |
0343: BTFSS 07.3 |
0344: GOTO 343 |
0345: BCF 07.4 |
0346: BCF 20.4 |
0347: MOVF 20,W |
0348: BSF 03.5 |
0349: MOVWF 07 |
034A: NOP |
034B: BCF 03.5 |
034C: BCF 07.3 |
034D: BCF 20.3 |
034E: MOVF 20,W |
034F: BSF 03.5 |
0350: MOVWF 07 |
.................... I2C_Write(0xAB); |
0351: MOVLW AB |
0352: BCF 03.5 |
0353: MOVWF 2B |
0354: CALL 08C |
.................... ZK=I2C_read(0); |
0355: CLRF 77 |
0356: GOTO 0EA |
0357: MOVF 78,W |
0358: MOVWF 28 |
.................... i2c_stop(); |
0359: BCF 20.4 |
035A: MOVF 20,W |
035B: BSF 03.5 |
035C: MOVWF 07 |
035D: NOP |
035E: BCF 03.5 |
035F: BSF 20.3 |
0360: MOVF 20,W |
0361: BSF 03.5 |
0362: MOVWF 07 |
0363: BCF 03.5 |
0364: BTFSS 07.3 |
0365: GOTO 364 |
0366: NOP |
0367: GOTO 368 |
0368: NOP |
0369: BSF 20.4 |
036A: MOVF 20,W |
036B: BSF 03.5 |
036C: MOVWF 07 |
036D: NOP |
.................... |
.................... delay_ms (1); |
036E: MOVLW 01 |
036F: BCF 03.5 |
0370: MOVWF 2B |
0371: CALL 0D6 |
.................... |
.................... printf("LED %lX \r\n", ZK); |
0372: MOVLW 10 |
0373: BSF 03.6 |
0374: MOVWF 0D |
0375: MOVLW 00 |
0376: MOVWF 0F |
0377: BCF 03.0 |
0378: MOVLW 04 |
0379: BCF 03.6 |
037A: MOVWF 2B |
037B: CALL 131 |
037C: MOVF 28,W |
037D: MOVWF 2B |
037E: MOVLW 37 |
037F: MOVWF 2C |
0380: CALL 180 |
0381: MOVLW 20 |
0382: MOVWF 2F |
0383: CALL 020 |
0384: MOVLW 0D |
0385: MOVWF 2F |
0386: CALL 020 |
0387: MOVLW 0A |
0388: MOVWF 2F |
0389: CALL 020 |
.................... |
.................... if(ZK==0x73) |
038A: MOVF 28,W |
038B: SUBLW 73 |
038C: BTFSS 03.2 |
038D: GOTO 3AA |
.................... { |
.................... LSB=LSB-1; |
038E: MOVLW 01 |
038F: SUBWF 27,F |
.................... printf("Vysledne LSB %lX \r\n", LSB); |
0390: MOVLW 16 |
0391: BSF 03.6 |
0392: MOVWF 0D |
0393: MOVLW 00 |
0394: MOVWF 0F |
0395: BCF 03.0 |
0396: MOVLW 0D |
0397: BCF 03.6 |
0398: MOVWF 2B |
0399: CALL 131 |
039A: MOVF 27,W |
039B: MOVWF 2B |
039C: MOVLW 37 |
039D: MOVWF 2C |
039E: CALL 180 |
039F: MOVLW 20 |
03A0: MOVWF 2F |
03A1: CALL 020 |
03A2: MOVLW 0D |
03A3: MOVWF 2F |
03A4: CALL 020 |
03A5: MOVLW 0A |
03A6: MOVWF 2F |
03A7: CALL 020 |
.................... while(TRUE) |
.................... { |
.................... } |
03A8: GOTO 3A8 |
.................... } |
.................... |
.................... else |
03A9: GOTO 45C |
.................... { |
.................... i2c_start();//blockdata |
03AA: BSF 20.4 |
03AB: MOVF 20,W |
03AC: BSF 03.5 |
03AD: MOVWF 07 |
03AE: NOP |
03AF: BCF 03.5 |
03B0: BSF 20.3 |
03B1: MOVF 20,W |
03B2: BSF 03.5 |
03B3: MOVWF 07 |
03B4: NOP |
03B5: BCF 03.5 |
03B6: BCF 07.4 |
03B7: BCF 20.4 |
03B8: MOVF 20,W |
03B9: BSF 03.5 |
03BA: MOVWF 07 |
03BB: NOP |
03BC: BCF 03.5 |
03BD: BCF 07.3 |
03BE: BCF 20.3 |
03BF: MOVF 20,W |
03C0: BSF 03.5 |
03C1: MOVWF 07 |
.................... I2C_Write(0xAA); |
03C2: MOVLW AA |
03C3: BCF 03.5 |
03C4: MOVWF 2B |
03C5: CALL 08C |
.................... I2C_write(0x44); |
03C6: MOVLW 44 |
03C7: MOVWF 2B |
03C8: CALL 08C |
.................... |
.................... i2c_start(); |
03C9: BSF 20.4 |
03CA: MOVF 20,W |
03CB: BSF 03.5 |
03CC: MOVWF 07 |
03CD: NOP |
03CE: BCF 03.5 |
03CF: BSF 20.3 |
03D0: MOVF 20,W |
03D1: BSF 03.5 |
03D2: MOVWF 07 |
03D3: NOP |
03D4: BCF 03.5 |
03D5: BTFSS 07.3 |
03D6: GOTO 3D5 |
03D7: BCF 07.4 |
03D8: BCF 20.4 |
03D9: MOVF 20,W |
03DA: BSF 03.5 |
03DB: MOVWF 07 |
03DC: NOP |
03DD: BCF 03.5 |
03DE: BCF 07.3 |
03DF: BCF 20.3 |
03E0: MOVF 20,W |
03E1: BSF 03.5 |
03E2: MOVWF 07 |
.................... I2C_Write(0xAA); |
03E3: MOVLW AA |
03E4: BCF 03.5 |
03E5: MOVWF 2B |
03E6: CALL 08C |
.................... I2C_write(0x73); //pro 5LED 0x53 pro 7led 0x73 |
03E7: MOVLW 73 |
03E8: MOVWF 2B |
03E9: CALL 08C |
.................... i2c_stop(); |
03EA: BCF 20.4 |
03EB: MOVF 20,W |
03EC: BSF 03.5 |
03ED: MOVWF 07 |
03EE: NOP |
03EF: BCF 03.5 |
03F0: BSF 20.3 |
03F1: MOVF 20,W |
03F2: BSF 03.5 |
03F3: MOVWF 07 |
03F4: BCF 03.5 |
03F5: BTFSS 07.3 |
03F6: GOTO 3F5 |
03F7: NOP |
03F8: GOTO 3F9 |
03F9: NOP |
03FA: BSF 20.4 |
03FB: MOVF 20,W |
03FC: BSF 03.5 |
03FD: MOVWF 07 |
03FE: NOP |
.................... |
.................... |
.................... int i=64; |
03FF: MOVLW 40 |
0400: BCF 03.5 |
0401: MOVWF 2A |
.................... SOUCET=0; |
0402: CLRF 24 |
0403: CLRF 23 |
.................... SOUCET1=0; |
0404: CLRF 26 |
0405: CLRF 25 |
.................... |
.................... /* |
.................... for (i=64;i<96;++i) |
.................... { |
.................... printf("%u\r\n",i); |
.................... i2c_stop(); |
.................... |
.................... i2c_start();//blockdata |
.................... I2C_Write(0xAA); |
.................... I2C_write(i); |
.................... |
.................... i2c_start(); |
.................... I2C_Write(0xAB); |
.................... STAV1=I2C_read(0); |
.................... i2c_stop(); |
.................... |
.................... printf("STAV %lX \r\n", STAV1); |
.................... SOUCET=SOUCET+STAV1; |
.................... |
.................... |
.................... |
.................... |
.................... |
.................... } |
.................... printf("SOUCET: %lX (procenta)\r\n", SOUCET); |
.................... SOUCET1=SOUCET; |
.................... SOUCET1=SOUCET1>>8; |
.................... printf("Deleno 256: %lX (procenta)\r\n", SOUCET1); |
.................... SOUCET1=SOUCET-SOUCET1; |
.................... printf("Soucet - soucet/256: %lX \r\n", SOUCET1); |
.................... LSB=(unsigned int8)SOUCET1; |
.................... printf("LSB: %lX\r\n", LSB); |
.................... //printf("Stav: %X (procenta)\r\n", STAV2); |
.................... */ |
.................... |
.................... i2c_start();//blockdata |
0406: BSF 20.4 |
0407: MOVF 20,W |
0408: BSF 03.5 |
0409: MOVWF 07 |
040A: NOP |
040B: BCF 03.5 |
040C: BSF 20.3 |
040D: MOVF 20,W |
040E: BSF 03.5 |
040F: MOVWF 07 |
0410: NOP |
0411: BCF 03.5 |
0412: BCF 07.4 |
0413: BCF 20.4 |
0414: MOVF 20,W |
0415: BSF 03.5 |
0416: MOVWF 07 |
0417: NOP |
0418: BCF 03.5 |
0419: BCF 07.3 |
041A: BCF 20.3 |
041B: MOVF 20,W |
041C: BSF 03.5 |
041D: MOVWF 07 |
.................... I2C_Write(0xAA); |
041E: MOVLW AA |
041F: BCF 03.5 |
0420: MOVWF 2B |
0421: CALL 08C |
.................... I2C_write(0x60); |
0422: MOVLW 60 |
0423: MOVWF 2B |
0424: CALL 08C |
.................... |
.................... i2c_start(); |
0425: BSF 20.4 |
0426: MOVF 20,W |
0427: BSF 03.5 |
0428: MOVWF 07 |
0429: NOP |
042A: BCF 03.5 |
042B: BSF 20.3 |
042C: MOVF 20,W |
042D: BSF 03.5 |
042E: MOVWF 07 |
042F: NOP |
0430: BCF 03.5 |
0431: BTFSS 07.3 |
0432: GOTO 431 |
0433: BCF 07.4 |
0434: BCF 20.4 |
0435: MOVF 20,W |
0436: BSF 03.5 |
0437: MOVWF 07 |
0438: NOP |
0439: BCF 03.5 |
043A: BCF 07.3 |
043B: BCF 20.3 |
043C: MOVF 20,W |
043D: BSF 03.5 |
043E: MOVWF 07 |
.................... I2C_Write(0xAA); |
043F: MOVLW AA |
0440: BCF 03.5 |
0441: MOVWF 2B |
0442: CALL 08C |
.................... I2C_write(LSB); |
0443: MOVF 27,W |
0444: MOVWF 2B |
0445: CALL 08C |
.................... i2c_stop(); |
0446: BCF 20.4 |
0447: MOVF 20,W |
0448: BSF 03.5 |
0449: MOVWF 07 |
044A: NOP |
044B: BCF 03.5 |
044C: BSF 20.3 |
044D: MOVF 20,W |
044E: BSF 03.5 |
044F: MOVWF 07 |
0450: BCF 03.5 |
0451: BTFSS 07.3 |
0452: GOTO 451 |
0453: NOP |
0454: GOTO 455 |
0455: NOP |
0456: BSF 20.4 |
0457: MOVF 20,W |
0458: BSF 03.5 |
0459: MOVWF 07 |
045A: NOP |
045B: BCF 03.5 |
.................... |
.................... } |
.................... |
.................... LSB=LSB+1; |
045C: MOVLW 01 |
045D: ADDWF 27,F |
.................... |
.................... delay_ms (100); |
045E: MOVLW 64 |
045F: MOVWF 2B |
0460: CALL 0D6 |
.................... } |
0461: GOTO 20F |
.................... } |
0462: 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/LED_BAT7/main.pjt |
---|
0,0 → 1,24 |
[PROJECT] |
Target=C:\Users\Honza\Documents\pic\I2C_bat_pam\LED_BAT7\main.hex |
Development_Mode= |
Processor_Text=PIC16F887 |
ToolSuite=CCS |
Processor=0x887F |
[C:\Users\Honza\Documents\pic\I2C_bat_pam\LED_BAT7\main] |
Type=4 |
Path= |
FileList= |
BuildTool= |
OptionString= |
AdditionalOptionString= |
[mru-list] |
1=C:\Users\Honza\Documents\pic\I2C_bat_pam\LED_BAT7\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\LED_BAT7\main |
[Opened Files] |
1=main.c |
2= |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/LED_BAT7/main.sta |
---|
0,0 → 1,56 |
ROM used: 1123 (14%) |
1123 (14%) including unused fragments |
2 Average locations per line |
16 Average locations per statement |
RAM used: 6 (2%) at main() level |
21 (6%) worst case |
Stack used: 2 worst case (out of 8 total available) |
Lines Stmts % Files |
----- ----- --- ----- |
154 71 100 main.c |
20 0 0 main.h |
423 0 0 ..\..\..\..\..\..\Program Files (x86)\PICC\devices\16F887.h |
----- ----- |
597 71 Total |
Page ROM % RAM Vol Diff Functions: |
---- --- --- --- --- ---- ---------- |
0 20 2 1 @delay_ms1 |
0 71 6 3 @I2C_READ_1 |
0 74 7 1 @I2C_WRITE_1 |
0 36 3 1 @PUTCHAR_1_ |
0 706 63 0 2134 6.0 main |
0 12 1 0 @const78 |
0 72 6 3 @PSTRINGC7_69 |
0 6 1 0 @const87 |
0 79 7 4 @PSTRINGCN7_69 |
0 33 3 2 @PRINTF_X_69 |
0 10 1 0 @const93 |
Program metrics: |
Functions 1 |
Statements 71 |
Comments 125 |
Volume (V) 2162 |
Difficilty (D) 5.6 |
Effort to implement (E) 12172 |
Time to implement (T) 11 minutes |
Est Delivered Bugs (B) 0 |
Cyclomatic Complexity 1 |
Maintainability (MI) 12 |
Segment Used Free |
----------- ---- ---- |
00000-00003 4 0 |
00004-007FF 1119 925 |
00800-00FFF 0 2048 |
01000-017FF 0 2048 |
01800-01FFF 0 2048 |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/LED_BAT7/main.sym |
---|
0,0 → 1,90 |
004 @WRITE_PROGRAM_MEMORY8.P1 |
004-005 @READ_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 i |
02B @delay_ms1.P1 |
02B @I2C_READ_1.P2 |
02B @PSTRINGCN7_69.P3 |
02B @PRINTF_X_69.P4 |
02B @I2C_WRITE_1.P5 |
02B @PSTRINGC7_69.@SCRATCH1 |
02C @PRINTF_X_69.P1 |
02C @I2C_READ_1.@SCRATCH1 |
02C @PSTRINGC7_69.@SCRATCH2 |
02C @PSTRINGCN7_69.@SCRATCH1 |
02D @I2C_READ_1.@SCRATCH2 |
02D @PSTRINGC7_69.@SCRATCH3 |
02D @PSTRINGCN7_69.@SCRATCH2 |
02E @PSTRINGCN7_69.@SCRATCH3 |
02F @PUTCHAR_1_.P1 |
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: |
00D6 @delay_ms1 |
00EA @I2C_READ_1 |
008C @I2C_WRITE_1 |
0020 @PUTCHAR_1_ |
01A1 main |
0004 @const78 |
0044 @PSTRINGC7_69 |
0010 @const87 |
0131 @PSTRINGCN7_69 |
0180 @PRINTF_X_69 |
0016 @const93 |
01A1 @cinit |
User Memory space: |
User Memory space: |
Project Directory: |
C:\Users\Honza\Documents\pic\I2C_bat_pam\LED_BAT7\ |
Project Files: |
main.c |
main.h |
..\..\..\..\..\..\Program Files (x86)\PICC\devices\16F887.h |
Units: |
C:\Users\Honza\Documents\pic\I2C_bat_pam\LED_BAT7\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/LED_BAT7/main.tre |
---|
0,0 → 1,53 |
ÀÄmain |
ÀÄmain 0/706 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/71 Ram=3 |
ÃÄ@delay_ms1 0/20 Ram=1 |
ÃÄ@PSTRINGCN7_69 0/79 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 |
ÃÄ@PSTRINGCN7_69 0/79 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 |
ÀÄ@delay_ms1 0/20 Ram=1 |
/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 |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/Q_MAX/q_max_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/Q_MAX/main.bak |
---|
0,0 → 1,156 |
#include "C:\Users\Honza\Documents\pic\I2C_bat_pam\Q_MAX\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(0x52); |
i2c_stop(); |
delay_ms (1); |
i2c_start();//dataflashblock |
I2C_Write(0xAA); |
I2C_write(0x3f); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x00); |
i2c_stop(); |
delay_ms (1); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x40); |
i2c_start(); |
I2C_Write(0xAB); |
VH=I2C_read(0); |
i2c_stop(); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x41); |
i2c_start(); |
I2C_Write(0xAB); |
VL=I2C_read(0); |
i2c_stop(); |
delay_ms (10); |
printf("VL %lX \r\n", VL); |
printf("LH %lX \r\n", VH); |
if(VL==0x48) |
{ |
LSB=LSB-1; |
printf("Vysledne LSB %lX \r\n", LSB); |
while(TRUE) |
{ |
} |
} |
else |
{ |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x40); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x0D); |
i2c_stop(); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x41); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x48); |
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/Q_MAX/main.c |
---|
0,0 → 1,156 |
#include "C:\Users\Honza\Documents\pic\I2C_bat_pam\Q_MAX\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(0x52); |
i2c_stop(); |
delay_ms (1); |
i2c_start();//dataflashblock |
I2C_Write(0xAA); |
I2C_write(0x3f); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x00); |
i2c_stop(); |
delay_ms (1); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x40); |
i2c_start(); |
I2C_Write(0xAB); |
VH=I2C_read(0); |
i2c_stop(); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x41); |
i2c_start(); |
I2C_Write(0xAB); |
VL=I2C_read(0); |
i2c_stop(); |
delay_ms (10); |
printf("VL %lX \r\n", VL); |
printf("LH %lX \r\n", VH); |
if(VL==0x48) |
{ |
LSB=LSB-1; |
printf("Vysledne LSB %lX \r\n", LSB); |
while(TRUE) |
{ |
} |
} |
else |
{ |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x40); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x0D); |
i2c_stop(); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x41); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x48); |
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/Q_MAX/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/Q_MAX/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/Q_MAX/main.esym |
---|
0,0 → 1,428 |
D G "__PCM__" 0 155 ""4.106"" |
D G "__DEVICE__" 0 155 "887" |
D G "__DATE__" 0 155 ""22-4-13"" |
D G "__TIME__" 0 155 ""22:26:17"" "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/Q_MAX/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/Q_MAX/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 |
:100330008A110A12012C840183131F308305713046 |
: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 |
:1005300083168700AA308312AC0086205230AC00AC |
:100540008620201220088316870000008312A01541 |
:100550002008831687008312871DAC2A0000B02A6A |
:100560000000201620088316870000000130831247 |
:10057000AC00D020201620088316870000008312CC |
:10058000A01520088316870000008312071220128E |
:10059000200883168700000083128711A01120080D |
:1005A00083168700AA308312AC0086203F30AC004F |
:1005B0008620201620088316870000008312A015CD |
:1005C00020088316870000008312871DE52A071282 |
:1005D0002012200883168700000083128711A011C3 |
:1005E000200883168700AA308312AC008620AC0155 |
:1005F0008620201220088316870000008312A01591 |
:100600002008831687008312871D042B0000082B07 |
:100610000000201620088316870000000130831296 |
:10062000AC00D0202016200883168700000083121B |
:10063000A0152008831687000000831207122012DD |
:10064000200883168700000083128711A01120085C |
:1006500083168700AA308312AC0086204030AC009D |
:100660008620201620088316870000008312A0151C |
:1006700020088316870000008312871D3D2B071278 |
:100680002012200883168700000083128711A01112 |
:10069000200883168700AB308312AC008620F70158 |
:1006A000E4207808AA0020122008831687000000A2 |
:1006B0008312A0152008831687008312871D5E2BE6 |
:1006C0000000622B0000201620088316870000001F |
:1006D0008312201620088316870000008312A015BD |
:1006E00020088316870000008312071220122008BA |
:1006F00083168700000083128711A011200883163B |
:100700008700AA308312AC0086204130AC008620DE |
:10071000201620088316870000008312A0152008E9 |
:100720008316870000008312871D942B0712201266 |
:10073000200883168700000083128711A01120086B |
:1007400083168700AB308312AC008620F701E420CB |
:100750007808AB002012200883168700000083125F |
:10076000A0152008831687008312871DB52B000073 |
:10077000B92B0000201620088316870000000A30DD |
:100780008312AC00D0205630B0001A204C30B0009C |
:100790001A202030B0001A202B08AC003730AD00F2 |
:1007A00029212030B0001A200D30B0001A200A3064 |
:1007B000B0001A204C30B0001A204830B0001A2087 |
:1007C0002030B0001A202A08AC003730AD002921B3 |
:1007D0002030B0001A200D30B0001A200A30B000CE |
:1007E0001A202B08483C031D112C0130A7021030A1 |
:1007F00003178D0000308F0003100D300313AC0081 |
:100800004A292708AC003730AD0029212030B0003C |
:100810001A200D30B0001A200A30B0001A200F2C18 |
:10082000BD2C201620088316870000008312A01517 |
:100830002008831687000000831207122012200868 |
:1008400083168700000083128711A01120088316E9 |
:100850008700AA308312AC0086204030AC0086208E |
:10086000201620088316870000008312A015200898 |
:100870008316870000008312871D3C2C071220126C |
:10088000200883168700000083128711A01120081A |
:1008900083168700AA308312AC0086200D30AC008E |
:1008A0008620201220088316870000008312A015DE |
:1008B0002008831687008312871D5C2C0000602CA3 |
:1008C00000002016200883168700000083122016DF |
:1008D00020088316870000008312A01520088316C5 |
:1008E0008700000083120712201220088316870059 |
:1008F000000083128711A011200883168700AA30F8 |
:100900008312AC0086204130AC00862020162008DF |
:100910008316870000008312A01520088316870025 |
:1009200000008312871D922C0712201220088316C4 |
:100930008700000083128711A0112008831687000A |
:10094000AA308312AC0086204830AC0086202012EA |
:1009500020088316870000008312A0152008831644 |
:1009600087008312871DB22C0000B62C00002016D1 |
:1009700020088316870000008312201620088316A3 |
:10098000870000008312A01520088316870000004E |
:10099000831207122012200883168700000083129A |
:1009A0008711A011200883168700AA308312AC009B |
:1009B00086206030AC008620201620088316870031 |
:1009C00000008312A0152008831687000000831200 |
:1009D000871DE82C071220122008831687000000CC |
:1009E00083128711A011200883168700AA30831272 |
:1009F000AC0086202708AC00862020122008831631 |
:100A0000870000008312A015200883168700831238 |
:100A1000871D082D00000C2D0000201620088316CD |
:100A20008700000001308312A7076430AC00D0209B |
:040A3000092A63002C |
:04400E00F52CFF3F4F |
:00000001FF |
;PIC16F887 |
;CRC=E011 CREATED="22-4-13 22:26" |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/Q_MAX/main.lst |
---|
0,0 → 1,1296 |
CCS PCM C Compiler, Version 4.106, 47914 22-4-13 22:26 |
Filename: C:\Users\Honza\Documents\pic\I2C_bat_pam\Q_MAX\main.lst |
ROM used: 1306 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\Q_MAX\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(0x52); |
029E: MOVLW 52 |
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(0x00); |
02F7: CLRF 2C |
02F8: CALL 086 |
.................... i2c_stop(); |
02F9: BCF 20.4 |
02FA: MOVF 20,W |
02FB: BSF 03.5 |
02FC: MOVWF 07 |
02FD: NOP |
02FE: BCF 03.5 |
02FF: BSF 20.3 |
0300: MOVF 20,W |
0301: BSF 03.5 |
0302: MOVWF 07 |
0303: BCF 03.5 |
0304: BTFSS 07.3 |
0305: GOTO 304 |
0306: NOP |
0307: GOTO 308 |
0308: NOP |
0309: BSF 20.4 |
030A: MOVF 20,W |
030B: BSF 03.5 |
030C: MOVWF 07 |
030D: NOP |
.................... |
.................... delay_ms (1); |
030E: MOVLW 01 |
030F: BCF 03.5 |
0310: MOVWF 2C |
0311: CALL 0D0 |
.................... |
.................... |
.................... |
.................... |
.................... i2c_start();//blockdata |
0312: BSF 20.4 |
0313: MOVF 20,W |
0314: BSF 03.5 |
0315: MOVWF 07 |
0316: NOP |
0317: BCF 03.5 |
0318: BSF 20.3 |
0319: MOVF 20,W |
031A: BSF 03.5 |
031B: MOVWF 07 |
031C: NOP |
031D: BCF 03.5 |
031E: BCF 07.4 |
031F: BCF 20.4 |
0320: MOVF 20,W |
0321: BSF 03.5 |
0322: MOVWF 07 |
0323: NOP |
0324: BCF 03.5 |
0325: BCF 07.3 |
0326: BCF 20.3 |
0327: MOVF 20,W |
0328: BSF 03.5 |
0329: MOVWF 07 |
.................... I2C_Write(0xAA); |
032A: MOVLW AA |
032B: BCF 03.5 |
032C: MOVWF 2C |
032D: CALL 086 |
.................... I2C_write(0x40); |
032E: MOVLW 40 |
032F: MOVWF 2C |
0330: CALL 086 |
.................... |
.................... i2c_start(); |
0331: BSF 20.4 |
0332: MOVF 20,W |
0333: BSF 03.5 |
0334: MOVWF 07 |
0335: NOP |
0336: BCF 03.5 |
0337: BSF 20.3 |
0338: MOVF 20,W |
0339: BSF 03.5 |
033A: MOVWF 07 |
033B: NOP |
033C: BCF 03.5 |
033D: BTFSS 07.3 |
033E: GOTO 33D |
033F: BCF 07.4 |
0340: BCF 20.4 |
0341: MOVF 20,W |
0342: BSF 03.5 |
0343: MOVWF 07 |
0344: NOP |
0345: BCF 03.5 |
0346: BCF 07.3 |
0347: BCF 20.3 |
0348: MOVF 20,W |
0349: BSF 03.5 |
034A: MOVWF 07 |
.................... I2C_Write(0xAB); |
034B: MOVLW AB |
034C: BCF 03.5 |
034D: MOVWF 2C |
034E: CALL 086 |
.................... VH=I2C_read(0); |
034F: CLRF 77 |
0350: CALL 0E4 |
0351: MOVF 78,W |
0352: MOVWF 2A |
.................... |
.................... i2c_stop(); |
0353: BCF 20.4 |
0354: MOVF 20,W |
0355: BSF 03.5 |
0356: MOVWF 07 |
0357: NOP |
0358: BCF 03.5 |
0359: BSF 20.3 |
035A: MOVF 20,W |
035B: BSF 03.5 |
035C: MOVWF 07 |
035D: BCF 03.5 |
035E: BTFSS 07.3 |
035F: GOTO 35E |
0360: NOP |
0361: GOTO 362 |
0362: NOP |
0363: BSF 20.4 |
0364: MOVF 20,W |
0365: BSF 03.5 |
0366: MOVWF 07 |
0367: NOP |
.................... |
.................... i2c_start();//blockdata |
0368: BCF 03.5 |
0369: BSF 20.4 |
036A: MOVF 20,W |
036B: BSF 03.5 |
036C: MOVWF 07 |
036D: NOP |
036E: BCF 03.5 |
036F: BSF 20.3 |
0370: MOVF 20,W |
0371: BSF 03.5 |
0372: MOVWF 07 |
0373: NOP |
0374: BCF 03.5 |
0375: BCF 07.4 |
0376: BCF 20.4 |
0377: MOVF 20,W |
0378: BSF 03.5 |
0379: MOVWF 07 |
037A: NOP |
037B: BCF 03.5 |
037C: BCF 07.3 |
037D: BCF 20.3 |
037E: MOVF 20,W |
037F: BSF 03.5 |
0380: MOVWF 07 |
.................... I2C_Write(0xAA); |
0381: MOVLW AA |
0382: BCF 03.5 |
0383: MOVWF 2C |
0384: CALL 086 |
.................... I2C_write(0x41); |
0385: MOVLW 41 |
0386: MOVWF 2C |
0387: CALL 086 |
.................... |
.................... i2c_start(); |
0388: BSF 20.4 |
0389: MOVF 20,W |
038A: BSF 03.5 |
038B: MOVWF 07 |
038C: NOP |
038D: BCF 03.5 |
038E: BSF 20.3 |
038F: MOVF 20,W |
0390: BSF 03.5 |
0391: MOVWF 07 |
0392: NOP |
0393: BCF 03.5 |
0394: BTFSS 07.3 |
0395: GOTO 394 |
0396: BCF 07.4 |
0397: BCF 20.4 |
0398: MOVF 20,W |
0399: BSF 03.5 |
039A: MOVWF 07 |
039B: NOP |
039C: BCF 03.5 |
039D: BCF 07.3 |
039E: BCF 20.3 |
039F: MOVF 20,W |
03A0: BSF 03.5 |
03A1: MOVWF 07 |
.................... I2C_Write(0xAB); |
03A2: MOVLW AB |
03A3: BCF 03.5 |
03A4: MOVWF 2C |
03A5: CALL 086 |
.................... |
.................... VL=I2C_read(0); |
03A6: CLRF 77 |
03A7: CALL 0E4 |
03A8: MOVF 78,W |
03A9: MOVWF 2B |
.................... i2c_stop(); |
03AA: BCF 20.4 |
03AB: MOVF 20,W |
03AC: BSF 03.5 |
03AD: MOVWF 07 |
03AE: NOP |
03AF: BCF 03.5 |
03B0: BSF 20.3 |
03B1: MOVF 20,W |
03B2: BSF 03.5 |
03B3: MOVWF 07 |
03B4: BCF 03.5 |
03B5: BTFSS 07.3 |
03B6: GOTO 3B5 |
03B7: NOP |
03B8: GOTO 3B9 |
03B9: NOP |
03BA: BSF 20.4 |
03BB: MOVF 20,W |
03BC: BSF 03.5 |
03BD: MOVWF 07 |
03BE: NOP |
.................... |
.................... |
.................... delay_ms (10); |
03BF: MOVLW 0A |
03C0: BCF 03.5 |
03C1: MOVWF 2C |
03C2: CALL 0D0 |
.................... |
.................... printf("VL %lX \r\n", VL); |
03C3: MOVLW 56 |
03C4: MOVWF 30 |
03C5: CALL 01A |
03C6: MOVLW 4C |
03C7: MOVWF 30 |
03C8: CALL 01A |
03C9: MOVLW 20 |
03CA: MOVWF 30 |
03CB: CALL 01A |
03CC: MOVF 2B,W |
03CD: MOVWF 2C |
03CE: MOVLW 37 |
03CF: MOVWF 2D |
03D0: CALL 129 |
03D1: MOVLW 20 |
03D2: MOVWF 30 |
03D3: CALL 01A |
03D4: MOVLW 0D |
03D5: MOVWF 30 |
03D6: CALL 01A |
03D7: MOVLW 0A |
03D8: MOVWF 30 |
03D9: CALL 01A |
.................... printf("LH %lX \r\n", VH); |
03DA: MOVLW 4C |
03DB: MOVWF 30 |
03DC: CALL 01A |
03DD: MOVLW 48 |
03DE: MOVWF 30 |
03DF: CALL 01A |
03E0: MOVLW 20 |
03E1: MOVWF 30 |
03E2: CALL 01A |
03E3: MOVF 2A,W |
03E4: MOVWF 2C |
03E5: MOVLW 37 |
03E6: MOVWF 2D |
03E7: CALL 129 |
03E8: MOVLW 20 |
03E9: MOVWF 30 |
03EA: CALL 01A |
03EB: MOVLW 0D |
03EC: MOVWF 30 |
03ED: CALL 01A |
03EE: MOVLW 0A |
03EF: MOVWF 30 |
03F0: CALL 01A |
.................... |
.................... if(VL==0x48) |
03F1: MOVF 2B,W |
03F2: SUBLW 48 |
03F3: BTFSS 03.2 |
03F4: GOTO 411 |
.................... { |
.................... LSB=LSB-1; |
03F5: MOVLW 01 |
03F6: SUBWF 27,F |
.................... printf("Vysledne LSB %lX \r\n", LSB); |
03F7: MOVLW 10 |
03F8: BSF 03.6 |
03F9: MOVWF 0D |
03FA: MOVLW 00 |
03FB: MOVWF 0F |
03FC: BCF 03.0 |
03FD: MOVLW 0D |
03FE: BCF 03.6 |
03FF: MOVWF 2C |
0400: GOTO 14A |
0401: MOVF 27,W |
0402: MOVWF 2C |
0403: MOVLW 37 |
0404: MOVWF 2D |
0405: CALL 129 |
0406: MOVLW 20 |
0407: MOVWF 30 |
0408: CALL 01A |
0409: MOVLW 0D |
040A: MOVWF 30 |
040B: CALL 01A |
040C: MOVLW 0A |
040D: MOVWF 30 |
040E: CALL 01A |
.................... while(TRUE) |
.................... { |
.................... } |
040F: GOTO 40F |
.................... } |
.................... |
.................... else |
0410: GOTO 4BD |
.................... { |
.................... i2c_start();//blockdata |
0411: BSF 20.4 |
0412: MOVF 20,W |
0413: BSF 03.5 |
0414: MOVWF 07 |
0415: NOP |
0416: BCF 03.5 |
0417: BSF 20.3 |
0418: MOVF 20,W |
0419: BSF 03.5 |
041A: MOVWF 07 |
041B: NOP |
041C: BCF 03.5 |
041D: BCF 07.4 |
041E: BCF 20.4 |
041F: MOVF 20,W |
0420: BSF 03.5 |
0421: MOVWF 07 |
0422: NOP |
0423: BCF 03.5 |
0424: BCF 07.3 |
0425: BCF 20.3 |
0426: MOVF 20,W |
0427: BSF 03.5 |
0428: MOVWF 07 |
.................... I2C_Write(0xAA); |
0429: MOVLW AA |
042A: BCF 03.5 |
042B: MOVWF 2C |
042C: CALL 086 |
.................... I2C_write(0x40); |
042D: MOVLW 40 |
042E: MOVWF 2C |
042F: CALL 086 |
.................... |
.................... i2c_start(); |
0430: BSF 20.4 |
0431: MOVF 20,W |
0432: BSF 03.5 |
0433: MOVWF 07 |
0434: NOP |
0435: BCF 03.5 |
0436: BSF 20.3 |
0437: MOVF 20,W |
0438: BSF 03.5 |
0439: MOVWF 07 |
043A: NOP |
043B: BCF 03.5 |
043C: BTFSS 07.3 |
043D: GOTO 43C |
043E: BCF 07.4 |
043F: BCF 20.4 |
0440: MOVF 20,W |
0441: BSF 03.5 |
0442: MOVWF 07 |
0443: NOP |
0444: BCF 03.5 |
0445: BCF 07.3 |
0446: BCF 20.3 |
0447: MOVF 20,W |
0448: BSF 03.5 |
0449: MOVWF 07 |
.................... I2C_Write(0xAA); |
044A: MOVLW AA |
044B: BCF 03.5 |
044C: MOVWF 2C |
044D: CALL 086 |
.................... I2C_write(0x0D); |
044E: MOVLW 0D |
044F: MOVWF 2C |
0450: CALL 086 |
.................... i2c_stop(); |
0451: BCF 20.4 |
0452: MOVF 20,W |
0453: BSF 03.5 |
0454: MOVWF 07 |
0455: NOP |
0456: BCF 03.5 |
0457: BSF 20.3 |
0458: MOVF 20,W |
0459: BSF 03.5 |
045A: MOVWF 07 |
045B: BCF 03.5 |
045C: BTFSS 07.3 |
045D: GOTO 45C |
045E: NOP |
045F: GOTO 460 |
0460: NOP |
0461: BSF 20.4 |
0462: MOVF 20,W |
0463: BSF 03.5 |
0464: MOVWF 07 |
0465: NOP |
.................... |
.................... i2c_start();//blockdata |
0466: BCF 03.5 |
0467: BSF 20.4 |
0468: MOVF 20,W |
0469: BSF 03.5 |
046A: MOVWF 07 |
046B: NOP |
046C: BCF 03.5 |
046D: BSF 20.3 |
046E: MOVF 20,W |
046F: BSF 03.5 |
0470: MOVWF 07 |
0471: NOP |
0472: BCF 03.5 |
0473: BCF 07.4 |
0474: BCF 20.4 |
0475: MOVF 20,W |
0476: BSF 03.5 |
0477: MOVWF 07 |
0478: NOP |
0479: BCF 03.5 |
047A: BCF 07.3 |
047B: BCF 20.3 |
047C: MOVF 20,W |
047D: BSF 03.5 |
047E: MOVWF 07 |
.................... I2C_Write(0xAA); |
047F: MOVLW AA |
0480: BCF 03.5 |
0481: MOVWF 2C |
0482: CALL 086 |
.................... I2C_write(0x41); |
0483: MOVLW 41 |
0484: MOVWF 2C |
0485: CALL 086 |
.................... |
.................... i2c_start(); |
0486: BSF 20.4 |
0487: MOVF 20,W |
0488: BSF 03.5 |
0489: MOVWF 07 |
048A: NOP |
048B: BCF 03.5 |
048C: BSF 20.3 |
048D: MOVF 20,W |
048E: BSF 03.5 |
048F: MOVWF 07 |
0490: NOP |
0491: BCF 03.5 |
0492: BTFSS 07.3 |
0493: GOTO 492 |
0494: BCF 07.4 |
0495: BCF 20.4 |
0496: MOVF 20,W |
0497: BSF 03.5 |
0498: MOVWF 07 |
0499: NOP |
049A: BCF 03.5 |
049B: BCF 07.3 |
049C: BCF 20.3 |
049D: MOVF 20,W |
049E: BSF 03.5 |
049F: MOVWF 07 |
.................... I2C_Write(0xAA); |
04A0: MOVLW AA |
04A1: BCF 03.5 |
04A2: MOVWF 2C |
04A3: CALL 086 |
.................... I2C_write(0x48); |
04A4: MOVLW 48 |
04A5: MOVWF 2C |
04A6: CALL 086 |
.................... i2c_stop(); |
04A7: BCF 20.4 |
04A8: MOVF 20,W |
04A9: BSF 03.5 |
04AA: MOVWF 07 |
04AB: NOP |
04AC: BCF 03.5 |
04AD: BSF 20.3 |
04AE: MOVF 20,W |
04AF: BSF 03.5 |
04B0: MOVWF 07 |
04B1: BCF 03.5 |
04B2: BTFSS 07.3 |
04B3: GOTO 4B2 |
04B4: NOP |
04B5: GOTO 4B6 |
04B6: NOP |
04B7: BSF 20.4 |
04B8: MOVF 20,W |
04B9: BSF 03.5 |
04BA: MOVWF 07 |
04BB: NOP |
04BC: BCF 03.5 |
.................... |
.................... |
.................... |
.................... |
.................... |
.................... |
.................... } |
.................... |
.................... i2c_start();//blockdata |
04BD: BSF 20.4 |
04BE: MOVF 20,W |
04BF: BSF 03.5 |
04C0: MOVWF 07 |
04C1: NOP |
04C2: BCF 03.5 |
04C3: BSF 20.3 |
04C4: MOVF 20,W |
04C5: BSF 03.5 |
04C6: MOVWF 07 |
04C7: NOP |
04C8: BCF 03.5 |
04C9: BCF 07.4 |
04CA: BCF 20.4 |
04CB: MOVF 20,W |
04CC: BSF 03.5 |
04CD: MOVWF 07 |
04CE: NOP |
04CF: BCF 03.5 |
04D0: BCF 07.3 |
04D1: BCF 20.3 |
04D2: MOVF 20,W |
04D3: BSF 03.5 |
04D4: MOVWF 07 |
.................... I2C_Write(0xAA); |
04D5: MOVLW AA |
04D6: BCF 03.5 |
04D7: MOVWF 2C |
04D8: CALL 086 |
.................... I2C_write(0x60); |
04D9: MOVLW 60 |
04DA: MOVWF 2C |
04DB: CALL 086 |
.................... |
.................... i2c_start(); |
04DC: BSF 20.4 |
04DD: MOVF 20,W |
04DE: BSF 03.5 |
04DF: MOVWF 07 |
04E0: NOP |
04E1: BCF 03.5 |
04E2: BSF 20.3 |
04E3: MOVF 20,W |
04E4: BSF 03.5 |
04E5: MOVWF 07 |
04E6: NOP |
04E7: BCF 03.5 |
04E8: BTFSS 07.3 |
04E9: GOTO 4E8 |
04EA: BCF 07.4 |
04EB: BCF 20.4 |
04EC: MOVF 20,W |
04ED: BSF 03.5 |
04EE: MOVWF 07 |
04EF: NOP |
04F0: BCF 03.5 |
04F1: BCF 07.3 |
04F2: BCF 20.3 |
04F3: MOVF 20,W |
04F4: BSF 03.5 |
04F5: MOVWF 07 |
.................... I2C_Write(0xAA); |
04F6: MOVLW AA |
04F7: BCF 03.5 |
04F8: MOVWF 2C |
04F9: CALL 086 |
.................... I2C_write(LSB); |
04FA: MOVF 27,W |
04FB: MOVWF 2C |
04FC: CALL 086 |
.................... i2c_stop(); |
04FD: BCF 20.4 |
04FE: MOVF 20,W |
04FF: BSF 03.5 |
0500: MOVWF 07 |
0501: NOP |
0502: BCF 03.5 |
0503: BSF 20.3 |
0504: MOVF 20,W |
0505: BSF 03.5 |
0506: MOVWF 07 |
0507: BCF 03.5 |
0508: BTFSS 07.3 |
0509: GOTO 508 |
050A: NOP |
050B: GOTO 50C |
050C: NOP |
050D: BSF 20.4 |
050E: MOVF 20,W |
050F: BSF 03.5 |
0510: MOVWF 07 |
0511: NOP |
.................... |
.................... LSB=LSB+1; |
0512: MOVLW 01 |
0513: BCF 03.5 |
0514: ADDWF 27,F |
.................... |
.................... delay_ms (100); |
0515: MOVLW 64 |
0516: MOVWF 2C |
0517: CALL 0D0 |
.................... |
.................... |
.................... |
.................... |
.................... |
.................... |
.................... |
.................... |
.................... } |
0518: GOTO 209 |
.................... |
.................... } |
.................... |
0519: 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/Q_MAX/main.pjt |
---|
0,0 → 1,24 |
[PROJECT] |
Target=C:\Users\Honza\Documents\pic\I2C_bat_pam\Q_MAX\main.hex |
Development_Mode= |
Processor_Text=PIC16F887 |
ToolSuite=CCS |
Processor=0x887F |
[C:\Users\Honza\Documents\pic\I2C_bat_pam\Q_MAX\main] |
Type=4 |
Path= |
FileList= |
BuildTool= |
OptionString= |
AdditionalOptionString= |
[mru-list] |
1=C:\Users\Honza\Documents\pic\I2C_bat_pam\Q_MAX\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\Q_MAX\main |
[Opened Files] |
1=..\Q_MAX\main.c |
2= |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/Q_MAX/main.sta |
---|
0,0 → 1,55 |
ROM used: 1306 (16%) |
1306 (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 |
----- ----- --- ----- |
157 83 100 main.c |
20 0 0 main.h |
423 0 0 ..\..\..\..\..\..\Program Files (x86)\PICC\devices\16F887.h |
----- ----- |
600 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 895 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 1302 742 |
00800-00FFF 0 2048 |
01000-017FF 0 2048 |
01800-01FFF 0 2048 |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/Q_MAX/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\Q_MAX\ |
Project Files: |
main.c |
main.h |
..\..\..\..\..\..\Program Files (x86)\PICC\devices\16F887.h |
Units: |
C:\Users\Honza\Documents\pic\I2C_bat_pam\Q_MAX\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/Q_MAX/main.tre |
---|
0,0 → 1,70 |
ÀÄmain |
ÀÄmain 0/895 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 |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/V_MAX/vmax_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/V_MAX/main.bak |
---|
0,0 → 1,153 |
#include "C:\Users\Honza\Documents\pic\I2C_bat_pam\V_MAX\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(0x52); |
i2c_stop(); |
delay_ms (1); |
i2c_start();//dataflashblock |
I2C_Write(0xAA); |
I2C_write(0x3f); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x00); |
i2c_stop(); |
delay_ms (1); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x45); |
i2c_start(); |
I2C_Write(0xAB); |
VH=I2C_read(0); |
i2c_stop(); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x46); |
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(VL==0x10) |
{ |
LSB=LSB-1; |
printf("Vysledne LSB %lX \r\n", LSB); |
while(TRUE) |
{ |
} |
} |
else |
{ |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x45); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x68); |
i2c_stop(); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x46); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x10); |
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/V_MAX/main.c |
---|
0,0 → 1,153 |
#include "C:\Users\Honza\Documents\pic\I2C_bat_pam\V_MAX\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(0x52); |
i2c_stop(); |
delay_ms (1); |
i2c_start();//dataflashblock |
I2C_Write(0xAA); |
I2C_write(0x3f); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x00); |
i2c_stop(); |
delay_ms (1); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x45); |
i2c_start(); |
I2C_Write(0xAB); |
VH=I2C_read(0); |
i2c_stop(); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x46); |
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(VL==0x10) |
{ |
LSB=LSB-1; |
printf("Vysledne LSB %lX \r\n", LSB); |
while(TRUE) |
{ |
} |
} |
else |
{ |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x45); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x68); |
i2c_stop(); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x46); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x10); |
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/V_MAX/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/V_MAX/main.err |
---|
0,0 → 1,8 |
>>> Warning 202 "main.c" Line 23(15,20): Variable never used: STAV1 |
>>> Warning 202 "main.c" Line 23(21,26): Variable never used: STAV2 |
>>> Warning 202 "main.c" Line 25(16,22): Variable never used: SOUCET |
>>> Warning 202 "main.c" Line 25(24,31): Variable never used: SOUCET1 |
>>> Warning 202 "main.c" Line 26(21,23): Variable never used: ZK |
>>> Warning 202 "main.c" Line 26(24,25): Variable never used: k |
Memory usage: ROM=16% RAM=2% - 6% |
0 Errors, 6 Warnings. |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/V_MAX/main.esym |
---|
0,0 → 1,428 |
D G "__PCM__" 0 156 ""4.106"" |
D G "__DEVICE__" 0 156 "887" |
D G "__DATE__" 0 156 ""22-4-13"" |
D G "__TIME__" 0 156 ""22:27:28"" "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 4 "PIN_C4" |
D G "EEPROM_SCL" 0 5 "PIN_C3" |
F G "main" 0 10 "void()" |
C L "main" 0 20 1 "FUNCTION" |
V L "STAV1" 0 23 "int8" |
V L "STAV2" 0 23 "int8" |
V L "SOUCET" 0 25 "int16" |
V L "SOUCET1" 0 25 "int16" |
V L "LSB" 0 26 "int8" |
V L "ZK" 0 26 "int8" |
V L "k" 0 26 "int8" |
V L "VH" 0 26 "int8" |
V L "VL" 0 26 "int8" "unsigned int8" |
C L "main" 0 20 1 "FUNCTION" |
C L "main" 0 20 1 "FUNCTION" |
C L "main" 0 20 1 "FUNCTION" |
C L "main" 0 20 1 "FUNCTION" |
C L "main" 0 20 1 "FUNCTION" |
C L "main" 0 20 1 "FUNCTION" |
C L "main" 0 20 1 "FUNCTION" |
C L "main" 0 20 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/V_MAX/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/V_MAX/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 |
:100330008A110A12012C840183131F308305713046 |
: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 |
:1005300083168700AA308312AC0086205230AC00AC |
:100540008620201220088316870000008312A01541 |
:100550002008831687008312871DAC2A0000B02A6A |
:100560000000201620088316870000000130831247 |
:10057000AC00D020201620088316870000008312CC |
:10058000A01520088316870000008312071220128E |
:10059000200883168700000083128711A01120080D |
:1005A00083168700AA308312AC0086203F30AC004F |
:1005B0008620201620088316870000008312A015CD |
:1005C00020088316870000008312871DE52A071282 |
:1005D0002012200883168700000083128711A011C3 |
:1005E000200883168700AA308312AC008620AC0155 |
:1005F0008620201220088316870000008312A01591 |
:100600002008831687008312871D042B0000082B07 |
:100610000000201620088316870000000130831296 |
:10062000AC00D0202016200883168700000083121B |
:10063000A0152008831687000000831207122012DD |
:10064000200883168700000083128711A01120085C |
:1006500083168700AA308312AC0086204530AC0098 |
:100660008620201620088316870000008312A0151C |
:1006700020088316870000008312871D3D2B071278 |
:100680002012200883168700000083128711A01112 |
:10069000200883168700AB308312AC008620F70158 |
:1006A000E4207808AA0020122008831687000000A2 |
:1006B0008312A0152008831687008312871D5E2BE6 |
:1006C0000000622B0000201620088316870000001F |
:1006D0008312201620088316870000008312A015BD |
:1006E00020088316870000008312071220122008BA |
:1006F00083168700000083128711A011200883163B |
:100700008700AA308312AC0086204630AC008620D9 |
:10071000201620088316870000008312A0152008E9 |
:100720008316870000008312871D942B0712201266 |
:10073000200883168700000083128711A01120086B |
:1007400083168700AB308312AC008620F701E420CB |
:100750007808AB002012200883168700000083125F |
:10076000A0152008831687008312871DB52B000073 |
:10077000B92B0000201620088316870000000130E6 |
:100780008312AC00D0205630B0001A204C30B0009C |
:100790001A202030B0001A202B08AC003730AD00F2 |
:1007A00029212030B0001A200D30B0001A200A3064 |
:1007B000B0001A204C30B0001A204830B0001A2087 |
:1007C0002030B0001A202A08AC003730AD002921B3 |
:1007D0002030B0001A200D30B0001A200A30B000CE |
:1007E0001A202B08103C031D112C0130A7021030D9 |
:1007F00003178D0000308F0003100D300313AC0081 |
:100800004A292708AC003730AD0029212030B0003C |
:100810001A200D30B0001A200A30B0001A200F2C18 |
:10082000BD2C201620088316870000008312A01517 |
:100830002008831687000000831207122012200868 |
:1008400083168700000083128711A01120088316E9 |
:100850008700AA308312AC0086204530AC00862089 |
:10086000201620088316870000008312A015200898 |
:100870008316870000008312871D3C2C071220126C |
:10088000200883168700000083128711A01120081A |
:1008900083168700AA308312AC0086206830AC0033 |
:1008A0008620201220088316870000008312A015DE |
:1008B0002008831687008312871D5C2C0000602CA3 |
:1008C00000002016200883168700000083122016DF |
:1008D00020088316870000008312A01520088316C5 |
:1008E0008700000083120712201220088316870059 |
:1008F000000083128711A011200883168700AA30F8 |
:100900008312AC0086204630AC00862020162008DA |
:100910008316870000008312A01520088316870025 |
:1009200000008312871D922C0712201220088316C4 |
:100930008700000083128711A0112008831687000A |
:10094000AA308312AC0086201030AC008620201222 |
:1009500020088316870000008312A0152008831644 |
:1009600087008312871DB22C0000B62C00002016D1 |
:1009700020088316870000008312201620088316A3 |
:10098000870000008312A01520088316870000004E |
:10099000831207122012200883168700000083129A |
:1009A0008711A011200883168700AA308312AC009B |
:1009B00086206030AC008620201620088316870031 |
:1009C00000008312A0152008831687000000831200 |
:1009D000871DE82C071220122008831687000000CC |
:1009E00083128711A011200883168700AA30831272 |
:1009F000AC0086202708AC00862020122008831631 |
:100A0000870000008312A015200883168700831238 |
:100A1000871D082D00000C2D0000201620088316CD |
:100A20008700000001308312A7076430AC00D0209B |
:040A3000092A63002C |
:04400E00F52CFF3F4F |
:00000001FF |
;PIC16F887 |
;CRC=68F2 CREATED="22-4-13 22:27" |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/V_MAX/main.lst |
---|
0,0 → 1,1293 |
CCS PCM C Compiler, Version 4.106, 47914 22-4-13 22:27 |
Filename: C:\Users\Honza\Documents\pic\I2C_bat_pam\V_MAX\main.lst |
ROM used: 1306 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\V_MAX\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(0x52); |
029E: MOVLW 52 |
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(0x00); |
02F7: CLRF 2C |
02F8: CALL 086 |
.................... i2c_stop(); |
02F9: BCF 20.4 |
02FA: MOVF 20,W |
02FB: BSF 03.5 |
02FC: MOVWF 07 |
02FD: NOP |
02FE: BCF 03.5 |
02FF: BSF 20.3 |
0300: MOVF 20,W |
0301: BSF 03.5 |
0302: MOVWF 07 |
0303: BCF 03.5 |
0304: BTFSS 07.3 |
0305: GOTO 304 |
0306: NOP |
0307: GOTO 308 |
0308: NOP |
0309: BSF 20.4 |
030A: MOVF 20,W |
030B: BSF 03.5 |
030C: MOVWF 07 |
030D: NOP |
.................... |
.................... delay_ms (1); |
030E: MOVLW 01 |
030F: BCF 03.5 |
0310: MOVWF 2C |
0311: CALL 0D0 |
.................... |
.................... |
.................... |
.................... |
.................... i2c_start();//blockdata |
0312: BSF 20.4 |
0313: MOVF 20,W |
0314: BSF 03.5 |
0315: MOVWF 07 |
0316: NOP |
0317: BCF 03.5 |
0318: BSF 20.3 |
0319: MOVF 20,W |
031A: BSF 03.5 |
031B: MOVWF 07 |
031C: NOP |
031D: BCF 03.5 |
031E: BCF 07.4 |
031F: BCF 20.4 |
0320: MOVF 20,W |
0321: BSF 03.5 |
0322: MOVWF 07 |
0323: NOP |
0324: BCF 03.5 |
0325: BCF 07.3 |
0326: BCF 20.3 |
0327: MOVF 20,W |
0328: BSF 03.5 |
0329: MOVWF 07 |
.................... I2C_Write(0xAA); |
032A: MOVLW AA |
032B: BCF 03.5 |
032C: MOVWF 2C |
032D: CALL 086 |
.................... I2C_write(0x45); |
032E: MOVLW 45 |
032F: MOVWF 2C |
0330: CALL 086 |
.................... |
.................... i2c_start(); |
0331: BSF 20.4 |
0332: MOVF 20,W |
0333: BSF 03.5 |
0334: MOVWF 07 |
0335: NOP |
0336: BCF 03.5 |
0337: BSF 20.3 |
0338: MOVF 20,W |
0339: BSF 03.5 |
033A: MOVWF 07 |
033B: NOP |
033C: BCF 03.5 |
033D: BTFSS 07.3 |
033E: GOTO 33D |
033F: BCF 07.4 |
0340: BCF 20.4 |
0341: MOVF 20,W |
0342: BSF 03.5 |
0343: MOVWF 07 |
0344: NOP |
0345: BCF 03.5 |
0346: BCF 07.3 |
0347: BCF 20.3 |
0348: MOVF 20,W |
0349: BSF 03.5 |
034A: MOVWF 07 |
.................... I2C_Write(0xAB); |
034B: MOVLW AB |
034C: BCF 03.5 |
034D: MOVWF 2C |
034E: CALL 086 |
.................... VH=I2C_read(0); |
034F: CLRF 77 |
0350: CALL 0E4 |
0351: MOVF 78,W |
0352: MOVWF 2A |
.................... |
.................... i2c_stop(); |
0353: BCF 20.4 |
0354: MOVF 20,W |
0355: BSF 03.5 |
0356: MOVWF 07 |
0357: NOP |
0358: BCF 03.5 |
0359: BSF 20.3 |
035A: MOVF 20,W |
035B: BSF 03.5 |
035C: MOVWF 07 |
035D: BCF 03.5 |
035E: BTFSS 07.3 |
035F: GOTO 35E |
0360: NOP |
0361: GOTO 362 |
0362: NOP |
0363: BSF 20.4 |
0364: MOVF 20,W |
0365: BSF 03.5 |
0366: MOVWF 07 |
0367: NOP |
.................... |
.................... i2c_start();//blockdata |
0368: BCF 03.5 |
0369: BSF 20.4 |
036A: MOVF 20,W |
036B: BSF 03.5 |
036C: MOVWF 07 |
036D: NOP |
036E: BCF 03.5 |
036F: BSF 20.3 |
0370: MOVF 20,W |
0371: BSF 03.5 |
0372: MOVWF 07 |
0373: NOP |
0374: BCF 03.5 |
0375: BCF 07.4 |
0376: BCF 20.4 |
0377: MOVF 20,W |
0378: BSF 03.5 |
0379: MOVWF 07 |
037A: NOP |
037B: BCF 03.5 |
037C: BCF 07.3 |
037D: BCF 20.3 |
037E: MOVF 20,W |
037F: BSF 03.5 |
0380: MOVWF 07 |
.................... I2C_Write(0xAA); |
0381: MOVLW AA |
0382: BCF 03.5 |
0383: MOVWF 2C |
0384: CALL 086 |
.................... I2C_write(0x46); |
0385: MOVLW 46 |
0386: MOVWF 2C |
0387: CALL 086 |
.................... |
.................... i2c_start(); |
0388: BSF 20.4 |
0389: MOVF 20,W |
038A: BSF 03.5 |
038B: MOVWF 07 |
038C: NOP |
038D: BCF 03.5 |
038E: BSF 20.3 |
038F: MOVF 20,W |
0390: BSF 03.5 |
0391: MOVWF 07 |
0392: NOP |
0393: BCF 03.5 |
0394: BTFSS 07.3 |
0395: GOTO 394 |
0396: BCF 07.4 |
0397: BCF 20.4 |
0398: MOVF 20,W |
0399: BSF 03.5 |
039A: MOVWF 07 |
039B: NOP |
039C: BCF 03.5 |
039D: BCF 07.3 |
039E: BCF 20.3 |
039F: MOVF 20,W |
03A0: BSF 03.5 |
03A1: MOVWF 07 |
.................... I2C_Write(0xAB); |
03A2: MOVLW AB |
03A3: BCF 03.5 |
03A4: MOVWF 2C |
03A5: CALL 086 |
.................... |
.................... VL=I2C_read(0); |
03A6: CLRF 77 |
03A7: CALL 0E4 |
03A8: MOVF 78,W |
03A9: MOVWF 2B |
.................... i2c_stop(); |
03AA: BCF 20.4 |
03AB: MOVF 20,W |
03AC: BSF 03.5 |
03AD: MOVWF 07 |
03AE: NOP |
03AF: BCF 03.5 |
03B0: BSF 20.3 |
03B1: MOVF 20,W |
03B2: BSF 03.5 |
03B3: MOVWF 07 |
03B4: BCF 03.5 |
03B5: BTFSS 07.3 |
03B6: GOTO 3B5 |
03B7: NOP |
03B8: GOTO 3B9 |
03B9: NOP |
03BA: BSF 20.4 |
03BB: MOVF 20,W |
03BC: BSF 03.5 |
03BD: MOVWF 07 |
03BE: NOP |
.................... |
.................... |
.................... delay_ms (1); |
03BF: MOVLW 01 |
03C0: BCF 03.5 |
03C1: MOVWF 2C |
03C2: CALL 0D0 |
.................... |
.................... printf("VL %lX \r\n", VL); |
03C3: MOVLW 56 |
03C4: MOVWF 30 |
03C5: CALL 01A |
03C6: MOVLW 4C |
03C7: MOVWF 30 |
03C8: CALL 01A |
03C9: MOVLW 20 |
03CA: MOVWF 30 |
03CB: CALL 01A |
03CC: MOVF 2B,W |
03CD: MOVWF 2C |
03CE: MOVLW 37 |
03CF: MOVWF 2D |
03D0: CALL 129 |
03D1: MOVLW 20 |
03D2: MOVWF 30 |
03D3: CALL 01A |
03D4: MOVLW 0D |
03D5: MOVWF 30 |
03D6: CALL 01A |
03D7: MOVLW 0A |
03D8: MOVWF 30 |
03D9: CALL 01A |
.................... printf("LH %lX \r\n", VH); |
03DA: MOVLW 4C |
03DB: MOVWF 30 |
03DC: CALL 01A |
03DD: MOVLW 48 |
03DE: MOVWF 30 |
03DF: CALL 01A |
03E0: MOVLW 20 |
03E1: MOVWF 30 |
03E2: CALL 01A |
03E3: MOVF 2A,W |
03E4: MOVWF 2C |
03E5: MOVLW 37 |
03E6: MOVWF 2D |
03E7: CALL 129 |
03E8: MOVLW 20 |
03E9: MOVWF 30 |
03EA: CALL 01A |
03EB: MOVLW 0D |
03EC: MOVWF 30 |
03ED: CALL 01A |
03EE: MOVLW 0A |
03EF: MOVWF 30 |
03F0: CALL 01A |
.................... |
.................... |
.................... |
.................... |
.................... |
.................... |
.................... if(VL==0x10) |
03F1: MOVF 2B,W |
03F2: SUBLW 10 |
03F3: BTFSS 03.2 |
03F4: GOTO 411 |
.................... { |
.................... LSB=LSB-1; |
03F5: MOVLW 01 |
03F6: SUBWF 27,F |
.................... printf("Vysledne LSB %lX \r\n", LSB); |
03F7: MOVLW 10 |
03F8: BSF 03.6 |
03F9: MOVWF 0D |
03FA: MOVLW 00 |
03FB: MOVWF 0F |
03FC: BCF 03.0 |
03FD: MOVLW 0D |
03FE: BCF 03.6 |
03FF: MOVWF 2C |
0400: GOTO 14A |
0401: MOVF 27,W |
0402: MOVWF 2C |
0403: MOVLW 37 |
0404: MOVWF 2D |
0405: CALL 129 |
0406: MOVLW 20 |
0407: MOVWF 30 |
0408: CALL 01A |
0409: MOVLW 0D |
040A: MOVWF 30 |
040B: CALL 01A |
040C: MOVLW 0A |
040D: MOVWF 30 |
040E: CALL 01A |
.................... while(TRUE) |
.................... { |
.................... } |
040F: GOTO 40F |
.................... } |
.................... |
.................... else |
0410: GOTO 4BD |
.................... { |
.................... i2c_start();//blockdata |
0411: BSF 20.4 |
0412: MOVF 20,W |
0413: BSF 03.5 |
0414: MOVWF 07 |
0415: NOP |
0416: BCF 03.5 |
0417: BSF 20.3 |
0418: MOVF 20,W |
0419: BSF 03.5 |
041A: MOVWF 07 |
041B: NOP |
041C: BCF 03.5 |
041D: BCF 07.4 |
041E: BCF 20.4 |
041F: MOVF 20,W |
0420: BSF 03.5 |
0421: MOVWF 07 |
0422: NOP |
0423: BCF 03.5 |
0424: BCF 07.3 |
0425: BCF 20.3 |
0426: MOVF 20,W |
0427: BSF 03.5 |
0428: MOVWF 07 |
.................... I2C_Write(0xAA); |
0429: MOVLW AA |
042A: BCF 03.5 |
042B: MOVWF 2C |
042C: CALL 086 |
.................... I2C_write(0x45); |
042D: MOVLW 45 |
042E: MOVWF 2C |
042F: CALL 086 |
.................... |
.................... i2c_start(); |
0430: BSF 20.4 |
0431: MOVF 20,W |
0432: BSF 03.5 |
0433: MOVWF 07 |
0434: NOP |
0435: BCF 03.5 |
0436: BSF 20.3 |
0437: MOVF 20,W |
0438: BSF 03.5 |
0439: MOVWF 07 |
043A: NOP |
043B: BCF 03.5 |
043C: BTFSS 07.3 |
043D: GOTO 43C |
043E: BCF 07.4 |
043F: BCF 20.4 |
0440: MOVF 20,W |
0441: BSF 03.5 |
0442: MOVWF 07 |
0443: NOP |
0444: BCF 03.5 |
0445: BCF 07.3 |
0446: BCF 20.3 |
0447: MOVF 20,W |
0448: BSF 03.5 |
0449: MOVWF 07 |
.................... I2C_Write(0xAA); |
044A: MOVLW AA |
044B: BCF 03.5 |
044C: MOVWF 2C |
044D: CALL 086 |
.................... I2C_write(0x68); |
044E: MOVLW 68 |
044F: MOVWF 2C |
0450: CALL 086 |
.................... i2c_stop(); |
0451: BCF 20.4 |
0452: MOVF 20,W |
0453: BSF 03.5 |
0454: MOVWF 07 |
0455: NOP |
0456: BCF 03.5 |
0457: BSF 20.3 |
0458: MOVF 20,W |
0459: BSF 03.5 |
045A: MOVWF 07 |
045B: BCF 03.5 |
045C: BTFSS 07.3 |
045D: GOTO 45C |
045E: NOP |
045F: GOTO 460 |
0460: NOP |
0461: BSF 20.4 |
0462: MOVF 20,W |
0463: BSF 03.5 |
0464: MOVWF 07 |
0465: NOP |
.................... |
.................... i2c_start();//blockdata |
0466: BCF 03.5 |
0467: BSF 20.4 |
0468: MOVF 20,W |
0469: BSF 03.5 |
046A: MOVWF 07 |
046B: NOP |
046C: BCF 03.5 |
046D: BSF 20.3 |
046E: MOVF 20,W |
046F: BSF 03.5 |
0470: MOVWF 07 |
0471: NOP |
0472: BCF 03.5 |
0473: BCF 07.4 |
0474: BCF 20.4 |
0475: MOVF 20,W |
0476: BSF 03.5 |
0477: MOVWF 07 |
0478: NOP |
0479: BCF 03.5 |
047A: BCF 07.3 |
047B: BCF 20.3 |
047C: MOVF 20,W |
047D: BSF 03.5 |
047E: MOVWF 07 |
.................... I2C_Write(0xAA); |
047F: MOVLW AA |
0480: BCF 03.5 |
0481: MOVWF 2C |
0482: CALL 086 |
.................... I2C_write(0x46); |
0483: MOVLW 46 |
0484: MOVWF 2C |
0485: CALL 086 |
.................... |
.................... i2c_start(); |
0486: BSF 20.4 |
0487: MOVF 20,W |
0488: BSF 03.5 |
0489: MOVWF 07 |
048A: NOP |
048B: BCF 03.5 |
048C: BSF 20.3 |
048D: MOVF 20,W |
048E: BSF 03.5 |
048F: MOVWF 07 |
0490: NOP |
0491: BCF 03.5 |
0492: BTFSS 07.3 |
0493: GOTO 492 |
0494: BCF 07.4 |
0495: BCF 20.4 |
0496: MOVF 20,W |
0497: BSF 03.5 |
0498: MOVWF 07 |
0499: NOP |
049A: BCF 03.5 |
049B: BCF 07.3 |
049C: BCF 20.3 |
049D: MOVF 20,W |
049E: BSF 03.5 |
049F: MOVWF 07 |
.................... I2C_Write(0xAA); |
04A0: MOVLW AA |
04A1: BCF 03.5 |
04A2: MOVWF 2C |
04A3: CALL 086 |
.................... I2C_write(0x10); |
04A4: MOVLW 10 |
04A5: MOVWF 2C |
04A6: CALL 086 |
.................... i2c_stop(); |
04A7: BCF 20.4 |
04A8: MOVF 20,W |
04A9: BSF 03.5 |
04AA: MOVWF 07 |
04AB: NOP |
04AC: BCF 03.5 |
04AD: BSF 20.3 |
04AE: MOVF 20,W |
04AF: BSF 03.5 |
04B0: MOVWF 07 |
04B1: BCF 03.5 |
04B2: BTFSS 07.3 |
04B3: GOTO 4B2 |
04B4: NOP |
04B5: GOTO 4B6 |
04B6: NOP |
04B7: BSF 20.4 |
04B8: MOVF 20,W |
04B9: BSF 03.5 |
04BA: MOVWF 07 |
04BB: NOP |
04BC: BCF 03.5 |
.................... |
.................... |
.................... |
.................... |
.................... |
.................... |
.................... } |
.................... |
.................... i2c_start();//blockdata |
04BD: BSF 20.4 |
04BE: MOVF 20,W |
04BF: BSF 03.5 |
04C0: MOVWF 07 |
04C1: NOP |
04C2: BCF 03.5 |
04C3: BSF 20.3 |
04C4: MOVF 20,W |
04C5: BSF 03.5 |
04C6: MOVWF 07 |
04C7: NOP |
04C8: BCF 03.5 |
04C9: BCF 07.4 |
04CA: BCF 20.4 |
04CB: MOVF 20,W |
04CC: BSF 03.5 |
04CD: MOVWF 07 |
04CE: NOP |
04CF: BCF 03.5 |
04D0: BCF 07.3 |
04D1: BCF 20.3 |
04D2: MOVF 20,W |
04D3: BSF 03.5 |
04D4: MOVWF 07 |
.................... I2C_Write(0xAA); |
04D5: MOVLW AA |
04D6: BCF 03.5 |
04D7: MOVWF 2C |
04D8: CALL 086 |
.................... I2C_write(0x60); |
04D9: MOVLW 60 |
04DA: MOVWF 2C |
04DB: CALL 086 |
.................... |
.................... i2c_start(); |
04DC: BSF 20.4 |
04DD: MOVF 20,W |
04DE: BSF 03.5 |
04DF: MOVWF 07 |
04E0: NOP |
04E1: BCF 03.5 |
04E2: BSF 20.3 |
04E3: MOVF 20,W |
04E4: BSF 03.5 |
04E5: MOVWF 07 |
04E6: NOP |
04E7: BCF 03.5 |
04E8: BTFSS 07.3 |
04E9: GOTO 4E8 |
04EA: BCF 07.4 |
04EB: BCF 20.4 |
04EC: MOVF 20,W |
04ED: BSF 03.5 |
04EE: MOVWF 07 |
04EF: NOP |
04F0: BCF 03.5 |
04F1: BCF 07.3 |
04F2: BCF 20.3 |
04F3: MOVF 20,W |
04F4: BSF 03.5 |
04F5: MOVWF 07 |
.................... I2C_Write(0xAA); |
04F6: MOVLW AA |
04F7: BCF 03.5 |
04F8: MOVWF 2C |
04F9: CALL 086 |
.................... I2C_write(LSB); |
04FA: MOVF 27,W |
04FB: MOVWF 2C |
04FC: CALL 086 |
.................... i2c_stop(); |
04FD: BCF 20.4 |
04FE: MOVF 20,W |
04FF: BSF 03.5 |
0500: MOVWF 07 |
0501: NOP |
0502: BCF 03.5 |
0503: BSF 20.3 |
0504: MOVF 20,W |
0505: BSF 03.5 |
0506: MOVWF 07 |
0507: BCF 03.5 |
0508: BTFSS 07.3 |
0509: GOTO 508 |
050A: NOP |
050B: GOTO 50C |
050C: NOP |
050D: BSF 20.4 |
050E: MOVF 20,W |
050F: BSF 03.5 |
0510: MOVWF 07 |
0511: NOP |
.................... |
.................... LSB=LSB+1; |
0512: MOVLW 01 |
0513: BCF 03.5 |
0514: ADDWF 27,F |
.................... |
.................... delay_ms (100); |
0515: MOVLW 64 |
0516: MOVWF 2C |
0517: CALL 0D0 |
.................... |
.................... } |
0518: GOTO 209 |
.................... |
.................... } |
.................... |
0519: 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/V_MAX/main.pjt |
---|
0,0 → 1,24 |
[PROJECT] |
Target=C:\Users\Honza\Documents\pic\I2C_bat_pam\V_MAX\main.hex |
Development_Mode= |
Processor_Text=PIC16F887 |
ToolSuite=CCS |
Processor=0x887F |
[C:\Users\Honza\Documents\pic\I2C_bat_pam\V_MAX\main] |
Type=4 |
Path= |
FileList= |
BuildTool= |
OptionString= |
AdditionalOptionString= |
[mru-list] |
1=C:\Users\Honza\Documents\pic\I2C_bat_pam\V_MAX\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\V_MAX\main |
[Opened Files] |
1=..\V_MAX\main.c |
2= |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/V_MAX/main.sta |
---|
0,0 → 1,55 |
ROM used: 1306 (16%) |
1306 (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 |
----- ----- --- ----- |
154 83 100 main.c |
20 0 0 main.h |
423 0 0 ..\..\..\..\..\..\Program Files (x86)\PICC\devices\16F887.h |
----- ----- |
597 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 895 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 1302 742 |
00800-00FFF 0 2048 |
01000-017FF 0 2048 |
01800-01FFF 0 2048 |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/V_MAX/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\V_MAX\ |
Project Files: |
main.c |
main.h |
..\..\..\..\..\..\Program Files (x86)\PICC\devices\16F887.h |
Units: |
C:\Users\Honza\Documents\pic\I2C_bat_pam\V_MAX\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/V_MAX/main.tre |
---|
0,0 → 1,70 |
ÀÄmain |
ÀÄmain 0/895 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 |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/LED_BAT/main.bak |
---|
0,0 → 1,152 |
//#include "C:\Users\Honza\Documents\pic\I2C_bat_pam\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 |
#include "main.h" |
void main() |
{ |
setup_adc_ports(NO_ANALOGS|VSS_VDD); |
setup_adc(ADC_CLOCK_DIV_2); |
setup_spi(SPI_SS_DISABLED); |
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); |
setup_timer_1(T1_DISABLED); |
setup_timer_2(T2_DISABLED,0,1); |
setup_ccp1(CCP_OFF); |
setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard |
printf("Simple Thermomether \r\n",); |
unsigned int8 STAV1,STAV2; |
unsigned int16 SOUCET, SOUCET1; |
unsigned int8 LSB=0,ZK,k=0; |
//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(0x40); |
i2c_stop(); |
delay_ms (1); |
i2c_start();//dataflashblock |
I2C_Write(0xAA); |
I2C_write(0x3f); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x00); |
i2c_stop(); |
delay_ms (1); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x44); |
i2c_start(); |
I2C_Write(0xAB); |
ZK=I2C_read(0); |
i2c_stop(); |
delay_ms (1); |
printf("LED %lX \r\n", ZK); |
if(ZK==0x73) |
{ |
LSB=LSB-1; |
printf("Vysledne LSB %lX \r\n", LSB); |
while(TRUE) |
{ |
} |
} |
else |
{ |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x44); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x73); //pro 5LED 0x53 pro 7led 0x73 |
i2c_stop(); |
int i=64; |
SOUCET=0; |
SOUCET1=0; |
/* |
for (i=64;i<96;++i) |
{ |
printf("%u\r\n",i); |
i2c_stop(); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(i); |
i2c_start(); |
I2C_Write(0xAB); |
STAV1=I2C_read(0); |
i2c_stop(); |
printf("STAV %lX \r\n", STAV1); |
SOUCET=SOUCET+STAV1; |
} |
printf("SOUCET: %lX (procenta)\r\n", SOUCET); |
SOUCET1=SOUCET; |
SOUCET1=SOUCET1>>8; |
printf("Deleno 256: %lX (procenta)\r\n", SOUCET1); |
SOUCET1=SOUCET-SOUCET1; |
printf("Soucet - soucet/256: %lX \r\n", SOUCET1); |
LSB=(unsigned int8)SOUCET1; |
printf("LSB: %lX\r\n", LSB); |
//printf("Stav: %X (procenta)\r\n", STAV2); |
*/ |
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/LED_BAT/main.c |
---|
0,0 → 1,153 |
//#include "C:\Users\Honza\Documents\pic\I2C_bat_pam\main.h" |
#include "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; |
//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(0x40); |
i2c_stop(); |
delay_ms (1); |
i2c_start();//dataflashblock |
I2C_Write(0xAA); |
I2C_write(0x3f); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x00); |
i2c_stop(); |
delay_ms (1); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x44); |
i2c_start(); |
I2C_Write(0xAB); |
ZK=I2C_read(0); |
i2c_stop(); |
delay_ms (1); |
printf("LED %lX \r\n", ZK); |
if(ZK==0x73) |
{ |
LSB=LSB-1; |
printf("Vysledne LSB %lX \r\n", LSB); |
while(TRUE) |
{ |
} |
} |
else |
{ |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(0x44); |
i2c_start(); |
I2C_Write(0xAA); |
I2C_write(0x73); //pro 5LED 0x53 pro 7led 0x73 |
i2c_stop(); |
int i=64; |
SOUCET=0; |
SOUCET1=0; |
/* |
for (i=64;i<96;++i) |
{ |
printf("%u\r\n",i); |
i2c_stop(); |
i2c_start();//blockdata |
I2C_Write(0xAA); |
I2C_write(i); |
i2c_start(); |
I2C_Write(0xAB); |
STAV1=I2C_read(0); |
i2c_stop(); |
printf("STAV %lX \r\n", STAV1); |
SOUCET=SOUCET+STAV1; |
} |
printf("SOUCET: %lX (procenta)\r\n", SOUCET); |
SOUCET1=SOUCET; |
SOUCET1=SOUCET1>>8; |
printf("Deleno 256: %lX (procenta)\r\n", SOUCET1); |
SOUCET1=SOUCET-SOUCET1; |
printf("Soucet - soucet/256: %lX \r\n", SOUCET1); |
LSB=(unsigned int8)SOUCET1; |
printf("LSB: %lX\r\n", LSB); |
//printf("Stav: %X (procenta)\r\n", STAV2); |
*/ |
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/LED_BAT/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/LED_BAT/main.err |
---|
0,0 → 1,6 |
>>> Warning 202 "main.c" Line 21(15,20): Variable never used: STAV1 |
>>> Warning 202 "main.c" Line 21(21,26): Variable never used: STAV2 |
>>> Warning 202 "main.c" Line 24(24,25): Variable never used: k |
>>> Warning 202 "main.c" Line 99(5,6): Variable never used: i |
Memory usage: ROM=11% RAM=2% - 6% |
0 Errors, 4 Warnings. |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/LED_BAT/main.esym |
---|
0,0 → 1,427 |
D G "__PCM__" 0 154 ""4.106"" |
D G "__DEVICE__" 0 154 "887" |
D G "__DATE__" 0 154 ""06-4-13"" |
D G "__TIME__" 0 154 ""21:54:19"" "Standard Header file for the PIC16F887 device ////////////////" |
d G "PIN_A0" 2 20 "40" |
d G "PIN_A1" 2 21 "41" |
d G "PIN_A2" 2 22 "42" |
d G "PIN_A3" 2 23 "43" |
d G "PIN_A4" 2 24 "44" |
d G "PIN_A5" 2 25 "45" |
d G "PIN_A6" 2 26 "46" |
d G "PIN_A7" 2 27 "47" |
d G "PIN_B0" 2 29 "48" |
d G "PIN_B1" 2 30 "49" |
d G "PIN_B2" 2 31 "50" |
d G "PIN_B3" 2 32 "51" |
d G "PIN_B4" 2 33 "52" |
d G "PIN_B5" 2 34 "53" |
d G "PIN_B6" 2 35 "54" |
d G "PIN_B7" 2 36 "55" |
d G "PIN_C0" 2 38 "56" |
d G "PIN_C1" 2 39 "57" |
d G "PIN_C2" 2 40 "58" |
d G "PIN_C3" 2 41 "59" |
d G "PIN_C4" 2 42 "60" |
d G "PIN_C5" 2 43 "61" |
d G "PIN_C6" 2 44 "62" |
d G "PIN_C7" 2 45 "63" |
d G "PIN_D0" 2 47 "64" |
d G "PIN_D1" 2 48 "65" |
d G "PIN_D2" 2 49 "66" |
d G "PIN_D3" 2 50 "67" |
d G "PIN_D4" 2 51 "68" |
d G "PIN_D5" 2 52 "69" |
d G "PIN_D6" 2 53 "70" |
d G "PIN_D7" 2 54 "71" |
d G "PIN_E0" 2 56 "72" |
d G "PIN_E1" 2 57 "73" |
d G "PIN_E2" 2 58 "74" |
d G "PIN_E3" 2 59 "75" |
d G "FALSE" 2 62 "0" |
d G "TRUE" 2 63 "1" |
d G "BYTE" 2 65 "int8" |
d G "BOOLEAN" 2 66 "int1" |
d G "getc" 2 68 "getch" |
d G "fgetc" 2 69 "getch" |
d G "getchar" 2 70 "getch" |
d G "putc" 2 71 "putchar" |
d G "fputc" 2 72 "putchar" |
d G "fgets" 2 73 "gets" |
d G "fputs" 2 74 "puts" |
d G "WDT_FROM_SLEEP" 2 79 "3" |
d G "WDT_TIMEOUT" 2 80 "11" |
d G "MCLR_FROM_SLEEP" 2 81 "19" |
d G "MCLR_FROM_RUN" 2 82 "27" |
d G "NORMAL_POWER_UP" 2 83 "25" |
d G "BROWNOUT_RESTART" 2 84 "26" |
d G "T0_INTERNAL" 2 91 "0" |
d G "T0_EXT_L_TO_H" 2 92 "32" |
d G "T0_EXT_H_TO_L" 2 93 "48" |
d G "T0_DIV_1" 2 95 "8" |
d G "T0_DIV_2" 2 96 "0" |
d G "T0_DIV_4" 2 97 "1" |
d G "T0_DIV_8" 2 98 "2" |
d G "T0_DIV_16" 2 99 "3" |
d G "T0_DIV_32" 2 100 "4" |
d G "T0_DIV_64" 2 101 "5" |
d G "T0_DIV_128" 2 102 "6" |
d G "T0_DIV_256" 2 103 "7" |
d G "T0_8_BIT" 2 106 "0" |
d G "RTCC_INTERNAL" 2 108 "0" "The following are provided for compatibility" |
d G "RTCC_EXT_L_TO_H" 2 109 "32" "with older compiler versions" |
d G "RTCC_EXT_H_TO_L" 2 110 "48" |
d G "RTCC_DIV_1" 2 111 "8" |
d G "RTCC_DIV_2" 2 112 "0" |
d G "RTCC_DIV_4" 2 113 "1" |
d G "RTCC_DIV_8" 2 114 "2" |
d G "RTCC_DIV_16" 2 115 "3" |
d G "RTCC_DIV_32" 2 116 "4" |
d G "RTCC_DIV_64" 2 117 "5" |
d G "RTCC_DIV_128" 2 118 "6" |
d G "RTCC_DIV_256" 2 119 "7" |
d G "RTCC_8_BIT" 2 120 "0" |
d G "WDT_18MS" 2 132 "8" |
d G "WDT_36MS" 2 133 "9" |
d G "WDT_72MS" 2 134 "10" |
d G "WDT_144MS" 2 135 "11" |
d G "WDT_288MS" 2 136 "12" |
d G "WDT_576MS" 2 137 "13" |
d G "WDT_1152MS" 2 138 "14" |
d G "WDT_2304MS" 2 139 "15" |
d G "WDT_ON" 2 143 "0x4100" |
d G "WDT_OFF" 2 144 "0" |
d G "WDT_DIV_16" 2 145 "0x100" |
d G "WDT_DIV_8" 2 146 "0x300" |
d G "WDT_DIV_4" 2 147 "0x500" |
d G "WDT_DIV_2" 2 148 "0x700" |
d G "WDT_TIMES_1" 2 149 "0x900" "Default" |
d G "WDT_TIMES_2" 2 150 "0xB00" |
d G "WDT_TIMES_4" 2 151 "0xD00" |
d G "WDT_TIMES_8" 2 152 "0xF00" |
d G "WDT_TIMES_16" 2 153 "0x1100" |
d G "WDT_TIMES_32" 2 154 "0x1300" |
d G "WDT_TIMES_64" 2 155 "0x1500" |
d G "WDT_TIMES_128" 2 156 "0x1700" |
d G "T1_DISABLED" 2 162 "0" |
d G "T1_INTERNAL" 2 163 "5" |
d G "T1_EXTERNAL" 2 164 "7" |
d G "T1_EXTERNAL_SYNC" 2 165 "3" |
d G "T1_CLK_OUT" 2 167 "8" |
d G "T1_DIV_BY_1" 2 169 "0" |
d G "T1_DIV_BY_2" 2 170 "0x10" |
d G "T1_DIV_BY_4" 2 171 "0x20" |
d G "T1_DIV_BY_8" 2 172 "0x30" |
d G "T1_GATE" 2 174 "0x40" |
d G "T1_GATE_INVERTED" 2 175 "0xC0" |
d G "T2_DISABLED" 2 180 "0" |
d G "T2_DIV_BY_1" 2 181 "4" |
d G "T2_DIV_BY_4" 2 182 "5" |
d G "T2_DIV_BY_16" 2 183 "6" |
d G "CCP_OFF" 2 189 "0" |
d G "CCP_CAPTURE_FE" 2 190 "4" |
d G "CCP_CAPTURE_RE" 2 191 "5" |
d G "CCP_CAPTURE_DIV_4" 2 192 "6" |
d G "CCP_CAPTURE_DIV_16" 2 193 "7" |
d G "CCP_COMPARE_SET_ON_MATCH" 2 194 "8" |
d G "CCP_COMPARE_CLR_ON_MATCH" 2 195 "9" |
d G "CCP_COMPARE_INT" 2 196 "0xA" |
d G "CCP_COMPARE_RESET_TIMER" 2 197 "0xB" |
d G "CCP_PWM" 2 198 "0xC" |
d G "CCP_PWM_PLUS_1" 2 199 "0x1c" |
d G "CCP_PWM_PLUS_2" 2 200 "0x2c" |
d G "CCP_PWM_PLUS_3" 2 201 "0x3c" |
d G "CCP_PWM_H_H" 2 206 "0x0c" |
d G "CCP_PWM_H_L" 2 207 "0x0d" |
d G "CCP_PWM_L_H" 2 208 "0x0e" |
d G "CCP_PWM_L_L" 2 209 "0x0f" |
d G "CCP_PWM_FULL_BRIDGE" 2 211 "0x40" |
d G "CCP_PWM_FULL_BRIDGE_REV" 2 212 "0xC0" |
d G "CCP_PWM_HALF_BRIDGE" 2 213 "0x80" |
d G "CCP_SHUTDOWN_ON_COMP1" 2 215 "0x100000" |
d G "CCP_SHUTDOWN_ON_COMP2" 2 216 "0x200000" |
d G "CCP_SHUTDOWN_ON_COMP" 2 217 "0x300000" |
d G "CCP_SHUTDOWN_ON_INT0" 2 218 "0x400000" |
d G "CCP_SHUTDOWN_ON_COMP1_INT0" 2 219 "0x500000" |
d G "CCP_SHUTDOWN_ON_COMP2_INT0" 2 220 "0x600000" |
d G "CCP_SHUTDOWN_ON_COMP_INT0" 2 221 "0x700000" |
d G "CCP_SHUTDOWN_AC_L" 2 223 "0x000000" |
d G "CCP_SHUTDOWN_AC_H" 2 224 "0x040000" |
d G "CCP_SHUTDOWN_AC_F" 2 225 "0x080000" |
d G "CCP_SHUTDOWN_BD_L" 2 227 "0x000000" |
d G "CCP_SHUTDOWN_BD_H" 2 228 "0x010000" |
d G "CCP_SHUTDOWN_BD_F" 2 229 "0x020000" |
d G "CCP_SHUTDOWN_RESTART" 2 231 "0x80000000" |
d G "CCP_PULSE_STEERING_A" 2 233 "0x01000000" |
d G "CCP_PULSE_STEERING_B" 2 234 "0x02000000" |
d G "CCP_PULSE_STEERING_C" 2 235 "0x04000000" |
d G "CCP_PULSE_STEERING_D" 2 236 "0x08000000" |
d G "CCP_PULSE_STEERING_SYNC" 2 237 "0x10000000" |
d G "SPI_MASTER" 2 245 "0x20" |
d G "SPI_SLAVE" 2 246 "0x24" |
d G "SPI_L_TO_H" 2 247 "0" |
d G "SPI_H_TO_L" 2 248 "0x10" |
d G "SPI_CLK_DIV_4" 2 249 "0" |
d G "SPI_CLK_DIV_16" 2 250 "1" |
d G "SPI_CLK_DIV_64" 2 251 "2" |
d G "SPI_CLK_T2" 2 252 "3" |
d G "SPI_SS_DISABLED" 2 253 "1" |
d G "SPI_SAMPLE_AT_END" 2 255 "0x8000" |
d G "SPI_XMIT_L_TO_H" 2 256 "0x4000" |
d G "UART_ADDRESS" 2 262 "2" |
d G "UART_DATA" 2 263 "4" |
d G "UART_AUTODETECT" 2 264 "8" |
d G "UART_AUTODETECT_NOWAIT" 2 265 "9" |
d G "UART_WAKEUP_ON_RDA" 2 266 "10" |
d G "UART_SEND_BREAK" 2 267 "13" |
d G "NC_NC_NC_NC" 2 273 "0x00" |
d G "NC_NC" 2 274 "0x00" |
d G "CP1_A0_A3" 2 277 "0x00090080" |
d G "CP1_A1_A3" 2 278 "0x000A0081" |
d G "CP1_B3_A3" 2 279 "0x00880082" |
d G "CP1_B1_A3" 2 280 "0x00280083" |
d G "CP1_A0_VREF" 2 281 "0x00010084" |
d G "CP1_A1_VREF" 2 282 "0x00020085" |
d G "CP1_B3_VREF" 2 283 "0x00800086" |
d G "CP1_B1_VREF" 2 284 "0x00200087" |
d G "CP1_OUT_ON_A4" 2 286 "0x00000020" |
d G "CP1_INVERT" 2 287 "0x00000010" |
d G "CP1_ABSOLUTE_VREF" 2 288 "0x20000000" |
d G "CP2_A0_A2" 2 291 "0x00058000" |
d G "CP2_A1_A2" 2 292 "0x00068100" |
d G "CP2_B3_A2" 2 293 "0x00848200" |
d G "CP2_B1_A2" 2 294 "0x00248300" |
d G "CP2_A0_VREF" 2 295 "0x00018400" |
d G "CP2_A1_VREF" 2 296 "0x00028500" |
d G "CP2_B3_VREF" 2 297 "0x00808600" |
d G "CP2_B1_VREF" 2 298 "0x00208700" |
d G "CP2_OUT_ON_A5" 2 300 "0x00002000" |
d G "CP2_INVERT" 2 301 "0x00001000" |
d G "CP2_ABSOLUTE_VREF" 2 302 "0x10000000" |
d G "CP2_T1_SYNC" 2 305 "0x01000000" |
d G "CP2_T1_GATE" 2 306 "0x02000000" |
d G "VREF_LOW" 2 315 "0xa0" |
d G "VREF_HIGH" 2 316 "0x80" |
d G "OSC_31KHZ" 2 322 "1" |
d G "OSC_125KHZ" 2 323 "0x11" |
d G "OSC_250KHZ" 2 324 "0x21" |
d G "OSC_500KHZ" 2 325 "0x31" |
d G "OSC_1MHZ" 2 326 "0x41" |
d G "OSC_2MHZ" 2 327 "0x51" |
d G "OSC_4MHZ" 2 328 "0x61" |
d G "OSC_8MHZ" 2 329 "0x71" |
d G "OSC_INTRC" 2 330 "1" |
d G "OSC_NORMAL" 2 331 "0" |
d G "OSC_STATE_STABLE" 2 333 "4" |
d G "OSC_31KHZ_STABLE" 2 334 "2" |
d G "ADC_OFF" 2 342 "0" "ADC Off" |
d G "ADC_CLOCK_DIV_2" 2 343 "0x100" |
d G "ADC_CLOCK_DIV_8" 2 344 "0x40" |
d G "ADC_CLOCK_DIV_32" 2 345 "0x80" |
d G "ADC_CLOCK_INTERNAL" 2 346 "0xc0" "Internal 2-6us" |
d G "sAN0" 2 350 "1" "| A0" |
d G "sAN1" 2 351 "2" "| A1" |
d G "sAN2" 2 352 "4" "| A2" |
d G "sAN3" 2 353 "8" "| A3" |
d G "sAN4" 2 354 "16" "| A5" |
d G "sAN5" 2 355 "32" "| E0" |
d G "sAN6" 2 356 "64" "| E1" |
d G "sAN7" 2 357 "128" "| E2" |
d G "sAN8" 2 358 "0x10000" "| B2" |
d G "sAN9" 2 359 "0x20000" "| B3" |
d G "sAN10" 2 360 "0x40000" "| B1" |
d G "sAN11" 2 361 "0x80000" "| B4" |
d G "sAN12" 2 362 "0x100000" "| B0" |
d G "sAN13" 2 363 "0x200000" "| B5" |
d G "NO_ANALOGS" 2 364 "0" "None" |
d G "ALL_ANALOG" 2 365 "0x1F00FF" "A0 A1 A2 A3 A5 E0 E1 E2 B0 B1 B2 B3 B4 B5" |
d G "VSS_VDD" 2 368 "0x0000" "| Range 0-Vdd" |
d G "VSS_VREF" 2 369 "0x1000" "| Range 0-Vref" |
d G "VREF_VREF" 2 370 "0x3000" "| Range Vref-Vref" |
d G "VREF_VDD" 2 371 "0x2000" "| Range Vref-Vdd" |
d G "ADC_START_AND_READ" 2 375 "7" "This is the default if nothing is specified" |
d G "ADC_START_ONLY" 2 376 "1" |
d G "ADC_READ_ONLY" 2 377 "6" |
d G "L_TO_H" 2 389 "0x40" |
d G "H_TO_L" 2 390 "0" |
d G "GLOBAL" 2 392 "0x0BC0" |
d G "INT_RTCC" 2 393 "0x000B20" |
d G "INT_RB" 2 394 "0x01FF0B08" |
d G "INT_EXT_L2H" 2 395 "0x50000B10" |
d G "INT_EXT_H2L" 2 396 "0x60000B10" |
d G "INT_EXT" 2 397 "0x000B10" |
d G "INT_AD" 2 398 "0x008C40" |
d G "INT_TBE" 2 399 "0x008C10" |
d G "INT_RDA" 2 400 "0x008C20" |
d G "INT_TIMER1" 2 401 "0x008C01" |
d G "INT_TIMER2" 2 402 "0x008C02" |
d G "INT_CCP1" 2 403 "0x008C04" |
d G "INT_CCP2" 2 404 "0x008D01" |
d G "INT_SSP" 2 405 "0x008C08" |
d G "INT_BUSCOL" 2 406 "0x008D08" |
d G "INT_EEPROM" 2 407 "0x008D10" |
d G "INT_TIMER0" 2 408 "0x000B20" |
d G "INT_OSC_FAIL" 2 409 "0x008D80" |
d G "INT_COMP" 2 410 "0x008D20" |
d G "INT_COMP2" 2 411 "0x008D40" |
d G "INT_ULPWU" 2 412 "0x008D04" |
d G "INT_RB0" 2 413 "0x0010B08" |
d G "INT_RB1" 2 414 "0x0020B08" |
d G "INT_RB2" 2 415 "0x0040B08" |
d G "INT_RB3" 2 416 "0x0080B08" |
d G "INT_RB4" 2 417 "0x0100B08" |
d G "INT_RB5" 2 418 "0x0200B08" |
d G "INT_RB6" 2 419 "0x0400B08" |
d G "INT_RB7" 2 420 "0x0800B08" |
D G "EEPROM_SDA" 0 2 "PIN_B0" |
D G "EEPROM_SCL" 0 3 "PIN_B1" |
F G "main" 0 8 "void()" |
C L "main" 0 18 1 "FUNCTION" |
V L "STAV1" 0 21 "int8" |
V L "STAV2" 0 21 "int8" |
V L "SOUCET" 0 23 "int16" |
V L "SOUCET1" 0 23 "int16" |
V L "LSB" 0 24 "int8" |
V L "ZK" 0 24 "int8" |
V L "k" 0 24 "int8" |
C L "main" 0 18 1 "FUNCTION" |
C L "main" 0 18 1 "FUNCTION" |
C L "main" 0 18 1 "FUNCTION" |
C L "main" 0 18 1 "FUNCTION" |
C L "main" 0 18 1 "FUNCTION" |
C L "main" 0 18 1 "FUNCTION" |
V L "i" 0 99 "int8" |
C L "main" 0 18 21 "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/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/LED_BAT/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/LED_BAT/main.hex |
---|
0,0 → 1,118 |
:1000000001308A0077290000D3346D38EC32202A81 |
:10001000E832F236EF36653AE8327210A0060A008E |
:10002000CC224410253658100D050000D63C7336FE |
:100030006532EE3220265321A0126C2CA0060A0055 |
:1000400083168611831286110830F80027280000D5 |
:10005000F8173828F813AF0C03188615031C8611FF |
:10006000781738287813F80B2B28362800008615C7 |
:100070003F308400840B3A280000F81B2A28781BA4 |
:1000800032280800831603178C170C140000000098 |
:1000900083120C087F39031986280313AB0003175A |
:1000A0000D080313AC0003170F080313AD002B0852 |
:1000B000AF0020202C0803178D0003132D08031711 |
:1000C0008F0083168C170C140000000083120C0D97 |
:1000D0000E0D7F39031986280313AB0003170D0893 |
:1000E0000313AC0003170F080313AD002B08AF0078 |
:1000F00020202C0803178D0003132D0803178F00F1 |
:100100008D0A03198F0A03134228031703138A1158 |
:100110000A12DF290830F8000000861083168610C6 |
:1001200000008312AB0D0610031C992883160614D9 |
:10013000831203189E2883160610831283168614D2 |
:100140008312861CA128F80B8C28000086108316C9 |
:100150008610000006140000000086148312861C1E |
:10016000AF28F80100000618781486108316861050 |
:100170008312061083160610831208002B308400A9 |
:10018000831300080319D1280230F800F701F70B98 |
:10019000C728F80BC6289730F700F70BCD28800B3F |
:1001A000C42808000830AC007708AD008316061498 |
:1001B000000086148312861CDB2806180314061C14 |
:1001C0000310F80D00008316861083128610AC0B06 |
:1001D000D628831606140000831206102D08031972 |
:1001E000F4288316061083120000831686148312E7 |
:1001F000861CF828000086108316861000008312E3 |
:1002000006108316061083128A110A12C12A831659 |
:1002100003178C170C1400000000031836298312F2 |
:100220000C087F390313AC0003170D080313AD004E |
:1002300003170F080313AE002C08AF0020202D0871 |
:1002400003178D0003132E0803178F0083168C17D6 |
:100250000C140000000083120313AB0B3029332968 |
:1002600083160317362955298316031783120C0D9D |
:100270000E0D7F390313AC0003170D080313AD00F7 |
:1002800003170F080313AE002C08AF0020202D0821 |
:1002900003178D0003132E0803178F008D0A03190F |
:1002A0008F0A03100313AB0B07290800AC1B682946 |
:1002B0000F30F7002B0EF7050A3077020318632979 |
:1002C0003030F70765292C08F7077708AF002020A2 |
:1002D0000F30AB050A302B02031870293030722919 |
:1002E000AC132C08AB072B08AF00202008008401BA |
:1002F00083131F308305713083168F000F0886111A |
:1003000083128615831603170908C0398900031361 |
:100310001F129F1200300317880083128701880183 |
:100320008901FF300313A000831603170908C039A1 |
:10033000890003131F129F120030031788008312D5 |
:1003400003131F139F1383169F1383121F149412FA |
:10035000A012200883168700831220162008831617 |
:1003600087008312A01120088316870001308312B2 |
:1003700094000030831694000108C73908388100C2 |
:10038000831290010030F800920000308316920032 |
:100390008312201520088316870083129701831685 |
:1003A0009B019C0101309D00831203178701880186 |
:1003B000890104308D0000308F0003134228A7010B |
:1003C000A90183160614000086140000831206108B |
:1003D0008316061000008312861083168610AA303A |
:1003E0008312AB008A206130AB008A20831606148A |
:1003F0000000861400008312861CFC290610831658 |
:10040000061000008312861083168610AA3083120D |
:10041000AB008A20AB018A208316061000008614E8 |
:100420008312861C112A0000152A00008316061468 |
:10043000000001308312AB00BE20831606140000BA |
:100440008614000083120610831606100000831223 |
:10045000861083168610AA308312AB008A203E30A5 |
:10046000AB008A2083160614000086140000831255 |
:10047000861C382A06108316061000008312861088 |
:1004800083168610AA308312AB008A204030AB005E |
:100490008A2083160610000086148312861C4E2ABA |
:1004A0000000522A00008316061400000130831257 |
:1004B000AB00BE20831606140000861400008312D1 |
:1004C000061083160610000083128610831686100D |
:1004D000AA308312AB008A203F30AB008A208316FB |
:1004E00006140000861400008312861C752A06106C |
:1004F0008316061000008312861083168610AA3019 |
:100500008312AB008A20AB018A20831606100000FC |
:1005100086148312861C8A2A00008E2A0000831605 |
:100520000614000001308312AB00BE2083160614AF |
:1005300000008614000083120610831606100000C7 |
:100540008312861083168610AA308312AB008A208D |
:100550004430AB008A208316061400008614000085 |
:100560008312861CB12A061083160610000083121F |
:10057000861083168610AB308312AB008A20F701F9 |
:10058000D2287808A800831606100000861483126B |
:10059000861CC82A0000CC2A00008316061400001E |
:1005A00001308312AB00BE20103003178D000030E5 |
:1005B0008F00031004300313AB0007212808AB00A1 |
:1005C0003730AC0056212030AF0020200D30AF0076 |
:1005D00020200A30AF0020202808533C031D0C2B9C |
:1005E0000130A702163003178D0000308F00031072 |
:1005F0000D300313AB0007212708AB003730AC00E8 |
:1006000056212030AF0020200D30AF0020200A30CE |
:10061000AF0020200A2B862B8316061400008614B8 |
:100620000000831206108316061000008312861045 |
:1006300083168610AA308312AB008A204430AB00A8 |
:100640008A20831606140000861400008312861C7C |
:10065000272B0610831606100000831286108316BF |
:100660008610AA308312AB008A205330AB008A2058 |
:1006700083160610000086148312861C3D2B000092 |
:10068000412B000083160614000040308312AA009C |
:10069000A401A301A601A501831606140000861477 |
:1006A00000008312061083160610000083128610C5 |
:1006B00083168610AA308312AB008A206030AB000C |
:1006C0008A20831606140000861400008312861CFC |
:1006D000672B0610831606100000831286108316FF |
:1006E0008610AA308312AB008A202708AB008A202C |
:1006F00083160610000086148312861C7D2B0000D2 |
:10070000812B000083160614000083120130A70716 |
:0A0710006430AB00BE20E129630055 |
:04400E00F52CFF3F4F |
:00000001FF |
;PIC16F887 |
;CRC=98C1 CREATED="06-4-13 21:54" |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/LED_BAT/main.lst |
---|
0,0 → 1,891 |
CCS PCM C Compiler, Version 4.106, 47914 06-4-13 21:54 |
Filename: c:\users\honza\documents\pic\i2c_bat_pam\main.lst |
ROM used: 909 words (11%) |
Largest free fragment is 2048 |
RAM used: 6 (2%) at main() level |
21 (6%) worst case |
Stack: 2 locations |
* |
0000: MOVLW 01 |
0001: MOVWF 0A |
0002: GOTO 177 |
0003: NOP |
.................... #include "C:\Users\Honza\Documents\pic\I2C_bat_pam\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) |
* |
00BE: MOVLW 2B |
00BF: MOVWF 04 |
00C0: BCF 03.7 |
00C1: MOVF 00,W |
00C2: BTFSC 03.2 |
00C3: GOTO 0D1 |
00C4: MOVLW 02 |
00C5: MOVWF 78 |
00C6: CLRF 77 |
00C7: DECFSZ 77,F |
00C8: GOTO 0C7 |
00C9: DECFSZ 78,F |
00CA: GOTO 0C6 |
00CB: MOVLW 97 |
00CC: MOVWF 77 |
00CD: DECFSZ 77,F |
00CE: GOTO 0CD |
00CF: DECFSZ 00,F |
00D0: GOTO 0C4 |
00D1: RETURN |
.................... |
.................... |
.................... #define EEPROM_SDA PIN_B0 |
.................... #define EEPROM_SCL PIN_B1 |
.................... #use i2c(master, sda=EEPROM_SDA, scl=EEPROM_SCL) |
* |
008A: MOVLW 08 |
008B: MOVWF 78 |
008C: NOP |
008D: BCF 06.1 |
008E: BSF 03.5 |
008F: BCF 06.1 |
0090: NOP |
0091: BCF 03.5 |
0092: RLF 2B,F |
0093: BCF 06.0 |
0094: BTFSS 03.0 |
0095: GOTO 099 |
0096: BSF 03.5 |
0097: BSF 06.0 |
0098: BCF 03.5 |
0099: BTFSC 03.0 |
009A: GOTO 09E |
009B: BSF 03.5 |
009C: BCF 06.0 |
009D: BCF 03.5 |
009E: BSF 03.5 |
009F: BSF 06.1 |
00A0: BCF 03.5 |
00A1: BTFSS 06.1 |
00A2: GOTO 0A1 |
00A3: DECFSZ 78,F |
00A4: GOTO 08C |
00A5: NOP |
00A6: BCF 06.1 |
00A7: BSF 03.5 |
00A8: BCF 06.1 |
00A9: NOP |
00AA: BSF 06.0 |
00AB: NOP |
00AC: NOP |
00AD: BSF 06.1 |
00AE: BCF 03.5 |
00AF: BTFSS 06.1 |
00B0: GOTO 0AF |
00B1: CLRF 78 |
00B2: NOP |
00B3: BTFSC 06.0 |
00B4: BSF 78.0 |
00B5: BCF 06.1 |
00B6: BSF 03.5 |
00B7: BCF 06.1 |
00B8: BCF 03.5 |
00B9: BCF 06.0 |
00BA: BSF 03.5 |
00BB: BCF 06.0 |
00BC: BCF 03.5 |
00BD: RETURN |
* |
00D2: MOVLW 08 |
00D3: MOVWF 2C |
00D4: MOVF 77,W |
00D5: MOVWF 2D |
00D6: BSF 03.5 |
00D7: BSF 06.0 |
00D8: NOP |
00D9: BSF 06.1 |
00DA: BCF 03.5 |
00DB: BTFSS 06.1 |
00DC: GOTO 0DB |
00DD: BTFSC 06.0 |
00DE: BSF 03.0 |
00DF: BTFSS 06.0 |
00E0: BCF 03.0 |
00E1: RLF 78,F |
00E2: NOP |
00E3: BSF 03.5 |
00E4: BCF 06.1 |
00E5: BCF 03.5 |
00E6: BCF 06.1 |
00E7: DECFSZ 2C,F |
00E8: GOTO 0D6 |
00E9: BSF 03.5 |
00EA: BSF 06.0 |
00EB: NOP |
00EC: BCF 03.5 |
00ED: BCF 06.0 |
00EE: MOVF 2D,W |
00EF: BTFSC 03.2 |
00F0: GOTO 0F4 |
00F1: BSF 03.5 |
00F2: BCF 06.0 |
00F3: BCF 03.5 |
00F4: NOP |
00F5: BSF 03.5 |
00F6: BSF 06.1 |
00F7: BCF 03.5 |
00F8: BTFSS 06.1 |
00F9: GOTO 0F8 |
00FA: NOP |
00FB: BCF 06.1 |
00FC: BSF 03.5 |
00FD: BCF 06.1 |
00FE: NOP |
00FF: BCF 03.5 |
0100: BCF 06.0 |
0101: BSF 03.5 |
0102: BCF 06.0 |
0103: BCF 03.5 |
0104: BCF 0A.3 |
0105: BCF 0A.4 |
0106: GOTO 2C1 (RETURN) |
.................... #use rs232(baud=9600,parity=N,xmit=PIN_B3,rcv=PIN_B2,bits=8) //rcv TXD xmit RXD |
* |
0020: BSF 03.5 |
0021: BCF 06.3 |
0022: BCF 03.5 |
0023: BCF 06.3 |
0024: MOVLW 08 |
0025: MOVWF 78 |
0026: GOTO 027 |
0027: NOP |
0028: BSF 78.7 |
0029: GOTO 038 |
002A: BCF 78.7 |
002B: RRF 2F,F |
002C: BTFSC 03.0 |
002D: BSF 06.3 |
002E: BTFSS 03.0 |
002F: BCF 06.3 |
0030: BSF 78.6 |
0031: GOTO 038 |
0032: BCF 78.6 |
0033: DECFSZ 78,F |
0034: GOTO 02B |
0035: GOTO 036 |
0036: NOP |
0037: BSF 06.3 |
0038: MOVLW 3F |
0039: MOVWF 04 |
003A: DECFSZ 04,F |
003B: GOTO 03A |
003C: NOP |
003D: BTFSC 78.7 |
003E: GOTO 02A |
003F: BTFSC 78.6 |
0040: GOTO 032 |
0041: RETURN |
.................... |
.................... |
.................... void main() |
.................... { |
* |
0177: CLRF 04 |
0178: BCF 03.7 |
0179: MOVLW 1F |
017A: ANDWF 03,F |
017B: MOVLW 71 |
017C: BSF 03.5 |
017D: MOVWF 0F |
017E: MOVF 0F,W |
017F: BCF 06.3 |
0180: BCF 03.5 |
0181: BSF 06.3 |
0182: BSF 03.5 |
0183: BSF 03.6 |
0184: MOVF 09,W |
0185: ANDLW C0 |
0186: MOVWF 09 |
0187: BCF 03.6 |
0188: BCF 1F.4 |
0189: BCF 1F.5 |
018A: MOVLW 00 |
018B: BSF 03.6 |
018C: MOVWF 08 |
018D: BCF 03.5 |
018E: CLRF 07 |
018F: CLRF 08 |
0190: CLRF 09 |
.................... |
.................... setup_adc_ports(NO_ANALOGS|VSS_VDD); |
* |
0194: BSF 03.5 |
0195: BSF 03.6 |
0196: MOVF 09,W |
0197: ANDLW C0 |
0198: MOVWF 09 |
0199: BCF 03.6 |
019A: BCF 1F.4 |
019B: BCF 1F.5 |
019C: MOVLW 00 |
019D: BSF 03.6 |
019E: MOVWF 08 |
.................... setup_adc(ADC_CLOCK_DIV_2); |
019F: BCF 03.5 |
01A0: BCF 03.6 |
01A1: BCF 1F.6 |
01A2: BCF 1F.7 |
01A3: BSF 03.5 |
01A4: BCF 1F.7 |
01A5: BCF 03.5 |
01A6: BSF 1F.0 |
.................... setup_spi(SPI_SS_DISABLED); |
01A7: BCF 14.5 |
01A8: BCF 20.5 |
01A9: MOVF 20,W |
01AA: BSF 03.5 |
01AB: MOVWF 07 |
01AC: BCF 03.5 |
01AD: BSF 20.4 |
01AE: MOVF 20,W |
01AF: BSF 03.5 |
01B0: MOVWF 07 |
01B1: BCF 03.5 |
01B2: BCF 20.3 |
01B3: MOVF 20,W |
01B4: BSF 03.5 |
01B5: MOVWF 07 |
01B6: MOVLW 01 |
01B7: BCF 03.5 |
01B8: MOVWF 14 |
01B9: MOVLW 00 |
01BA: BSF 03.5 |
01BB: MOVWF 14 |
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); |
01BC: MOVF 01,W |
01BD: ANDLW C7 |
01BE: IORLW 08 |
01BF: MOVWF 01 |
.................... setup_timer_1(T1_DISABLED); |
01C0: BCF 03.5 |
01C1: CLRF 10 |
.................... setup_timer_2(T2_DISABLED,0,1); |
01C2: MOVLW 00 |
01C3: MOVWF 78 |
01C4: MOVWF 12 |
01C5: MOVLW 00 |
01C6: BSF 03.5 |
01C7: MOVWF 12 |
.................... setup_ccp1(CCP_OFF); |
01C8: BCF 03.5 |
01C9: BSF 20.2 |
01CA: MOVF 20,W |
01CB: BSF 03.5 |
01CC: MOVWF 07 |
01CD: BCF 03.5 |
01CE: CLRF 17 |
01CF: BSF 03.5 |
01D0: CLRF 1B |
01D1: CLRF 1C |
01D2: MOVLW 01 |
01D3: MOVWF 1D |
.................... setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard |
01D4: BCF 03.5 |
01D5: BSF 03.6 |
01D6: CLRF 07 |
01D7: CLRF 08 |
01D8: CLRF 09 |
.................... |
.................... printf("Simple Thermomether \r\n",); |
01D9: MOVLW 04 |
01DA: MOVWF 0D |
01DB: MOVLW 00 |
01DC: MOVWF 0F |
01DD: BCF 03.6 |
01DE: GOTO 042 |
.................... unsigned int8 STAV1,STAV2; |
.................... |
.................... unsigned int16 SOUCET, SOUCET1; |
.................... unsigned int8 LSB=0,ZK,k=0; |
01DF: CLRF 27 |
01E0: CLRF 29 |
.................... //unsigned int8 |
.................... |
.................... while(TRUE) |
.................... { |
.................... |
.................... |
.................... |
.................... |
.................... i2c_start(); //blockdatacontrol |
01E1: BSF 03.5 |
01E2: BSF 06.0 |
01E3: NOP |
01E4: BSF 06.1 |
01E5: NOP |
01E6: BCF 03.5 |
01E7: BCF 06.0 |
01E8: BSF 03.5 |
01E9: BCF 06.0 |
01EA: NOP |
01EB: BCF 03.5 |
01EC: BCF 06.1 |
01ED: BSF 03.5 |
01EE: BCF 06.1 |
.................... I2C_Write(0xAA); |
01EF: MOVLW AA |
01F0: BCF 03.5 |
01F1: MOVWF 2B |
01F2: CALL 08A |
.................... I2C_write(0x61); |
01F3: MOVLW 61 |
01F4: MOVWF 2B |
01F5: CALL 08A |
.................... i2c_start(); |
01F6: BSF 03.5 |
01F7: BSF 06.0 |
01F8: NOP |
01F9: BSF 06.1 |
01FA: NOP |
01FB: BCF 03.5 |
01FC: BTFSS 06.1 |
01FD: GOTO 1FC |
01FE: BCF 06.0 |
01FF: BSF 03.5 |
0200: BCF 06.0 |
0201: NOP |
0202: BCF 03.5 |
0203: BCF 06.1 |
0204: BSF 03.5 |
0205: BCF 06.1 |
.................... I2C_Write(0xAA); |
0206: MOVLW AA |
0207: BCF 03.5 |
0208: MOVWF 2B |
0209: CALL 08A |
.................... i2c_write(0x00); |
020A: CLRF 2B |
020B: CALL 08A |
.................... i2c_stop(); |
020C: BSF 03.5 |
020D: BCF 06.0 |
020E: NOP |
020F: BSF 06.1 |
0210: BCF 03.5 |
0211: BTFSS 06.1 |
0212: GOTO 211 |
0213: NOP |
0214: GOTO 215 |
0215: NOP |
0216: BSF 03.5 |
0217: BSF 06.0 |
0218: NOP |
.................... delay_ms (1); |
0219: MOVLW 01 |
021A: BCF 03.5 |
021B: MOVWF 2B |
021C: CALL 0BE |
.................... |
.................... |
.................... i2c_start();//dataflashclass |
021D: BSF 03.5 |
021E: BSF 06.0 |
021F: NOP |
0220: BSF 06.1 |
0221: NOP |
0222: BCF 03.5 |
0223: BCF 06.0 |
0224: BSF 03.5 |
0225: BCF 06.0 |
0226: NOP |
0227: BCF 03.5 |
0228: BCF 06.1 |
0229: BSF 03.5 |
022A: BCF 06.1 |
.................... I2C_Write(0xAA); |
022B: MOVLW AA |
022C: BCF 03.5 |
022D: MOVWF 2B |
022E: CALL 08A |
.................... I2C_write(0x3e); |
022F: MOVLW 3E |
0230: MOVWF 2B |
0231: CALL 08A |
.................... |
.................... i2c_start(); |
0232: BSF 03.5 |
0233: BSF 06.0 |
0234: NOP |
0235: BSF 06.1 |
0236: NOP |
0237: BCF 03.5 |
0238: BTFSS 06.1 |
0239: GOTO 238 |
023A: BCF 06.0 |
023B: BSF 03.5 |
023C: BCF 06.0 |
023D: NOP |
023E: BCF 03.5 |
023F: BCF 06.1 |
0240: BSF 03.5 |
0241: BCF 06.1 |
.................... I2C_Write(0xAA); |
0242: MOVLW AA |
0243: BCF 03.5 |
0244: MOVWF 2B |
0245: CALL 08A |
.................... i2c_write(0x40); |
0246: MOVLW 40 |
0247: MOVWF 2B |
0248: CALL 08A |
.................... i2c_stop(); |
0249: BSF 03.5 |
024A: BCF 06.0 |
024B: NOP |
024C: BSF 06.1 |
024D: BCF 03.5 |
024E: BTFSS 06.1 |
024F: GOTO 24E |
0250: NOP |
0251: GOTO 252 |
0252: NOP |
0253: BSF 03.5 |
0254: BSF 06.0 |
0255: NOP |
.................... delay_ms (1); |
0256: MOVLW 01 |
0257: BCF 03.5 |
0258: MOVWF 2B |
0259: CALL 0BE |
.................... |
.................... |
.................... i2c_start();//dataflashblock |
025A: BSF 03.5 |
025B: BSF 06.0 |
025C: NOP |
025D: BSF 06.1 |
025E: NOP |
025F: BCF 03.5 |
0260: BCF 06.0 |
0261: BSF 03.5 |
0262: BCF 06.0 |
0263: NOP |
0264: BCF 03.5 |
0265: BCF 06.1 |
0266: BSF 03.5 |
0267: BCF 06.1 |
.................... I2C_Write(0xAA); |
0268: MOVLW AA |
0269: BCF 03.5 |
026A: MOVWF 2B |
026B: CALL 08A |
.................... I2C_write(0x3f); |
026C: MOVLW 3F |
026D: MOVWF 2B |
026E: CALL 08A |
.................... |
.................... i2c_start(); |
026F: BSF 03.5 |
0270: BSF 06.0 |
0271: NOP |
0272: BSF 06.1 |
0273: NOP |
0274: BCF 03.5 |
0275: BTFSS 06.1 |
0276: GOTO 275 |
0277: BCF 06.0 |
0278: BSF 03.5 |
0279: BCF 06.0 |
027A: NOP |
027B: BCF 03.5 |
027C: BCF 06.1 |
027D: BSF 03.5 |
027E: BCF 06.1 |
.................... I2C_Write(0xAA); |
027F: MOVLW AA |
0280: BCF 03.5 |
0281: MOVWF 2B |
0282: CALL 08A |
.................... I2C_write(0x00); |
0283: CLRF 2B |
0284: CALL 08A |
.................... i2c_stop(); |
0285: BSF 03.5 |
0286: BCF 06.0 |
0287: NOP |
0288: BSF 06.1 |
0289: BCF 03.5 |
028A: BTFSS 06.1 |
028B: GOTO 28A |
028C: NOP |
028D: GOTO 28E |
028E: NOP |
028F: BSF 03.5 |
0290: BSF 06.0 |
0291: NOP |
.................... |
.................... delay_ms (1); |
0292: MOVLW 01 |
0293: BCF 03.5 |
0294: MOVWF 2B |
0295: CALL 0BE |
.................... |
.................... i2c_start();//blockdata |
0296: BSF 03.5 |
0297: BSF 06.0 |
0298: NOP |
0299: BSF 06.1 |
029A: NOP |
029B: BCF 03.5 |
029C: BCF 06.0 |
029D: BSF 03.5 |
029E: BCF 06.0 |
029F: NOP |
02A0: BCF 03.5 |
02A1: BCF 06.1 |
02A2: BSF 03.5 |
02A3: BCF 06.1 |
.................... I2C_Write(0xAA); |
02A4: MOVLW AA |
02A5: BCF 03.5 |
02A6: MOVWF 2B |
02A7: CALL 08A |
.................... I2C_write(0x44); |
02A8: MOVLW 44 |
02A9: MOVWF 2B |
02AA: CALL 08A |
.................... |
.................... i2c_start(); |
02AB: BSF 03.5 |
02AC: BSF 06.0 |
02AD: NOP |
02AE: BSF 06.1 |
02AF: NOP |
02B0: BCF 03.5 |
02B1: BTFSS 06.1 |
02B2: GOTO 2B1 |
02B3: BCF 06.0 |
02B4: BSF 03.5 |
02B5: BCF 06.0 |
02B6: NOP |
02B7: BCF 03.5 |
02B8: BCF 06.1 |
02B9: BSF 03.5 |
02BA: BCF 06.1 |
.................... I2C_Write(0xAB); |
02BB: MOVLW AB |
02BC: BCF 03.5 |
02BD: MOVWF 2B |
02BE: CALL 08A |
.................... ZK=I2C_read(0); |
02BF: CLRF 77 |
02C0: GOTO 0D2 |
02C1: MOVF 78,W |
02C2: MOVWF 28 |
.................... i2c_stop(); |
02C3: BSF 03.5 |
02C4: BCF 06.0 |
02C5: NOP |
02C6: BSF 06.1 |
02C7: BCF 03.5 |
02C8: BTFSS 06.1 |
02C9: GOTO 2C8 |
02CA: NOP |
02CB: GOTO 2CC |
02CC: NOP |
02CD: BSF 03.5 |
02CE: BSF 06.0 |
02CF: NOP |
.................... |
.................... delay_ms (1); |
02D0: MOVLW 01 |
02D1: BCF 03.5 |
02D2: MOVWF 2B |
02D3: CALL 0BE |
.................... |
.................... printf("LED %lX \r\n", ZK); |
02D4: MOVLW 10 |
02D5: BSF 03.6 |
02D6: MOVWF 0D |
02D7: MOVLW 00 |
02D8: MOVWF 0F |
02D9: BCF 03.0 |
02DA: MOVLW 04 |
02DB: BCF 03.6 |
02DC: MOVWF 2B |
02DD: CALL 107 |
02DE: MOVF 28,W |
02DF: MOVWF 2B |
02E0: MOVLW 37 |
02E1: MOVWF 2C |
02E2: CALL 156 |
02E3: MOVLW 20 |
02E4: MOVWF 2F |
02E5: CALL 020 |
02E6: MOVLW 0D |
02E7: MOVWF 2F |
02E8: CALL 020 |
02E9: MOVLW 0A |
02EA: MOVWF 2F |
02EB: CALL 020 |
.................... |
.................... if(ZK==0x53) |
02EC: MOVF 28,W |
02ED: SUBLW 53 |
02EE: BTFSS 03.2 |
02EF: GOTO 30C |
.................... { |
.................... LSB=LSB-1; |
02F0: MOVLW 01 |
02F1: SUBWF 27,F |
.................... printf("Vysledne LSB %lX \r\n", LSB); |
02F2: MOVLW 16 |
02F3: BSF 03.6 |
02F4: MOVWF 0D |
02F5: MOVLW 00 |
02F6: MOVWF 0F |
02F7: BCF 03.0 |
02F8: MOVLW 0D |
02F9: BCF 03.6 |
02FA: MOVWF 2B |
02FB: CALL 107 |
02FC: MOVF 27,W |
02FD: MOVWF 2B |
02FE: MOVLW 37 |
02FF: MOVWF 2C |
0300: CALL 156 |
0301: MOVLW 20 |
0302: MOVWF 2F |
0303: CALL 020 |
0304: MOVLW 0D |
0305: MOVWF 2F |
0306: CALL 020 |
0307: MOVLW 0A |
0308: MOVWF 2F |
0309: CALL 020 |
.................... while(TRUE) |
.................... { |
.................... } |
030A: GOTO 30A |
.................... } |
.................... |
.................... else |
030B: GOTO 386 |
.................... { |
.................... i2c_start();//blockdata |
030C: BSF 03.5 |
030D: BSF 06.0 |
030E: NOP |
030F: BSF 06.1 |
0310: NOP |
0311: BCF 03.5 |
0312: BCF 06.0 |
0313: BSF 03.5 |
0314: BCF 06.0 |
0315: NOP |
0316: BCF 03.5 |
0317: BCF 06.1 |
0318: BSF 03.5 |
0319: BCF 06.1 |
.................... I2C_Write(0xAA); |
031A: MOVLW AA |
031B: BCF 03.5 |
031C: MOVWF 2B |
031D: CALL 08A |
.................... I2C_write(0x44); |
031E: MOVLW 44 |
031F: MOVWF 2B |
0320: CALL 08A |
.................... |
.................... i2c_start(); |
0321: BSF 03.5 |
0322: BSF 06.0 |
0323: NOP |
0324: BSF 06.1 |
0325: NOP |
0326: BCF 03.5 |
0327: BTFSS 06.1 |
0328: GOTO 327 |
0329: BCF 06.0 |
032A: BSF 03.5 |
032B: BCF 06.0 |
032C: NOP |
032D: BCF 03.5 |
032E: BCF 06.1 |
032F: BSF 03.5 |
0330: BCF 06.1 |
.................... I2C_Write(0xAA); |
0331: MOVLW AA |
0332: BCF 03.5 |
0333: MOVWF 2B |
0334: CALL 08A |
.................... I2C_write(0x53); |
0335: MOVLW 53 |
0336: MOVWF 2B |
0337: CALL 08A |
.................... i2c_stop(); |
0338: BSF 03.5 |
0339: BCF 06.0 |
033A: NOP |
033B: BSF 06.1 |
033C: BCF 03.5 |
033D: BTFSS 06.1 |
033E: GOTO 33D |
033F: NOP |
0340: GOTO 341 |
0341: NOP |
0342: BSF 03.5 |
0343: BSF 06.0 |
0344: NOP |
.................... |
.................... |
.................... int i=64; |
0345: MOVLW 40 |
0346: BCF 03.5 |
0347: MOVWF 2A |
.................... SOUCET=0; |
0348: CLRF 24 |
0349: CLRF 23 |
.................... SOUCET1=0; |
034A: CLRF 26 |
034B: CLRF 25 |
.................... |
.................... /* |
.................... for (i=64;i<96;++i) |
.................... { |
.................... printf("%u\r\n",i); |
.................... i2c_stop(); |
.................... |
.................... i2c_start();//blockdata |
.................... I2C_Write(0xAA); |
.................... I2C_write(i); |
.................... |
.................... i2c_start(); |
.................... I2C_Write(0xAB); |
.................... STAV1=I2C_read(0); |
.................... i2c_stop(); |
.................... |
.................... printf("STAV %lX \r\n", STAV1); |
.................... SOUCET=SOUCET+STAV1; |
.................... |
.................... |
.................... |
.................... |
.................... |
.................... } |
.................... printf("SOUCET: %lX (procenta)\r\n", SOUCET); |
.................... SOUCET1=SOUCET; |
.................... SOUCET1=SOUCET1>>8; |
.................... printf("Deleno 256: %lX (procenta)\r\n", SOUCET1); |
.................... SOUCET1=SOUCET-SOUCET1; |
.................... printf("Soucet - soucet/256: %lX \r\n", SOUCET1); |
.................... LSB=(unsigned int8)SOUCET1; |
.................... printf("LSB: %lX\r\n", LSB); |
.................... //printf("Stav: %X (procenta)\r\n", STAV2); |
.................... */ |
.................... |
.................... i2c_start();//blockdata |
034C: BSF 03.5 |
034D: BSF 06.0 |
034E: NOP |
034F: BSF 06.1 |
0350: NOP |
0351: BCF 03.5 |
0352: BCF 06.0 |
0353: BSF 03.5 |
0354: BCF 06.0 |
0355: NOP |
0356: BCF 03.5 |
0357: BCF 06.1 |
0358: BSF 03.5 |
0359: BCF 06.1 |
.................... I2C_Write(0xAA); |
035A: MOVLW AA |
035B: BCF 03.5 |
035C: MOVWF 2B |
035D: CALL 08A |
.................... I2C_write(0x60); |
035E: MOVLW 60 |
035F: MOVWF 2B |
0360: CALL 08A |
.................... |
.................... i2c_start(); |
0361: BSF 03.5 |
0362: BSF 06.0 |
0363: NOP |
0364: BSF 06.1 |
0365: NOP |
0366: BCF 03.5 |
0367: BTFSS 06.1 |
0368: GOTO 367 |
0369: BCF 06.0 |
036A: BSF 03.5 |
036B: BCF 06.0 |
036C: NOP |
036D: BCF 03.5 |
036E: BCF 06.1 |
036F: BSF 03.5 |
0370: BCF 06.1 |
.................... I2C_Write(0xAA); |
0371: MOVLW AA |
0372: BCF 03.5 |
0373: MOVWF 2B |
0374: CALL 08A |
.................... I2C_write(LSB); |
0375: MOVF 27,W |
0376: MOVWF 2B |
0377: CALL 08A |
.................... i2c_stop(); |
0378: BSF 03.5 |
0379: BCF 06.0 |
037A: NOP |
037B: BSF 06.1 |
037C: BCF 03.5 |
037D: BTFSS 06.1 |
037E: GOTO 37D |
037F: NOP |
0380: GOTO 381 |
0381: NOP |
0382: BSF 03.5 |
0383: BSF 06.0 |
0384: NOP |
0385: BCF 03.5 |
.................... |
.................... } |
.................... |
.................... LSB=LSB+1; |
0386: MOVLW 01 |
0387: ADDWF 27,F |
.................... |
.................... delay_ms (100); |
0388: MOVLW 64 |
0389: MOVWF 2B |
038A: CALL 0BE |
.................... } |
038B: GOTO 1E1 |
.................... } |
038C: 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/LED_BAT/main.pjt |
---|
0,0 → 1,24 |
[PROJECT] |
Target=C:\Users\Honza\Documents\pic\I2C_bat_pam\main.hex |
Development_Mode= |
Processor_Text=PIC16F887 |
ToolSuite=CCS |
Processor=0x887F |
[C:\Users\Honza\Documents\pic\I2C_bat_pam\main] |
Type=4 |
Path= |
FileList= |
BuildTool= |
OptionString= |
AdditionalOptionString= |
[mru-list] |
1=C:\Users\Honza\Documents\pic\I2C_bat_pam\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\main |
[Opened Files] |
1=main.c |
2= |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/LED_BAT/main.sta |
---|
0,0 → 1,56 |
ROM used: 909 (11%) |
909 (11%) including unused fragments |
2 Average locations per line |
13 Average locations per statement |
RAM used: 6 (2%) at main() level |
21 (6%) worst case |
Stack used: 2 worst case (out of 8 total available) |
Lines Stmts % Files |
----- ----- --- ----- |
153 71 100 main.c |
20 0 0 main.h |
423 0 0 ..\..\..\..\..\Program Files (x86)\PICC\devices\16F887.h |
----- ----- |
596 71 Total |
Page ROM % RAM Vol Diff Functions: |
---- --- --- --- --- ---- ---------- |
0 20 2 1 @delay_ms1 |
0 53 6 3 @I2C_READ_1 |
0 52 6 1 @I2C_WRITE_1 |
0 34 4 1 @PUTCHAR_1_ |
0 534 59 0 2134 6.0 main |
0 12 1 0 @const78 |
0 72 8 3 @PSTRINGC7_68 |
0 6 1 0 @const87 |
0 79 9 4 @PSTRINGCN7_68 |
0 33 4 2 @PRINTF_X_68 |
0 10 1 0 @const93 |
Program metrics: |
Functions 1 |
Statements 71 |
Comments 124 |
Volume (V) 2162 |
Difficilty (D) 5.6 |
Effort to implement (E) 12172 |
Time to implement (T) 11 minutes |
Est Delivered Bugs (B) 0 |
Cyclomatic Complexity 1 |
Maintainability (MI) 12 |
Segment Used Free |
----------- ---- ---- |
00000-00003 4 0 |
00004-007FF 905 1139 |
00800-00FFF 0 2048 |
01000-017FF 0 2048 |
01800-01FFF 0 2048 |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/setting/LED_BAT/main.sym |
---|
0,0 → 1,90 |
004 @WRITE_PROGRAM_MEMORY8.P1 |
004-005 @READ_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 i |
02B @I2C_WRITE_1.P1 |
02B @PSTRINGCN7_68.P2 |
02B @I2C_READ_1.P3 |
02B @PRINTF_X_68.P4 |
02B @delay_ms1.P5 |
02B @PSTRINGC7_68.@SCRATCH1 |
02C @PRINTF_X_68.P1 |
02C @I2C_READ_1.@SCRATCH1 |
02C @PSTRINGC7_68.@SCRATCH2 |
02C @PSTRINGCN7_68.@SCRATCH1 |
02D @I2C_READ_1.@SCRATCH2 |
02D @PSTRINGC7_68.@SCRATCH3 |
02D @PSTRINGCN7_68.@SCRATCH2 |
02E @PSTRINGCN7_68.@SCRATCH3 |
02F @PUTCHAR_1_.P1 |
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: |
00BE @delay_ms1 |
00D2 @I2C_READ_1 |
008A @I2C_WRITE_1 |
0020 @PUTCHAR_1_ |
0177 main |
0004 @const78 |
0042 @PSTRINGC7_68 |
0010 @const87 |
0107 @PSTRINGCN7_68 |
0156 @PRINTF_X_68 |
0016 @const93 |
0177 @cinit |
User Memory space: |
User Memory space: |
Project Directory: |
c:\users\honza\documents\pic\i2c_bat_pam\ |
Project Files: |
main.c |
main.h |
..\..\..\..\..\Program Files (x86)\PICC\devices\16F887.h |
Units: |
c:\users\honza\documents\pic\i2c_bat_pam\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/LED_BAT/main.tre |
---|
0,0 → 1,53 |
ÀÄmain |
ÀÄmain 0/534 Ram=0 |
ÃÄ??0?? |
ÃÄ@PSTRINGC7_68 0/72 Ram=3 |
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÃÄ@delay_ms1 0/20 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÃÄ@delay_ms1 0/20 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÃÄ@delay_ms1 0/20 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÃÄ@I2C_READ_1 0/53 Ram=3 |
ÃÄ@delay_ms1 0/20 Ram=1 |
ÃÄ@PSTRINGCN7_68 0/79 Ram=4 |
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1 |
ÃÄ@PRINTF_X_68 0/33 Ram=2 |
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/34 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/34 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/34 Ram=1 |
ÃÄ@PSTRINGCN7_68 0/79 Ram=4 |
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1 |
ÃÄ@PRINTF_X_68 0/33 Ram=2 |
³ ÃÄ@PUTCHAR_1_ 0/34 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/34 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/34 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/34 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/34 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÃÄ@I2C_WRITE_1 0/52 Ram=1 |
ÀÄ@delay_ms1 0/20 Ram=1 |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/BQ34Z100.c |
---|
0,0 → 1,65 |
int16 cteniBAT(byte lsb, byte msb) |
{ |
int16 data = 0; |
unsigned int8 h, l; |
i2c_start(); |
I2C_Write(BAT_ADDR_W); |
I2C_write(lsb); |
i2c_start(); |
I2C_Write(BAT_ADDR_R); |
l=i2c_read(0); |
i2c_stop(); |
i2c_start(); |
I2C_Write(BAT_ADDR_W); |
I2C_write(msb); |
i2c_start(); |
I2C_Write(BAT_ADDR_R); |
h=i2c_read(0); |
i2c_stop(); |
return data = (((unsigned int16) h << 8) + l ); |
} |
int16 batintT(void) //teplota baterie (pri vyrobnim nastaveni, je mozne zmenit na teplotu v IO |
{ |
int16 data = cteniBAT(0x0C, 0x0D); |
data = (data/10)-273; |
return data; |
} |
int16 batNAP(void) //napeti baterie |
{ |
int16 data = cteniBAT(0x08, 0x09); |
return data; |
} |
int16 batPROUD(void) //proud z nebo do baterie |
{ |
int16 data = cteniBAT(0x0A, 0x0B); |
return data; |
} |
int16 batKAPAKT(void) //zbyvajici kapacita |
{ |
int16 data = cteniBAT(0x04, 0x05); |
return data; |
} |
int16 batKAPMAX(void) //max. kapacita |
{ |
int16 data = cteniBAT(0x06, 0x07); |
return data; |
} |
int16 batSTAV(void) //zbytek energie v baterii v % |
{ |
int16 data = cteniBAT(0x02, 0x03); |
return data; |
} |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/BQ34Z100.h |
---|
0,0 → 1,8 |
#define BAT_ADDR_R 0xAB //addresa pro cteni |
#define BAT_ADDR_W 0xAA |
#include "BQ34Z100.c" |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/main.bak |
---|
0,0 → 1,43 |
//#include "C:\Users\Honza\Documents\pic\I2C_magnetometr\main.h" |
#include "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 |
#include "BQ34Z100.h" |
void main() |
{ |
setup_adc_ports(NO_ANALOGS|VSS_VDD); |
setup_adc(ADC_CLOCK_DIV_2); |
setup_spi(SPI_SS_DISABLED); |
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); |
setup_timer_1(T1_DISABLED); |
setup_timer_2(T2_DISABLED,0,1); |
setup_ccp1(CCP_OFF); |
setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard |
printf("Vycitani zakladnich dat z modulu LION1CELL01B \r\n",); |
printf("(c) MLAB 2013 JACHO \r\n",); |
int16 data; |
while(TRUE) |
{ |
data=batintT(); |
printf("Teplota baterie: %Ld (°C)\r\n", data); |
data=batNAP(); |
printf("Napeti clanku: %Ld (mV)\r\n", data); |
data=batPROUD(); |
printf("Proud clankem: %Ld (mA)\r\n", data); |
data=batKAPAKT(); |
printf("Zbyvajici kapacita: %Ld (mAh)\r\n", data); |
data=batKAPMAX(); |
printf("Max. kapacita: %Ld (mAh)\r\n", data); |
data=batSTAV(); |
printf("Stav baterie: %Ld (procenta)\r\n", data); |
delay_ms (2000); |
} |
} |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/main.c |
---|
0,0 → 1,44 |
//#include "C:\Users\Honza\Documents\pic\I2C_magnetometr\main.h" |
#include "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 |
#include "BQ34Z100.h" |
void main() |
{ |
setup_adc_ports(NO_ANALOGS|VSS_VDD); |
setup_adc(ADC_CLOCK_DIV_2); |
setup_spi(SPI_SS_DISABLED); |
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); |
setup_timer_1(T1_DISABLED); |
setup_timer_2(T2_DISABLED,0,1); |
setup_ccp1(CCP_OFF); |
setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard |
printf("Vycitani zakladnich dat z modulu LION1CELL01B \r\n",); |
printf("(c) MLAB 2013 JACHO \r\n",); |
int16 data; |
while(TRUE) |
{ |
data=batintT(); |
printf("Teplota baterie: %Ld (°C)\r\n", data); |
data=batNAP(); |
printf("Napeti clanku: %Ld (mV)\r\n", data); |
data=batPROUD(); |
printf("Proud clankem: %Ld (mA)\r\n", data); |
data=batKAPAKT(); |
printf("Zbyvajici kapacita: %Ld (mAh)\r\n", data); |
data=batKAPMAX(); |
printf("Max. kapacita: %Ld (mAh)\r\n", data); |
data=batSTAV(); |
printf("Stav baterie: %Ld (procenta)\r\n", data); |
printf("\r\n"); |
delay_ms (2000); |
} |
} |
/Modules/PowerSupply/LION1CELL01B/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/PowerSupply/LION1CELL01B/SW/PIC16F887/main.err |
---|
0,0 → 1,2 |
Memory usage: ROM=16% RAM=2% - 5% |
0 Errors, 0 Warnings. |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/main.esym |
---|
0,0 → 1,432 |
D G "__PCM__" 0 45 ""4.106"" |
D G "__DEVICE__" 0 45 "887" |
D G "__DATE__" 0 45 ""30-4-13"" |
D G "__TIME__" 0 45 ""23:25:39"" "#include "C:\Users\Honza\Documents\pic\I2C_magnetometr\main.h"" |
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 3 "PIN_C4" |
D G "EEPROM_SCL" 0 4 "PIN_C3" |
D G "BAT_ADDR_R" 3 1 "0xAB" "addresa pro cteni" |
D G "BAT_ADDR_W" 3 2 "0xAA" |
F G "cteniBAT" 4 1 "int16(int8 lsb,int8 msb)" |
V L "lsb" 4 1 "int8" |
V L "msb" 4 1 "int8" |
V L "data" 4 3 "int16" |
V L "h" 4 4 "int8" |
V L "l" 4 4 "int8" |
F G "batintT" 4 25 "int16()" "teplota baterie (pri vyrobnim nastaveni, je mozne zmenit na teplotu v IO" |
V L "data" 4 27 "int16" |
F G "batNAP" 4 33 "int16()" "napeti baterie" |
V L "data" 4 35 "int16" |
F G "batPROUD" 4 40 "int16()" "proud z nebo do baterie" |
V L "data" 4 42 "int16" |
F G "batKAPAKT" 4 47 "int16()" "zbyvajici kapacita" |
V L "data" 4 49 "int16" |
F G "batKAPMAX" 4 53 "int16()" "max. kapacita" |
V L "data" 4 55 "int16" |
F G "batSTAV" 4 60 "int16()" "zbytek energie v baterii v %" |
V L "data" 4 62 "int16" |
F G "MAIN" 0 10 "void()" |
C L "MAIN" 0 20 1 "FUNCTION" |
V L "data" 0 24 "int16" |
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/main.hex |
---|
0,0 → 1,169 |
:1000000003308A00E12B0000D63CE334F430EE34B8 |
:10001000203DE135EC306437E9316810E43074108C |
:100020007A10ED37E43AEC3A2026C927CE18C322DD |
:100030004C26B0184210A0060A00A83129104D26FF |
:1000400041212019B0183310CA2043244F100D0548 |
:1000500000015434653470346C346F34743461345A |
:1000600020346234613474346534723469346534F4 |
:100070003A34203425344C34643420342834B034B9 |
:10008000433429340D340A340034CE30F032F434A1 |
:10009000A031EC30EE35751DA0124C3220146D2BC2 |
:1000A000A9060A005039EF3A641063366137EB3223 |
:1000B0006D1DA0124C322014ED20A9060A005A3101 |
:1000C000793B6135E9316910EB30F030E334F430DD |
:1000D0003A1025266410A8364134A9060A00CD300E |
:1000E0007817A0356138E131693A611DA0124C32B0 |
:1000F0002014ED20E8140D050001533A613B203136 |
:10010000613A6539E9323A10252664102838F23709 |
:10011000E3326E3AE1140D050001A01320088316A6 |
:100120008700831287130830F80096280000F8171C |
:10013000A728F813AC0C03188717031C871378172C |
:10014000A7287813F80B9A28A528000087173F30B6 |
:100150008400840BA9280000F81B9928781BA1288B |
:100160000800831603178C170C140000000083127C |
:100170000C087F390319F5280313A30003170D0892 |
:100180000313A40003170F080313A5002308AC00F2 |
:100190008D20240803178D000313250803178F00F3 |
:1001A00083168C170C140000000083120C0D0E0D2A |
:1001B0007F390319F5280313A30003170D08031350 |
:1001C000A40003170F080313A5002308AC008D201B |
:1001D000240803178D000313250803178F008D0AC9 |
:1001E00003198F0A0313B1280317031308000830FB |
:1001F000F80000008711A011200883168700000076 |
:100200008312AB0D0712031C0B292016200883163E |
:1002100087000F2983122012200883168700000010 |
:100220008312A0152008831687008312871D1629C4 |
:10023000F80BF92800008711A01120088316870009 |
:10024000000083122016200883168700000000009B |
:100250008312A0152008831687008312871D2E297C |
:10026000F8010000071A78148711A01120088316DE |
:10027000870083120712201220088316870083123A |
:1002800008000830AC007708AD002016200883165F |
:10029000870000008312A0152008831687008312B0 |
:1002A000871D5029071A0314071E0310F80D0000BC |
:1002B000A01120088316870083128711AC0B4529F3 |
:1002C00020162008831687000000831207122D08CD |
:1002D00003196F292012200883168700831200005B |
:1002E000A0152008831687008312871D752900003A |
:1002F0008711A011200883168700000083120712BF |
:10030000201220088316870083120800A801A70185 |
:10031000201620088316870000008312A0152008ED |
:10032000831687000000831207122012200883160C |
:100330008700000083128711A01120088316870010 |
:10034000AA308312AB00F7202508AB00F720201657 |
:1003500020088316870000008312A015200883164A |
:10036000870000008312871DB3290712201220087E |
:1003700083168700000083128711A01120088316BE |
:100380008700AB308312AB00F720F70141217808DA |
:10039000AA00201220088316870000008312A015EF |
:1003A0002008831687008312871DD4290000D829CE |
:1003B00000002016200883168700000083122016F4 |
:1003C00020088316870000008312A01520088316DA |
:1003D000870000008312071220122008831687006E |
:1003E000000083128711A011200883168700AA300D |
:1003F0008312AB00F7202608AB00F7202016200858 |
:100400008316870000008312A0152008831687003A |
:1004100000008312871D0A2A071220122008831663 |
:100420008700000083128711A0112008831687001F |
:10043000AB308312AB00F720F70141217808A90007 |
:10044000201220088316870000008312A0152008C0 |
:10045000831687008312871D2B2A00002F2A000095 |
:10046000201620088316870000008312AC0129089B |
:10047000AB00AC00AB012A082B07A7002C08A80092 |
:100480000318A80A2708F8002808F90008000C300B |
:10049000A5000D30A60086217908A4007808A300E5 |
:1004A0002408A6002308A500A8010A30A700F80127 |
:1004B000F901F701FA012808031D612A2708031929 |
:1004C0007B2A1030A9000310A50DA60DF70DFA0D1B |
:1004D00028087A02031D6E2A27087702031C772A50 |
:1004E0002708F702031CFA032808FA020314F80D80 |
:1004F000F90DA90B632A11307802A3007908A40032 |
:100500000130031C0230A4022308F8002408F9007B |
:100510008A110A12552C831603178C170C1400002D |
:10052000000083120D080313A40003170F08031320 |
:10053000A50003170C080313AC008D202408031733 |
:100540008D000313250803178F008D0A03198F0AE6 |
:100550000313A30B8B2A0800AB010408AA002B107D |
:10056000831B2B14A41FBC2AAA172A1EAA0AA3099C |
:10057000A409A30A0319A40A240EF038A600A607AA |
:10058000E23EA700323EA90024080F39A707A707BB |
:10059000A907E93EA800A807A807230E0F39A80756 |
:1005A000A907A80DA90DA909A90D23080F39A907A5 |
:1005B000A60D0730A5000A30A907A803031CDC2AF2 |
:1005C000A807A703031CE02AA707A603031CE42A25 |
:1005D000A607A503031CE82A2530840083130730EF |
:1005E0002A052A1384032A05031DFD2A2A1A840AD0 |
:1005F0002A1AFD2A2030F7001A2B8407293004021A |
:1006000003192A170008F700031D0E2B2A1B0E2BB7 |
:100610002A1A282BAA190E2B2030192BAA1F162BA9 |
:100620002D30F70084032A13AA131A2BAA152A12B5 |
:100630003030F707A4010408A3002410831B2414FE |
:100640007708AC008D2023088400831324188317B7 |
:10065000840A2A1FFE2A08000830A5000930A600D7 |
:1006600086217908A4007808A3002308F80024084C |
:10067000F9008A110A12732C831603178C170C14B5 |
:100680000000000003186B2B83120C087F39031342 |
:10069000A40003170D080313A50003170F08031385 |
:1006A000A6002408AC008D20250803178D00031335 |
:1006B000260803178F0083168C170C140000000007 |
:1006C00083120313A30B652B682B831603176B2B65 |
:1006D0008A2B8316031783120C0D0E0D7F3903131B |
:1006E000A40003170D080313A50003170F08031335 |
:1006F000A6002408AC008D20250803178D000313E5 |
:10070000260803178F008D0A03198F0A031003139D |
:10071000A30B3C2B08000A30A5000B30A600862155 |
:100720007908A4007808A3002308F8002408F90039 |
:100730008A110A12932C0430A5000530A6008621E8 |
:100740007908A4007808A3002308F8002408F90019 |
:100750008A110A12B32C0630A5000730A6008621A4 |
:100760007908A4007808A3002308F8002408F900F9 |
:100770008A110A12D32C0230A5000330A60086216C |
:100780007908A4007808A3002308F8002408F900D9 |
:100790008A110A12F32C24308400831300080319F1 |
:1007A000DE2B0230F800F701F70BD42BF80BD32B1C |
:1007B0009730F700F70BDA2B800BD12B8A110A1236 |
:1007C0001D2D840183131F308305713083168F0024 |
:1007D0000F088312A013200883168700831287173F |
:1007E000831603170908C039890003131F129F12CB |
:1007F0000030031788008312870188018901FF30C8 |
:100800000313A000831603170908C03989000313D6 |
:100810001F129F12003003178800831203131F1347 |
:100820009F1383169F1383121F149412A012200883 |
:1008300083168700831220162008831687008312F0 |
:10084000A011200883168700013083129400003025 |
:10085000831694000108C73908388100831290017B |
:100860000030F800920000308316920083122015A9 |
:100870002008831687008312970183169B019C0131 |
:1008800001309D008312031787018801890104301C |
:100890008D0000308F000313B1201D3003178D0031 |
:1008A00000308F000313B120472A7908A20078088E |
:1008B000A100293003178D0000308F001130031381 |
:1008C000A3008B22103084002208A4002108A3007A |
:1008D000AC223D3003178D0000308F00073003132A |
:1008E000A3008B222C2B7908A2007808A1004530A8 |
:1008F00003178D0000308F0003100F300313A30087 |
:100900003C23103084002208A4002108A300AC225C |
:100910004E3003178D0000308F0003100730031393 |
:10092000A3003C238B2B7908A2007808A100523049 |
:1009300003178D0000308F0003100F300313A30046 |
:100940003C23103084002208A4002108A300AC221C |
:100950005B3003178D0000308F0003100730031346 |
:10096000A3003C239B2B7908A2007808A1005F30EC |
:1009700003178D0000308F00031014300313A30001 |
:100980003C23103084002208A4002108A300AC22DC |
:100990006A3003178D0000308F00031408300313F2 |
:1009A000A3003C23AB2B7908A2007808A1006F308C |
:1009B00003178D0000308F0003100F300313A300C6 |
:1009C0003C23103084002208A4002108A300AC229C |
:1009D000783003178D0000308F00031008300313A8 |
:1009E000A3003C23BB2B7908A2007808A1007D302E |
:1009F00003178D0000308F0003100E300313A30087 |
:100A00003C23103084002208A4002108A300AC225B |
:100A1000853003178D0000308F0003140D30031351 |
:100A2000A3003C230D30AC008D200A30AC008D209B |
:100A30000830A300FA30A400CB2BA30B1A2D542CA2 |
:020A4000630051 |
:04400E00F52CFF3F4F |
:00000001FF |
;PIC16F887 |
;CRC=9002 CREATED="30-4-13 23:25" |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/main.lst |
---|
0,0 → 1,995 |
CCS PCM C Compiler, Version 4.106, 47914 30-4-13 23:25 |
Filename: C:\Users\Honza\Documents\pic\I2C_baterka\main.lst |
ROM used: 1313 words (16%) |
Largest free fragment is 2048 |
RAM used: 7 (2%) at main() level |
19 (5%) worst case |
Stack: 3 locations |
* |
0000: MOVLW 03 |
0001: MOVWF 0A |
0002: GOTO 3E1 |
0003: NOP |
.................... //#include "C:\Users\Honza\Documents\pic\I2C_magnetometr\main.h" |
.................... #include "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) |
* |
03CB: MOVLW 24 |
03CC: MOVWF 04 |
03CD: BCF 03.7 |
03CE: MOVF 00,W |
03CF: BTFSC 03.2 |
03D0: GOTO 3DE |
03D1: MOVLW 02 |
03D2: MOVWF 78 |
03D3: CLRF 77 |
03D4: DECFSZ 77,F |
03D5: GOTO 3D4 |
03D6: DECFSZ 78,F |
03D7: GOTO 3D3 |
03D8: MOVLW 97 |
03D9: MOVWF 77 |
03DA: DECFSZ 77,F |
03DB: GOTO 3DA |
03DC: DECFSZ 00,F |
03DD: GOTO 3D1 |
03DE: BCF 0A.3 |
03DF: BCF 0A.4 |
03E0: GOTO 51D (RETURN) |
.................... |
.................... |
.................... #define EEPROM_SDA PIN_C4 |
.................... #define EEPROM_SCL PIN_C3 |
.................... #use i2c(master, sda=EEPROM_SDA, scl=EEPROM_SCL) |
* |
00F7: MOVLW 08 |
00F8: MOVWF 78 |
00F9: NOP |
00FA: BCF 07.3 |
00FB: BCF 20.3 |
00FC: MOVF 20,W |
00FD: BSF 03.5 |
00FE: MOVWF 07 |
00FF: NOP |
0100: BCF 03.5 |
0101: RLF 2B,F |
0102: BCF 07.4 |
0103: BTFSS 03.0 |
0104: GOTO 10B |
0105: BSF 20.4 |
0106: MOVF 20,W |
0107: BSF 03.5 |
0108: MOVWF 07 |
0109: GOTO 10F |
010A: BCF 03.5 |
010B: BCF 20.4 |
010C: MOVF 20,W |
010D: BSF 03.5 |
010E: MOVWF 07 |
010F: NOP |
0110: BCF 03.5 |
0111: BSF 20.3 |
0112: MOVF 20,W |
0113: BSF 03.5 |
0114: MOVWF 07 |
0115: BCF 03.5 |
0116: BTFSS 07.3 |
0117: GOTO 116 |
0118: DECFSZ 78,F |
0119: GOTO 0F9 |
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: BSF 20.4 |
0123: MOVF 20,W |
0124: BSF 03.5 |
0125: MOVWF 07 |
0126: NOP |
0127: NOP |
0128: BCF 03.5 |
0129: BSF 20.3 |
012A: MOVF 20,W |
012B: BSF 03.5 |
012C: MOVWF 07 |
012D: BCF 03.5 |
012E: BTFSS 07.3 |
012F: GOTO 12E |
0130: CLRF 78 |
0131: NOP |
0132: BTFSC 07.4 |
0133: BSF 78.0 |
0134: BCF 07.3 |
0135: BCF 20.3 |
0136: MOVF 20,W |
0137: BSF 03.5 |
0138: MOVWF 07 |
0139: BCF 03.5 |
013A: BCF 07.4 |
013B: BCF 20.4 |
013C: MOVF 20,W |
013D: BSF 03.5 |
013E: MOVWF 07 |
013F: BCF 03.5 |
0140: RETURN |
0141: MOVLW 08 |
0142: MOVWF 2C |
0143: MOVF 77,W |
0144: MOVWF 2D |
0145: BSF 20.4 |
0146: MOVF 20,W |
0147: BSF 03.5 |
0148: MOVWF 07 |
0149: NOP |
014A: BCF 03.5 |
014B: BSF 20.3 |
014C: MOVF 20,W |
014D: BSF 03.5 |
014E: MOVWF 07 |
014F: BCF 03.5 |
0150: BTFSS 07.3 |
0151: GOTO 150 |
0152: BTFSC 07.4 |
0153: BSF 03.0 |
0154: BTFSS 07.4 |
0155: BCF 03.0 |
0156: RLF 78,F |
0157: NOP |
0158: BCF 20.3 |
0159: MOVF 20,W |
015A: BSF 03.5 |
015B: MOVWF 07 |
015C: BCF 03.5 |
015D: BCF 07.3 |
015E: DECFSZ 2C,F |
015F: GOTO 145 |
0160: BSF 20.4 |
0161: MOVF 20,W |
0162: BSF 03.5 |
0163: MOVWF 07 |
0164: NOP |
0165: BCF 03.5 |
0166: BCF 07.4 |
0167: MOVF 2D,W |
0168: BTFSC 03.2 |
0169: GOTO 16F |
016A: BCF 20.4 |
016B: MOVF 20,W |
016C: BSF 03.5 |
016D: MOVWF 07 |
016E: BCF 03.5 |
016F: NOP |
0170: BSF 20.3 |
0171: MOVF 20,W |
0172: BSF 03.5 |
0173: MOVWF 07 |
0174: BCF 03.5 |
0175: BTFSS 07.3 |
0176: GOTO 175 |
0177: NOP |
0178: BCF 07.3 |
0179: BCF 20.3 |
017A: MOVF 20,W |
017B: BSF 03.5 |
017C: MOVWF 07 |
017D: NOP |
017E: BCF 03.5 |
017F: BCF 07.4 |
0180: BCF 20.4 |
0181: MOVF 20,W |
0182: BSF 03.5 |
0183: MOVWF 07 |
0184: BCF 03.5 |
0185: RETURN |
.................... #use rs232(baud=9600,parity=N,xmit=PIN_C7,rcv=PIN_C6,bits=8) //rcv TXD xmit RXD |
* |
008D: BCF 20.7 |
008E: MOVF 20,W |
008F: BSF 03.5 |
0090: MOVWF 07 |
0091: BCF 03.5 |
0092: BCF 07.7 |
0093: MOVLW 08 |
0094: MOVWF 78 |
0095: GOTO 096 |
0096: NOP |
0097: BSF 78.7 |
0098: GOTO 0A7 |
0099: BCF 78.7 |
009A: RRF 2C,F |
009B: BTFSC 03.0 |
009C: BSF 07.7 |
009D: BTFSS 03.0 |
009E: BCF 07.7 |
009F: BSF 78.6 |
00A0: GOTO 0A7 |
00A1: BCF 78.6 |
00A2: DECFSZ 78,F |
00A3: GOTO 09A |
00A4: GOTO 0A5 |
00A5: NOP |
00A6: BSF 07.7 |
00A7: MOVLW 3F |
00A8: MOVWF 04 |
00A9: DECFSZ 04,F |
00AA: GOTO 0A9 |
00AB: NOP |
00AC: BTFSC 78.7 |
00AD: GOTO 099 |
00AE: BTFSC 78.6 |
00AF: GOTO 0A1 |
00B0: RETURN |
.................... #include "BQ34Z100.h" |
.................... #define BAT_ADDR_R 0xAB //addresa pro cteni |
.................... #define BAT_ADDR_W 0xAA |
.................... |
.................... |
.................... |
.................... |
.................... |
.................... #include "BQ34Z100.c" |
.................... int16 cteniBAT(byte lsb, byte msb) |
.................... { |
* |
0186: CLRF 28 |
0187: CLRF 27 |
.................... int16 data = 0; |
.................... unsigned int8 h, l; |
.................... i2c_start(); |
0188: BSF 20.4 |
0189: MOVF 20,W |
018A: BSF 03.5 |
018B: MOVWF 07 |
018C: NOP |
018D: BCF 03.5 |
018E: BSF 20.3 |
018F: MOVF 20,W |
0190: BSF 03.5 |
0191: MOVWF 07 |
0192: NOP |
0193: BCF 03.5 |
0194: BCF 07.4 |
0195: BCF 20.4 |
0196: MOVF 20,W |
0197: BSF 03.5 |
0198: MOVWF 07 |
0199: NOP |
019A: BCF 03.5 |
019B: BCF 07.3 |
019C: BCF 20.3 |
019D: MOVF 20,W |
019E: BSF 03.5 |
019F: MOVWF 07 |
.................... I2C_Write(BAT_ADDR_W); |
01A0: MOVLW AA |
01A1: BCF 03.5 |
01A2: MOVWF 2B |
01A3: CALL 0F7 |
.................... I2C_write(lsb); |
01A4: MOVF 25,W |
01A5: MOVWF 2B |
01A6: CALL 0F7 |
.................... |
.................... i2c_start(); |
01A7: BSF 20.4 |
01A8: MOVF 20,W |
01A9: BSF 03.5 |
01AA: MOVWF 07 |
01AB: NOP |
01AC: BCF 03.5 |
01AD: BSF 20.3 |
01AE: MOVF 20,W |
01AF: BSF 03.5 |
01B0: MOVWF 07 |
01B1: NOP |
01B2: BCF 03.5 |
01B3: BTFSS 07.3 |
01B4: GOTO 1B3 |
01B5: BCF 07.4 |
01B6: BCF 20.4 |
01B7: MOVF 20,W |
01B8: BSF 03.5 |
01B9: MOVWF 07 |
01BA: NOP |
01BB: BCF 03.5 |
01BC: BCF 07.3 |
01BD: BCF 20.3 |
01BE: MOVF 20,W |
01BF: BSF 03.5 |
01C0: MOVWF 07 |
.................... I2C_Write(BAT_ADDR_R); |
01C1: MOVLW AB |
01C2: BCF 03.5 |
01C3: MOVWF 2B |
01C4: CALL 0F7 |
.................... l=i2c_read(0); |
01C5: CLRF 77 |
01C6: CALL 141 |
01C7: MOVF 78,W |
01C8: MOVWF 2A |
.................... i2c_stop(); |
01C9: BCF 20.4 |
01CA: MOVF 20,W |
01CB: BSF 03.5 |
01CC: MOVWF 07 |
01CD: NOP |
01CE: BCF 03.5 |
01CF: BSF 20.3 |
01D0: MOVF 20,W |
01D1: BSF 03.5 |
01D2: MOVWF 07 |
01D3: BCF 03.5 |
01D4: BTFSS 07.3 |
01D5: GOTO 1D4 |
01D6: NOP |
01D7: GOTO 1D8 |
01D8: NOP |
01D9: BSF 20.4 |
01DA: MOVF 20,W |
01DB: BSF 03.5 |
01DC: MOVWF 07 |
01DD: NOP |
.................... |
.................... i2c_start(); |
01DE: BCF 03.5 |
01DF: BSF 20.4 |
01E0: MOVF 20,W |
01E1: BSF 03.5 |
01E2: MOVWF 07 |
01E3: NOP |
01E4: BCF 03.5 |
01E5: BSF 20.3 |
01E6: MOVF 20,W |
01E7: BSF 03.5 |
01E8: MOVWF 07 |
01E9: NOP |
01EA: BCF 03.5 |
01EB: BCF 07.4 |
01EC: BCF 20.4 |
01ED: MOVF 20,W |
01EE: BSF 03.5 |
01EF: MOVWF 07 |
01F0: NOP |
01F1: BCF 03.5 |
01F2: BCF 07.3 |
01F3: BCF 20.3 |
01F4: MOVF 20,W |
01F5: BSF 03.5 |
01F6: MOVWF 07 |
.................... I2C_Write(BAT_ADDR_W); |
01F7: MOVLW AA |
01F8: BCF 03.5 |
01F9: MOVWF 2B |
01FA: CALL 0F7 |
.................... I2C_write(msb); |
01FB: MOVF 26,W |
01FC: MOVWF 2B |
01FD: CALL 0F7 |
.................... i2c_start(); |
01FE: BSF 20.4 |
01FF: MOVF 20,W |
0200: BSF 03.5 |
0201: MOVWF 07 |
0202: NOP |
0203: BCF 03.5 |
0204: BSF 20.3 |
0205: MOVF 20,W |
0206: BSF 03.5 |
0207: MOVWF 07 |
0208: NOP |
0209: BCF 03.5 |
020A: BTFSS 07.3 |
020B: GOTO 20A |
020C: BCF 07.4 |
020D: BCF 20.4 |
020E: MOVF 20,W |
020F: BSF 03.5 |
0210: MOVWF 07 |
0211: NOP |
0212: BCF 03.5 |
0213: BCF 07.3 |
0214: BCF 20.3 |
0215: MOVF 20,W |
0216: BSF 03.5 |
0217: MOVWF 07 |
.................... I2C_Write(BAT_ADDR_R); |
0218: MOVLW AB |
0219: BCF 03.5 |
021A: MOVWF 2B |
021B: CALL 0F7 |
.................... h=i2c_read(0); |
021C: CLRF 77 |
021D: CALL 141 |
021E: MOVF 78,W |
021F: MOVWF 29 |
.................... i2c_stop(); |
0220: BCF 20.4 |
0221: MOVF 20,W |
0222: BSF 03.5 |
0223: MOVWF 07 |
0224: NOP |
0225: BCF 03.5 |
0226: BSF 20.3 |
0227: MOVF 20,W |
0228: BSF 03.5 |
0229: MOVWF 07 |
022A: BCF 03.5 |
022B: BTFSS 07.3 |
022C: GOTO 22B |
022D: NOP |
022E: GOTO 22F |
022F: NOP |
0230: BSF 20.4 |
0231: MOVF 20,W |
0232: BSF 03.5 |
0233: MOVWF 07 |
0234: NOP |
.................... |
.................... return data = (((unsigned int16) h << 8) + l ); |
0235: BCF 03.5 |
0236: CLRF 2C |
0237: MOVF 29,W |
0238: MOVWF 2B |
0239: MOVWF 2C |
023A: CLRF 2B |
023B: MOVF 2A,W |
023C: ADDWF 2B,W |
023D: MOVWF 27 |
023E: MOVF 2C,W |
023F: MOVWF 28 |
0240: BTFSC 03.0 |
0241: INCF 28,F |
0242: MOVF 27,W |
0243: MOVWF 78 |
0244: MOVF 28,W |
0245: MOVWF 79 |
.................... } |
0246: RETURN |
.................... |
.................... int16 batintT(void) //teplota baterie (pri vyrobnim nastaveni, je mozne zmenit na teplotu v IO |
.................... { |
0247: MOVLW 0C |
0248: MOVWF 25 |
0249: MOVLW 0D |
024A: MOVWF 26 |
024B: CALL 186 |
024C: MOVF 79,W |
024D: MOVWF 24 |
024E: MOVF 78,W |
024F: MOVWF 23 |
.................... int16 data = cteniBAT(0x0C, 0x0D); |
.................... data = (data/10)-273; |
0250: MOVF 24,W |
0251: MOVWF 26 |
0252: MOVF 23,W |
0253: MOVWF 25 |
0254: CLRF 28 |
0255: MOVLW 0A |
0256: MOVWF 27 |
* |
027B: MOVLW 11 |
027C: SUBWF 78,W |
027D: MOVWF 23 |
027E: MOVF 79,W |
027F: MOVWF 24 |
0280: MOVLW 01 |
0281: BTFSS 03.0 |
0282: MOVLW 02 |
0283: SUBWF 24,F |
.................... return data; |
0284: MOVF 23,W |
0285: MOVWF 78 |
0286: MOVF 24,W |
0287: MOVWF 79 |
.................... |
.................... } |
0288: BCF 0A.3 |
0289: BCF 0A.4 |
028A: GOTO 455 (RETURN) |
.................... |
.................... int16 batNAP(void) //napeti baterie |
.................... { |
* |
032C: MOVLW 08 |
032D: MOVWF 25 |
032E: MOVLW 09 |
032F: MOVWF 26 |
0330: CALL 186 |
0331: MOVF 79,W |
0332: MOVWF 24 |
0333: MOVF 78,W |
0334: MOVWF 23 |
.................... int16 data = cteniBAT(0x08, 0x09); |
.................... return data; |
0335: MOVF 23,W |
0336: MOVWF 78 |
0337: MOVF 24,W |
0338: MOVWF 79 |
.................... |
.................... } |
0339: BCF 0A.3 |
033A: BCF 0A.4 |
033B: GOTO 473 (RETURN) |
.................... |
.................... int16 batPROUD(void) //proud z nebo do baterie |
.................... { |
* |
038B: MOVLW 0A |
038C: MOVWF 25 |
038D: MOVLW 0B |
038E: MOVWF 26 |
038F: CALL 186 |
0390: MOVF 79,W |
0391: MOVWF 24 |
0392: MOVF 78,W |
0393: MOVWF 23 |
.................... int16 data = cteniBAT(0x0A, 0x0B); |
.................... return data; |
0394: MOVF 23,W |
0395: MOVWF 78 |
0396: MOVF 24,W |
0397: MOVWF 79 |
.................... |
.................... } |
0398: BCF 0A.3 |
0399: BCF 0A.4 |
039A: GOTO 493 (RETURN) |
.................... |
.................... int16 batKAPAKT(void) //zbyvajici kapacita |
.................... { |
039B: MOVLW 04 |
039C: MOVWF 25 |
039D: MOVLW 05 |
039E: MOVWF 26 |
039F: CALL 186 |
03A0: MOVF 79,W |
03A1: MOVWF 24 |
03A2: MOVF 78,W |
03A3: MOVWF 23 |
.................... int16 data = cteniBAT(0x04, 0x05); |
.................... return data; |
03A4: MOVF 23,W |
03A5: MOVWF 78 |
03A6: MOVF 24,W |
03A7: MOVWF 79 |
.................... |
.................... } |
03A8: BCF 0A.3 |
03A9: BCF 0A.4 |
03AA: GOTO 4B3 (RETURN) |
.................... int16 batKAPMAX(void) //max. kapacita |
.................... { |
03AB: MOVLW 06 |
03AC: MOVWF 25 |
03AD: MOVLW 07 |
03AE: MOVWF 26 |
03AF: CALL 186 |
03B0: MOVF 79,W |
03B1: MOVWF 24 |
03B2: MOVF 78,W |
03B3: MOVWF 23 |
.................... int16 data = cteniBAT(0x06, 0x07); |
.................... return data; |
03B4: MOVF 23,W |
03B5: MOVWF 78 |
03B6: MOVF 24,W |
03B7: MOVWF 79 |
.................... |
.................... } |
03B8: BCF 0A.3 |
03B9: BCF 0A.4 |
03BA: GOTO 4D3 (RETURN) |
.................... |
.................... int16 batSTAV(void) //zbytek energie v baterii v % |
.................... { |
03BB: MOVLW 02 |
03BC: MOVWF 25 |
03BD: MOVLW 03 |
03BE: MOVWF 26 |
03BF: CALL 186 |
03C0: MOVF 79,W |
03C1: MOVWF 24 |
03C2: MOVF 78,W |
03C3: MOVWF 23 |
.................... int16 data = cteniBAT(0x02, 0x03); |
.................... return data; |
03C4: MOVF 23,W |
03C5: MOVWF 78 |
03C6: MOVF 24,W |
03C7: MOVWF 79 |
.................... |
.................... } |
03C8: BCF 0A.3 |
03C9: BCF 0A.4 |
03CA: GOTO 4F3 (RETURN) |
.................... |
.................... |
.................... |
.................... |
.................... |
.................... void main() |
.................... { |
* |
03E1: CLRF 04 |
03E2: BCF 03.7 |
03E3: MOVLW 1F |
03E4: ANDWF 03,F |
03E5: MOVLW 71 |
03E6: BSF 03.5 |
03E7: MOVWF 0F |
03E8: MOVF 0F,W |
03E9: BCF 03.5 |
03EA: BCF 20.7 |
03EB: MOVF 20,W |
03EC: BSF 03.5 |
03ED: MOVWF 07 |
03EE: BCF 03.5 |
03EF: BSF 07.7 |
03F0: BSF 03.5 |
03F1: BSF 03.6 |
03F2: MOVF 09,W |
03F3: ANDLW C0 |
03F4: MOVWF 09 |
03F5: BCF 03.6 |
03F6: BCF 1F.4 |
03F7: BCF 1F.5 |
03F8: MOVLW 00 |
03F9: BSF 03.6 |
03FA: MOVWF 08 |
03FB: BCF 03.5 |
03FC: CLRF 07 |
03FD: CLRF 08 |
03FE: CLRF 09 |
.................... |
.................... setup_adc_ports(NO_ANALOGS|VSS_VDD); |
* |
0402: BSF 03.5 |
0403: BSF 03.6 |
0404: MOVF 09,W |
0405: ANDLW C0 |
0406: MOVWF 09 |
0407: BCF 03.6 |
0408: BCF 1F.4 |
0409: BCF 1F.5 |
040A: MOVLW 00 |
040B: BSF 03.6 |
040C: MOVWF 08 |
.................... setup_adc(ADC_CLOCK_DIV_2); |
040D: BCF 03.5 |
040E: BCF 03.6 |
040F: BCF 1F.6 |
0410: BCF 1F.7 |
0411: BSF 03.5 |
0412: BCF 1F.7 |
0413: BCF 03.5 |
0414: BSF 1F.0 |
.................... setup_spi(SPI_SS_DISABLED); |
0415: BCF 14.5 |
0416: BCF 20.5 |
0417: MOVF 20,W |
0418: BSF 03.5 |
0419: MOVWF 07 |
041A: BCF 03.5 |
041B: BSF 20.4 |
041C: MOVF 20,W |
041D: BSF 03.5 |
041E: MOVWF 07 |
041F: BCF 03.5 |
0420: BCF 20.3 |
0421: MOVF 20,W |
0422: BSF 03.5 |
0423: MOVWF 07 |
0424: MOVLW 01 |
0425: BCF 03.5 |
0426: MOVWF 14 |
0427: MOVLW 00 |
0428: BSF 03.5 |
0429: MOVWF 14 |
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); |
042A: MOVF 01,W |
042B: ANDLW C7 |
042C: IORLW 08 |
042D: MOVWF 01 |
.................... setup_timer_1(T1_DISABLED); |
042E: BCF 03.5 |
042F: CLRF 10 |
.................... setup_timer_2(T2_DISABLED,0,1); |
0430: MOVLW 00 |
0431: MOVWF 78 |
0432: MOVWF 12 |
0433: MOVLW 00 |
0434: BSF 03.5 |
0435: MOVWF 12 |
.................... setup_ccp1(CCP_OFF); |
0436: BCF 03.5 |
0437: BSF 20.2 |
0438: MOVF 20,W |
0439: BSF 03.5 |
043A: MOVWF 07 |
043B: BCF 03.5 |
043C: CLRF 17 |
043D: BSF 03.5 |
043E: CLRF 1B |
043F: CLRF 1C |
0440: MOVLW 01 |
0441: MOVWF 1D |
.................... setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard |
0442: BCF 03.5 |
0443: BSF 03.6 |
0444: CLRF 07 |
0445: CLRF 08 |
0446: CLRF 09 |
.................... |
.................... printf("Vycitani zakladnich dat z modulu LION1CELL01B \r\n",); |
0447: MOVLW 04 |
0448: MOVWF 0D |
0449: MOVLW 00 |
044A: MOVWF 0F |
044B: BCF 03.6 |
044C: CALL 0B1 |
.................... printf("(c) MLAB 2013 JACHO \r\n",); |
044D: MOVLW 1D |
044E: BSF 03.6 |
044F: MOVWF 0D |
0450: MOVLW 00 |
0451: MOVWF 0F |
0452: BCF 03.6 |
0453: CALL 0B1 |
.................... int16 data; |
.................... |
.................... |
.................... while(TRUE) |
.................... { |
.................... data=batintT(); |
0454: GOTO 247 |
0455: MOVF 79,W |
0456: MOVWF 22 |
0457: MOVF 78,W |
0458: MOVWF 21 |
.................... printf("Teplota baterie: %Ld (°C)\r\n", data); |
0459: MOVLW 29 |
045A: BSF 03.6 |
045B: MOVWF 0D |
045C: MOVLW 00 |
045D: MOVWF 0F |
045E: MOVLW 11 |
045F: BCF 03.6 |
0460: MOVWF 23 |
0461: CALL 28B |
0462: MOVLW 10 |
0463: MOVWF 04 |
0464: MOVF 22,W |
0465: MOVWF 24 |
0466: MOVF 21,W |
0467: MOVWF 23 |
0468: CALL 2AC |
0469: MOVLW 3D |
046A: BSF 03.6 |
046B: MOVWF 0D |
046C: MOVLW 00 |
046D: MOVWF 0F |
046E: MOVLW 07 |
046F: BCF 03.6 |
0470: MOVWF 23 |
0471: CALL 28B |
.................... data=batNAP(); |
0472: GOTO 32C |
0473: MOVF 79,W |
0474: MOVWF 22 |
0475: MOVF 78,W |
0476: MOVWF 21 |
.................... printf("Napeti clanku: %Ld (mV)\r\n", data); |
0477: MOVLW 45 |
0478: BSF 03.6 |
0479: MOVWF 0D |
047A: MOVLW 00 |
047B: MOVWF 0F |
047C: BCF 03.0 |
047D: MOVLW 0F |
047E: BCF 03.6 |
047F: MOVWF 23 |
0480: CALL 33C |
0481: MOVLW 10 |
0482: MOVWF 04 |
0483: MOVF 22,W |
0484: MOVWF 24 |
0485: MOVF 21,W |
0486: MOVWF 23 |
0487: CALL 2AC |
0488: MOVLW 4E |
0489: BSF 03.6 |
048A: MOVWF 0D |
048B: MOVLW 00 |
048C: MOVWF 0F |
048D: BCF 03.0 |
048E: MOVLW 07 |
048F: BCF 03.6 |
0490: MOVWF 23 |
0491: CALL 33C |
.................... data=batPROUD(); |
0492: GOTO 38B |
0493: MOVF 79,W |
0494: MOVWF 22 |
0495: MOVF 78,W |
0496: MOVWF 21 |
.................... printf("Proud clankem: %Ld (mA)\r\n", data); |
0497: MOVLW 52 |
0498: BSF 03.6 |
0499: MOVWF 0D |
049A: MOVLW 00 |
049B: MOVWF 0F |
049C: BCF 03.0 |
049D: MOVLW 0F |
049E: BCF 03.6 |
049F: MOVWF 23 |
04A0: CALL 33C |
04A1: MOVLW 10 |
04A2: MOVWF 04 |
04A3: MOVF 22,W |
04A4: MOVWF 24 |
04A5: MOVF 21,W |
04A6: MOVWF 23 |
04A7: CALL 2AC |
04A8: MOVLW 5B |
04A9: BSF 03.6 |
04AA: MOVWF 0D |
04AB: MOVLW 00 |
04AC: MOVWF 0F |
04AD: BCF 03.0 |
04AE: MOVLW 07 |
04AF: BCF 03.6 |
04B0: MOVWF 23 |
04B1: CALL 33C |
.................... data=batKAPAKT(); |
04B2: GOTO 39B |
04B3: MOVF 79,W |
04B4: MOVWF 22 |
04B5: MOVF 78,W |
04B6: MOVWF 21 |
.................... printf("Zbyvajici kapacita: %Ld (mAh)\r\n", data); |
04B7: MOVLW 5F |
04B8: BSF 03.6 |
04B9: MOVWF 0D |
04BA: MOVLW 00 |
04BB: MOVWF 0F |
04BC: BCF 03.0 |
04BD: MOVLW 14 |
04BE: BCF 03.6 |
04BF: MOVWF 23 |
04C0: CALL 33C |
04C1: MOVLW 10 |
04C2: MOVWF 04 |
04C3: MOVF 22,W |
04C4: MOVWF 24 |
04C5: MOVF 21,W |
04C6: MOVWF 23 |
04C7: CALL 2AC |
04C8: MOVLW 6A |
04C9: BSF 03.6 |
04CA: MOVWF 0D |
04CB: MOVLW 00 |
04CC: MOVWF 0F |
04CD: BSF 03.0 |
04CE: MOVLW 08 |
04CF: BCF 03.6 |
04D0: MOVWF 23 |
04D1: CALL 33C |
.................... data=batKAPMAX(); |
04D2: GOTO 3AB |
04D3: MOVF 79,W |
04D4: MOVWF 22 |
04D5: MOVF 78,W |
04D6: MOVWF 21 |
.................... printf("Max. kapacita: %Ld (mAh)\r\n", data); |
04D7: MOVLW 6F |
04D8: BSF 03.6 |
04D9: MOVWF 0D |
04DA: MOVLW 00 |
04DB: MOVWF 0F |
04DC: BCF 03.0 |
04DD: MOVLW 0F |
04DE: BCF 03.6 |
04DF: MOVWF 23 |
04E0: CALL 33C |
04E1: MOVLW 10 |
04E2: MOVWF 04 |
04E3: MOVF 22,W |
04E4: MOVWF 24 |
04E5: MOVF 21,W |
04E6: MOVWF 23 |
04E7: CALL 2AC |
04E8: MOVLW 78 |
04E9: BSF 03.6 |
04EA: MOVWF 0D |
04EB: MOVLW 00 |
04EC: MOVWF 0F |
04ED: BCF 03.0 |
04EE: MOVLW 08 |
04EF: BCF 03.6 |
04F0: MOVWF 23 |
04F1: CALL 33C |
.................... data=batSTAV(); |
04F2: GOTO 3BB |
04F3: MOVF 79,W |
04F4: MOVWF 22 |
04F5: MOVF 78,W |
04F6: MOVWF 21 |
.................... printf("Stav baterie: %Ld (procenta)\r\n", data); |
04F7: MOVLW 7D |
04F8: BSF 03.6 |
04F9: MOVWF 0D |
04FA: MOVLW 00 |
04FB: MOVWF 0F |
04FC: BCF 03.0 |
04FD: MOVLW 0E |
04FE: BCF 03.6 |
04FF: MOVWF 23 |
0500: CALL 33C |
0501: MOVLW 10 |
0502: MOVWF 04 |
0503: MOVF 22,W |
0504: MOVWF 24 |
0505: MOVF 21,W |
0506: MOVWF 23 |
0507: CALL 2AC |
0508: MOVLW 85 |
0509: BSF 03.6 |
050A: MOVWF 0D |
050B: MOVLW 00 |
050C: MOVWF 0F |
050D: BSF 03.0 |
050E: MOVLW 0D |
050F: BCF 03.6 |
0510: MOVWF 23 |
0511: CALL 33C |
.................... printf("\r\n"); |
0512: MOVLW 0D |
0513: MOVWF 2C |
0514: CALL 08D |
0515: MOVLW 0A |
0516: MOVWF 2C |
0517: CALL 08D |
.................... delay_ms (2000); |
0518: MOVLW 08 |
0519: MOVWF 23 |
051A: MOVLW FA |
051B: MOVWF 24 |
051C: GOTO 3CB |
051D: DECFSZ 23,F |
051E: GOTO 51A |
.................... } |
051F: GOTO 454 |
.................... } |
0520: 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/main.pjt |
---|
0,0 → 1,25 |
[PROJECT] |
Target=C:\Users\Honza\Documents\pic\I2C_baterka\main.hex |
Development_Mode= |
Processor_Text=PIC16F887 |
ToolSuite=CCS |
Processor=0x887F |
[C:\Users\Honza\Documents\pic\I2C_baterka\main] |
Type=4 |
Path= |
FileList= |
BuildTool= |
OptionString= |
AdditionalOptionString= |
[mru-list] |
1=C:\Users\Honza\Documents\pic\I2C_baterka\main.c |
[Windows] |
0=0000 %S 0 0 796 451 3 0 |
[Units] |
Link=0 |
Count=1 |
1=C:\Users\Honza\Documents\pic\I2C_baterka\main |
[Opened Files] |
1=..\I2C_baterka\main.c |
2=BQ34Z100.c |
3= |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/main.sta |
---|
0,0 → 1,72 |
ROM used: 1313 (16%) |
1313 (16%) 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: 3 worst case (out of 8 total available) |
Lines Stmts % Files |
----- ----- --- ----- |
45 27 55 main.c |
20 0 0 main.h |
423 0 0 ..\..\..\..\..\Program Files (x86)\PICC\devices\16F887.h |
10 0 0 BQ34Z100.h |
66 22 45 BQ34Z100.c |
----- ----- |
564 49 Total |
Page ROM % RAM Vol Diff Functions: |
---- --- --- --- --- ---- ---------- |
0 22 2 1 @delay_ms1 |
0 69 5 3 478 4.2 @I2C_READ_1 |
0 74 6 1 105 3.4 @I2C_WRITE_1 |
0 36 3 1 @PUTCHAR_1_ |
0 193 15 8 478 4.2 cteniBAT |
0 68 5 4 105 3.4 batintT |
Inline 5 59 2.3 @DIV1616 |
0 16 1 2 59 2.3 batNAP |
0 16 1 2 59 2.3 batPROUD |
0 16 1 2 59 2.3 batKAPAKT |
0 16 1 2 59 2.3 batKAPMAX |
0 16 1 2 59 2.3 batSTAV |
0 320 24 1 818 3.3 MAIN |
0 25 2 0 @const99 |
0 70 5 3 @PSTRINGC7_69 |
0 12 1 0 @const101 |
0 28 2 0 @const103 |
0 33 3 3 @PSTRINGCN_69 |
0 128 10 9 @PRINTF_LD_69 |
0 13 1 0 @const108 |
0 79 6 4 @PSTRINGCN7_69 |
0 13 1 0 @const111 |
0 16 1 0 @const112 |
0 14 1 0 @const113 |
0 16 1 0 @const114 |
Program metrics: |
Functions 11 |
Statements 49 |
Comments 95 |
Volume (V) 3668 |
Difficilty (D) 32.9 |
Effort to implement (E) 120660 |
Time to implement (T) 1 hours, 52 minutes |
Est Delivered Bugs (B) 1 |
Cyclomatic Complexity 1 |
Maintainability (MI) 67 |
Segment Used Free |
----------- ---- ---- |
00000-00003 4 0 |
00004-007FF 1309 735 |
00800-00FFF 0 2048 |
01000-017FF 0 2048 |
01800-01FFF 0 2048 |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/main.sym |
---|
0,0 → 1,127 |
004-005 @READ_PROGRAM_MEMORY8.P1 |
004 @WRITE_PROGRAM_MEMORY8.P2 |
015 CCP_1_LOW |
015 CCP_1 |
016 CCP_1_HIGH |
01B CCP_2 |
01B CCP_2_LOW |
01C CCP_2_HIGH |
020 @TRIS_C |
021-022 MAIN.data |
023 @PSTRINGCN7_69.P1 |
023-024 batPROUD.data |
023-024 batKAPAKT.data |
023-024 batNAP.data |
023-024 @PRINTF_LD_69.P1 |
023 @PSTRINGCN_69.P2 |
023-024 batKAPMAX.data |
023-024 batSTAV.data |
023-024 batintT.data |
023 MAIN.@SCRATCH1 |
023 @PSTRINGC7_69.@SCRATCH1 |
024 @delay_ms1.P1 |
024 @PSTRINGC7_69.@SCRATCH2 |
024 @PSTRINGCN_69.@SCRATCH1 |
024 @PSTRINGCN7_69.@SCRATCH1 |
025-026 @DIV1616.P1 |
025 cteniBAT.lsb |
025 batintT.@SCRATCH1 |
025 @PSTRINGC7_69.@SCRATCH3 |
025 @PSTRINGCN_69.@SCRATCH2 |
025 @PRINTF_LD_69.@SCRATCH1 |
025 @PSTRINGCN7_69.@SCRATCH2 |
026 cteniBAT.msb |
026 batintT.@SCRATCH2 |
026 @PRINTF_LD_69.@SCRATCH2 |
026 @PSTRINGCN7_69.@SCRATCH3 |
027-028 @DIV1616.P1 |
027-028 cteniBAT.data |
027 @PRINTF_LD_69.@SCRATCH3 |
028 @PRINTF_LD_69.@SCRATCH4 |
029 cteniBAT.h |
029 @DIV1616.@SCRATCH1 |
029 @PRINTF_LD_69.@SCRATCH5 |
02A cteniBAT.l |
02A @PRINTF_LD_69.@SCRATCH6 |
02B @I2C_WRITE_1.P1 |
02B @I2C_READ_1.P2 |
02B cteniBAT.@SCRATCH1 |
02B @PRINTF_LD_69.@SCRATCH7 |
02C @PUTCHAR_1_.P1 |
02C @I2C_READ_1.@SCRATCH1 |
02C cteniBAT.@SCRATCH2 |
02D @I2C_READ_1.@SCRATCH2 |
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: |
03CB @delay_ms1 |
0141 @I2C_READ_1 |
00F7 @I2C_WRITE_1 |
008D @PUTCHAR_1_ |
0186 cteniBAT |
0247 batintT |
0257 @DIV1616 |
032C batNAP |
038B batPROUD |
039B batKAPAKT |
03AB batKAPMAX |
03BB batSTAV |
03E1 MAIN |
0004 @const99 |
00B1 @PSTRINGC7_69 |
001D @const101 |
0029 @const103 |
028B @PSTRINGCN_69 |
02AC @PRINTF_LD_69 |
0045 @const108 |
033C @PSTRINGCN7_69 |
0052 @const111 |
005F @const112 |
006F @const113 |
007D @const114 |
03E1 @cinit |
User Memory space: |
User Memory space: |
Project Directory: |
C:\Users\Honza\Documents\pic\I2C_baterka\ |
Project Files: |
main.c |
main.h |
..\..\..\..\..\Program Files (x86)\PICC\devices\16F887.h |
BQ34Z100.h |
BQ34Z100.c |
Units: |
C:\Users\Honza\Documents\pic\I2C_baterka\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/main.tre |
---|
0,0 → 1,119 |
ÀÄmain |
ÀÄMAIN 0/320 Ram=1 |
ÃÄ??0?? |
ÃÄ@PSTRINGC7_69 0/70 Ram=3 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PSTRINGC7_69 0/70 Ram=3 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄbatintT 0/68 Ram=4 |
³ ÃÄcteniBAT 0/193 Ram=8 |
³ ³ ÃÄ@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 |
³ ÀÄ@DIV1616 (Inline) Ram=5 |
ÃÄ@PSTRINGCN_69 0/33 Ram=3 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PRINTF_LD_69 0/128 Ram=9 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PSTRINGCN_69 0/33 Ram=3 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄbatNAP 0/16 Ram=2 |
³ ÀÄcteniBAT 0/193 Ram=8 |
³ ÃÄ@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/36 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PRINTF_LD_69 0/128 Ram=9 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PSTRINGCN7_69 0/79 Ram=4 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄbatPROUD 0/16 Ram=2 |
³ ÀÄcteniBAT 0/193 Ram=8 |
³ ÃÄ@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/36 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PRINTF_LD_69 0/128 Ram=9 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PSTRINGCN7_69 0/79 Ram=4 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄbatKAPAKT 0/16 Ram=2 |
³ ÀÄcteniBAT 0/193 Ram=8 |
³ ÃÄ@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/36 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PRINTF_LD_69 0/128 Ram=9 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PSTRINGCN7_69 0/79 Ram=4 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄbatKAPMAX 0/16 Ram=2 |
³ ÀÄcteniBAT 0/193 Ram=8 |
³ ÃÄ@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/36 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PRINTF_LD_69 0/128 Ram=9 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PSTRINGCN7_69 0/79 Ram=4 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄbatSTAV 0/16 Ram=2 |
³ ÀÄcteniBAT 0/193 Ram=8 |
³ ÃÄ@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/36 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PRINTF_LD_69 0/128 Ram=9 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PSTRINGCN7_69 0/79 Ram=4 |
³ ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
³ ÀÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÃÄ@PUTCHAR_1_ 0/36 Ram=1 |
ÀÄ@delay_ms1 0/22 Ram=1 |
/Modules/PowerSupply/LION1CELL01B/SW/PIC16F887/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) |