Subversion Repositories svnkaklik

Rev

Rev 410 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download

CCS PCM C Compiler, Version 3.221, 27853               14-VI-05 22:12

               Filename: D:\KAKLIK\programy\PIC_C\mereni\otmer\otmer.LST

               ROM used: 122 words (12%)
                         Largest free fragment is 902
               RAM used: 5 (7%) at main() level
                         8 (12%) worst case
               Stack:    1 locations

*
0000:  MOVLW  00
0001:  MOVWF  0A
0002:  GOTO   044
0003:  NOP
....................  #include "D:\KAKLIK\programy\PIC_C\mereni\otmer\otmer.h" 
....................  #include <16F84.h> 
....................  //////// Standard Header file for the PIC16F84 device ////////////////  
.................... #device PIC16F84  
.................... #list  
....................  
.................... #fuses NOWDT,XT, NOPUT, NOPROTECT  
.................... #use delay(clock=4000000)  
*
002F:  MOVLW  11
0030:  MOVWF  04
0031:  MOVF   00,W
0032:  BTFSC  03.2
0033:  GOTO   043
0034:  MOVLW  01
0035:  MOVWF  0D
0036:  CLRF   0C
0037:  DECFSZ 0C,F
0038:  GOTO   037
0039:  DECFSZ 0D,F
003A:  GOTO   036
003B:  MOVLW  4A
003C:  MOVWF  0C
003D:  DECFSZ 0C,F
003E:  GOTO   03D
003F:  NOP
0040:  NOP
0041:  DECFSZ 00,F
0042:  GOTO   034
0043:  RETLW  00
....................   
....................  
....................   
.................... #define DATA   PIN_A1  
.................... #define CP     PIN_A0  
.................... #define STROBE PIN_A2  
....................   
.................... #include "shift_reg.c" 
....................  ////////////////////////////////////////////////////////////////////////////////  
.................... //                   KNIHOVNA PRO OVLADANI POSUVNEHO REGISTRU  
.................... //  
.................... ////////////////////////////////////////////////////////////////////////////////  
.................... // definice  
.................... //#define DATA   PIN_A1  
.................... //#define CP     PIN_A0  
.................... //#define STROBE PIN_A2  
....................   
.................... void putreg(unsigned int8 out)   // zapise do registru 8bitovou promenou.  
.................... {  
.................... int8 i;  
....................    output_low(STROBE);  
*
0004:  BSF    03.5
0005:  BCF    05.2
0006:  BCF    03.5
0007:  BCF    05.2
....................      
....................    for(i=0;i<=7;i++)  
0008:  CLRF   13
0009:  MOVF   13,W
000A:  SUBLW  07
000B:  BTFSS  03.0
000C:  GOTO   02A
....................    {  
....................       output_bit(DATA,bit_test(out,7-i));  
000D:  MOVF   13,W
000E:  SUBLW  07
000F:  MOVWF  14
0010:  MOVF   12,W
0011:  MOVWF  0C
0012:  MOVF   14,W
0013:  MOVWF  0D
0014:  BTFSC  03.2
0015:  GOTO   01A
0016:  BCF    03.0
0017:  RRF    0C,F
0018:  DECFSZ 0D,F
0019:  GOTO   016
001A:  BTFSC  0C.0
001B:  GOTO   01E
001C:  BCF    05.1
001D:  GOTO   01F
001E:  BSF    05.1
001F:  BSF    03.5
0020:  BCF    05.1
....................       output_low(CP);  
0021:  BCF    05.0
0022:  BCF    03.5
0023:  BCF    05.0
....................       output_high(CP);  
0024:  BSF    03.5
0025:  BCF    05.0
0026:  BCF    03.5
0027:  BSF    05.0
....................    }  
0028:  INCF   13,F
0029:  GOTO   009
....................    output_high(STROBE);  
002A:  BSF    03.5
002B:  BCF    05.2
002C:  BCF    03.5
002D:  BSF    05.2
.................... }  
002E:  RETLW  00
.................... void reg_shift_left()  
.................... {  
.................... }  
.................... void reg_shift_right()  
.................... {  
.................... }  
....................  
....................   
.................... void main()  
.................... {  
*
0044:  CLRF   04
0045:  MOVLW  1F
0046:  ANDWF  03,F
.................... int n=0;  
0047:  CLRF   0F
.................... int i;  
....................    putreg(1);  
0048:  MOVLW  01
0049:  MOVWF  12
004A:  CALL   004
....................    while(true)  
....................    {  
....................       i=1;  
004B:  MOVLW  01
004C:  MOVWF  10
....................       for(n=0;n<=7;n++)  
004D:  CLRF   0F
004E:  MOVF   0F,W
004F:  SUBLW  07
0050:  BTFSS  03.0
0051:  GOTO   05C
....................       {  
....................          putreg(i);  
0052:  MOVF   10,W
0053:  MOVWF  12
0054:  CALL   004
....................          i=i<<1;  
0055:  BCF    03.0
0056:  RLF    10,F
....................          Delay_ms(50);  
0057:  MOVLW  32
0058:  MOVWF  11
0059:  CALL   02F
....................       };  
005A:  INCF   0F,F
005B:  GOTO   04E
....................       i=0x80;  
005C:  MOVLW  80
005D:  MOVWF  10
....................       for(n=0;n<=7;n++)  
005E:  CLRF   0F
005F:  MOVF   0F,W
0060:  SUBLW  07
0061:  BTFSS  03.0
0062:  GOTO   06D
....................       {  
....................          putreg(i);  
0063:  MOVF   10,W
0064:  MOVWF  12
0065:  CALL   004
....................          i=i>>1;  
0066:  BCF    03.0
0067:  RRF    10,F
....................          Delay_ms(50);  
0068:  MOVLW  32
0069:  MOVWF  11
006A:  CALL   02F
....................       };  
006B:  INCF   0F,F
006C:  GOTO   05F
....................    }  
006D:  GOTO   04B
....................   
....................    while(true)  
....................    {  
....................       putreg(~n);  
006E:  MOVF   0F,W
006F:  MOVWF  11
0070:  COMF   11,F
0071:  MOVF   11,W
0072:  MOVWF  12
0073:  CALL   004
....................       Delay_ms(100);  
0074:  MOVLW  64
0075:  MOVWF  11
0076:  CALL   02F
....................       n++;  
0077:  INCF   0F,F
....................    }  
0078:  GOTO   06E
.................... }  
....................  
0079:  SLEEP

Configuration Fuses:
   Word  1: 3FF9   XT NOWDT NOPUT NOPROTECT