Subversion Repositories svnkaklik

Rev

Go to most recent revision | Blame | Last modification | View Log | Download

CCS PCW C Compiler, Version 3.110, 15448

               Filename: d:\@kaklik\programy\pic_c\robot\solarni_robot\dalsi_verze\main.LST

               ROM used: 141 (14%)
                         Largest free fragment is 883
               RAM used: 3 (4%) at main() level
                         4 (6%) worst case
               Stack:    1 locations

*
0000:  MOVLW  00
0001:  MOVWF  0A
0002:  GOTO   048
0003:  NOP
....................  /* Program pro ovladani slunecniho robota */  
.................... /* (chodi se zapojenim Dark Walker rev.3  */  
.................... /* $Header: /programy/PIC_C/robot/solarni_robot/dalsi_verze/main.c 7     14.05.03 23:21 Kaklik $ */  
....................   
.................... #include "D:\@Kaklik\programy\PIC_C\robot\solarni_robot\dalsi_verze\main.h" 
....................  #include <16F84.h> 
....................  //////// Standard Header file for the PIC16F84 device ////////////////  
.................... #device PIC16F84  
.................... #list  
....................  
.................... #use delay(clock=32768)  
*
001B:  MOVLW  10
001C:  MOVWF  04
001D:  MOVF   00,W
001E:  BTFSC  03.2
001F:  GOTO   028
0020:  GOTO   026
0021:  NOP
0022:  NOP
0023:  NOP
0024:  NOP
0025:  NOP
0026:  DECFSZ 00,F
0027:  GOTO   021
0028:  GOTO   083 (RETURN)
.................... #fuses LP,PUT,NOWDT  
....................   
....................  
....................   
.................... #define LED       PIN_B3   // LED  
.................... #define ON_TIME   75       // Cas sepnuti rele  
.................... #define meridlo   PIN_B2   // Napetovy supervisor  
.................... #define RESET     PIN_B0   // Pridrzeni RESETu  
....................   
.................... void rele1()   // Sepnuti prvniho rele  
.................... {  
....................    output_low(PIN_A1);  
*
0004:  BSF    03.5
0005:  BCF    05.1
0006:  BCF    03.5
0007:  BCF    05.1
....................    output_low(PIN_B4);  
0008:  BSF    03.5
0009:  BCF    06.4
000A:  BCF    03.5
000B:  BCF    06.4
....................    delay_ms(ON_TIME);  
000C:  MOVLW  C7
000D:  MOVWF  0C
000E:  DECFSZ 0C,F
000F:  GOTO   00E
0010:  NOP
0011:  NOP
....................    output_high(PIN_A1);  
0012:  BSF    03.5
0013:  BCF    05.1
0014:  BCF    03.5
0015:  BSF    05.1
....................    output_high(PIN_B4);  
0016:  BSF    03.5
0017:  BCF    06.4
0018:  BCF    03.5
0019:  BSF    06.4
001A:  GOTO   07E (RETURN)
.................... }  
....................   
.................... void motor()   // Sepnuti motoru  
.................... {  
....................    output_low(pin_A2);  
*
0029:  BSF    03.5
002A:  BCF    05.2
002B:  BCF    03.5
002C:  BCF    05.2
....................    output_low(pin_B1);  
002D:  BSF    03.5
002E:  BCF    06.1
002F:  BCF    03.5
0030:  BCF    06.1
....................    output_low(PIN_A4);  
0031:  BSF    03.5
0032:  BCF    05.4
0033:  BCF    03.5
0034:  BCF    05.4
....................    delay_ms(ON_TIME);  
0035:  MOVLW  C7
0036:  MOVWF  0C
0037:  DECFSZ 0C,F
0038:  GOTO   037
0039:  NOP
003A:  NOP
....................    output_high(pin_A2);  
003B:  BSF    03.5
003C:  BCF    05.2
003D:  BCF    03.5
003E:  BSF    05.2
....................    output_high(pin_B1);  
003F:  BSF    03.5
0040:  BCF    06.1
0041:  BCF    03.5
0042:  BSF    06.1
....................    output_high(PIN_A4);  
0043:  BSF    03.5
0044:  BCF    05.4
0045:  BCF    03.5
0046:  BSF    05.4
0047:  GOTO   088 (RETURN)
.................... }  
....................   
....................   
.................... void main()  
.................... {  
0048:  CLRF   04
0049:  MOVLW  1F
004A:  ANDWF  03,F
....................   
....................    setup_counters(RTCC_INTERNAL,WDT_18MS);  
004B:  MOVLW  08
004C:  MOVWF  0C
004D:  BTFSS  0C.3
004E:  GOTO   057
004F:  MOVLW  07
0050:  CLRF   01
0051:  MOVLW  81
0052:  MOVWF  04
0053:  MOVF   00,W
0054:  ANDLW  C0
0055:  IORLW  0F
0056:  MOVWF  00
0057:  CLRWDT
0058:  MOVLW  81
0059:  MOVWF  04
005A:  MOVF   00,W
005B:  ANDLW  C0
005C:  IORWF  0C,W
005D:  MOVWF  00
....................   
....................    output_high(RESET);  
005E:  BSF    03.5
005F:  BCF    06.0
0060:  BCF    03.5
0061:  BSF    06.0
....................   
....................    port_b_pullups (true);  
0062:  BSF    03.5
0063:  BCF    01.7
....................   
....................    output_high(LED);  
0064:  BCF    06.3
0065:  BCF    03.5
0066:  BSF    06.3
....................    delay_ms(ON_TIME);  
0067:  MOVLW  C7
0068:  MOVWF  0C
0069:  DECFSZ 0C,F
006A:  GOTO   069
006B:  NOP
006C:  NOP
....................    output_low(LED);  
006D:  BSF    03.5
006E:  BCF    06.3
006F:  BCF    03.5
0070:  BCF    06.3
....................   
....................      if (!input(pin_B5))  
0071:  BSF    03.5
0072:  BSF    06.5
0073:  BCF    03.5
0074:  BTFSC  06.5
0075:  GOTO   07A
....................      {  
....................          port_b_pullups (false);  
0076:  BSF    03.5
0077:  BSF    01.7
....................          goto chyba;  
0078:  GOTO   086
0079:  BCF    03.5
....................      }  
....................   
....................    port_b_pullups (false);  
007A:  BSF    03.5
007B:  BSF    01.7
....................    rele1();  
007C:  BCF    03.5
007D:  GOTO   004
....................   
....................    delay_ms(28000);  
007E:  MOVLW  70
007F:  MOVWF  0F
0080:  MOVLW  FA
0081:  MOVWF  10
0082:  GOTO   01B
0083:  DECFSZ 0F,F
0084:  GOTO   080
0085:  BSF    03.5
....................   
.................... chyba:  
....................    motor();  
0086:  BCF    03.5
0087:  GOTO   029
....................    output_low(RESET);  
0088:  BSF    03.5
0089:  BCF    06.0
008A:  BCF    03.5
008B:  BCF    06.0
.................... }  
....................  
008C:  SLEEP