CCS PCB C Compiler, Version 4.049, 24802 04-mei-10 09:30 Filename: Useless.lst ROM used: 111 words (22%) Largest free fragment is 401 RAM used: 4 (17%) at main() level 6 (25%) worst case Stack: 2 locations * 0000: MOVWF 05 0001: GOTO 025 0002: GOTO 004 0003: GOTO 016 .................... #include <10F206.h> .................... //////// Standard Header file for the PIC10F206 device //////////////// .................... #device PIC10F206 .................... #list .................... .................... #FUSES NOWDT //No Watch Dog Timer .................... #FUSES MCLR //No Master Clear pin .................... #FUSES NOPROTECT //No code protected from reads .................... #use delay(clock=4000000) 0004: MOVF 0D,W 0005: BTFSC 03.2 0006: GOTO 015 0007: MOVLW 01 0008: MOVWF 09 0009: CLRF 08 000A: DECFSZ 08,F 000B: GOTO 00A 000C: DECFSZ 09,F 000D: GOTO 009 000E: MOVLW 4A 000F: MOVWF 08 0010: DECFSZ 08,F 0011: GOTO 010 0012: GOTO 013 0013: DECFSZ 0D,F 0014: GOTO 007 0015: RETLW 00 .................... #define set_options(value) {#ASM \ .................... MOVLW value \ .................... OPTION \ .................... #ENDASM} .................... #define SWITCH PIN_B0 .................... #define FET PIN_B1 .................... #define SERVO PIN_B2 .................... #define NOMCLR PIN_B3 .................... .................... void SWITCH_UIT_ZETTEN() .................... { .................... output_high(SERVO); 0016: BCF 0A.2 0017: MOVF 0A,W 0018: TRIS 6 0019: BSF 06.2 * 0028: MOVLW FF 0029: MOVWF 0A .................... delay_us(2000); * 001A: MOVLW 02 001B: MOVWF 0D 001C: CALL 004 .................... output_low(SERVO); 001D: BCF 0A.2 001E: MOVF 0A,W 001F: TRIS 6 0020: BCF 06.2 .................... delay_ms(18); 0021: MOVLW 12 0022: MOVWF 0D 0023: CALL 004 .................... } 0024: RETLW 00 .................... .................... void TERUG_BAKKIE_IN() .................... { .................... int i; .................... for(i=0; i <30;i++)//rechtsom = terug het bakkie in...//was 20 * 0043: CLRF 0C 0044: MOVLW 1D 0045: MOVWF 08 0046: MOVF 0C,W 0047: SUBWF 08,W 0048: BTFSS 03.0 0049: GOTO 068 .................... { .................... output_high(SERVO); 004A: BCF 0A.2 004B: MOVF 0A,W 004C: TRIS 6 004D: BSF 06.2 .................... delay_us(500); 004E: MOVLW A6 004F: MOVWF 08 0050: DECFSZ 08,F 0051: GOTO 050 0052: NOP .................... output_low(SERVO); 0053: BCF 0A.2 0054: MOVF 0A,W 0055: TRIS 6 0056: BCF 06.2 .................... delay_ms(20);// was 40 0057: MOVLW 14 0058: MOVWF 0D 0059: CALL 004 .................... if(input(PIN_B0)) 005A: BSF 0A.0 005B: MOVF 0A,W 005C: TRIS 6 005D: BTFSS 06.0 005E: GOTO 066 .................... { .................... do .................... { .................... SWITCH_UIT_ZETTEN(); 005F: CALL 016 .................... }while(input(PIN_B0)); 0060: BSF 0A.0 0061: MOVF 0A,W 0062: TRIS 6 0063: BTFSC 06.0 0064: GOTO 05F .................... i = 0; 0065: CLRF 0C .................... } .................... } 0066: INCF 0C,F 0067: GOTO 044 .................... } .................... .................... int i; .................... .................... main() .................... { * 0025: MOVLW DF 0026: OPTION 0027: CLRF 04 .................... setup_comparator(NC_NC); * 002A: MOVLW 27 002B: MOVWF 07 002C: MOVF 00,W 002D: MOVLW 03 002E: MOVWF 08 002F: DECFSZ 08,F 0030: GOTO 02F 0031: MOVF 07,W .................... // Enable pull-ups, wake-up on change, and Pin B2 for normal i/o. .................... set_options(0x1F); 0032: MOVLW 1F 0033: OPTION .................... output_high(FET); //servo enable 0034: BCF 0A.1 0035: MOVF 0A,W 0036: TRIS 6 0037: BSF 06.1 .................... .................... do .................... { .................... SWITCH_UIT_ZETTEN(); 0038: CALL 016 .................... }while(input(PIN_B0)); 0039: BSF 0A.0 003A: MOVF 0A,W 003B: TRIS 6 003C: BTFSC 06.0 003D: GOTO 038 .................... .................... .................... if(!(input(PIN_B0))) 003E: BSF 0A.0 003F: MOVF 0A,W 0040: TRIS 6 0041: BTFSC 06.0 0042: GOTO 068 .................... { .................... TERUG_BAKKIE_IN(); .................... } .................... .................... output_low(FET); //servo disable * 0068: BCF 0A.1 0069: MOVF 0A,W 006A: TRIS 6 006B: BCF 06.1 .................... output_low(SERVO); 006C: BCF 0A.2 006D: MOVF 0A,W 006E: TRIS 6 006F: BCF 06.2 .................... sleep(); 0070: SLEEP .................... .................... while(1); 0071: GOTO 071 .................... } 0072: SLEEP Configuration Fuses: Word 1: 0FFB MCLR NOPROTECT NOWDT