Blame | Last modification | View Log | Download
CCS PCW C Compiler, Version 3.110, 15448Filename: d:\@kaklik\programy\pic_c\robot\solarni_robot\main.LSTROM used: 47 (5%)Largest free fragment is 977RAM used: 3 (4%) at main() level4 (6%) worst caseStack: 1 locations*0000: MOVLW 000001: MOVWF 0A0002: GOTO 0120003: NOP.................... #include "D:\@Kaklik\programy\PIC_C\robot\solarni_robot\main.h".................... #include <16F84.h>.................... //////// Standard Header file for the PIC16F84 device ////////////////.................... #device PIC16F84.................... #list........................................ #use delay(clock=32768)0004: MOVLW 100005: MOVWF 040006: MOVF 00,W0007: BTFSC 03.20008: GOTO 0110009: GOTO 00F000A: NOP000B: NOP000C: NOP000D: NOP000E: NOP000F: DECFSZ 00,F0010: GOTO 00A0011: GOTO 02B (RETURN).................... #fuses LP,PUT,NOWDT................................................................................ #define LED pin_B3.................... #define ON_TIME 100 // Cas sepnuti rele.................... #define meridlo pin_B2........................................ void rele1() // Sepnuti prvniho rele.................... {.................... output_low(PIN_A1);.................... output_low(PIN_B4);.................... delay_ms(ON_TIME);.................... output_high(PIN_A1);.................... output_high(PIN_B4);.................... }........................................ void motor().................... {.................... output_low(pin_A2);.................... output_low(pin_B1);.................... output_low(PIN_A4);.................... delay_ms(ON_TIME);.................... output_high(pin_A2);.................... output_high(pin_B1);.................... output_high(PIN_A4);.................... }........................................ void rele2().................... {.................... output_low(pin_B5);.................... output_low(pin_A0);.................... delay_ms(ON_TIME);.................... output_high(pin_A0);.................... output_high(pin_B5);.................... }........................................ void main().................... {0012: CLRF 040013: MOVLW 1F0014: ANDWF 03,F.................... output_high(pin_B0);0015: BSF 03.50016: BCF 06.00017: BCF 03.50018: BSF 06.0........................................ While (true).................... {.................... output_high(LED);0019: BSF 03.5001A: BCF 06.3001B: BCF 03.5001C: BSF 06.3.................... delay_ms(25); //vystavni blikani001D: MOVLW 42001E: MOVWF 0C001F: DECFSZ 0C,F0020: GOTO 01F0021: NOP.................... output_low(LED);0022: BSF 03.50023: BCF 06.30024: BCF 03.50025: BCF 06.3.................... Delay_ms(1000);0026: MOVLW 040027: MOVWF 0F0028: MOVLW FA0029: MOVWF 10002A: GOTO 004002B: DECFSZ 0F,F002C: GOTO 028.................... }002D: GOTO 019........................................ /* rele1();........................................ while (!input(meridlo))........................................ delay_ms(100);........................................ rele2();........................................ while (!input(meridlo))........................................ delay_ms(100);........................................ motor();........................................ output_low(pin_B0);.................... */.................... }....................002E: SLEEP