Since the spaces are gone in previous post , the compiler may display errors on compile .. Here is the code again .
Code:'**************************************************************** '* Name : UNTITLED.BAS * '* Author : BURAK GÜNAY * '* Notice : Copyright (c) 2014 [select VIEW...EDITOR OPTIONS] * '* : All Rights Reserved * '* Date : 6.5.2014 * '* Version : 1.0 * '* Notes : 16F1824 RA<5:3> input mode * '* : * '**************************************************************** #header errorlevel -303 ; suppress Program word too large #ENDHEADER #config __CONFIG _CONFIG1, _FOSC_INTOSC & _WDTE_OFF & _PWRTE_ON & _MCLRE_OFF & _CP_OFF & _CPD_OFF & _BOREN_OFF & _CLKOUTEN_OFF & _IESO_OFF & _FCMEN_OFF __CONFIG _CONFIG2, _WRT_OFF & _PLLEN_OFF & _STVREN_OFF & _BORV_19 & _LVP_OFF #ENDCONFIG '--------------------------------------------------------------------- DEFINE OSC 4 PORTA=%000000 : ANSELA=%00000 : TRISA=%111000 PORTC=%00000000 : ANSELC=%0000000 : TRISC=%00000000 START: IF PORTA.3=1 THEN GOTO LOOP1 ELSE GOTO LOOP2 ENDIF GOTO START LOOP1: IF PORTA.4=1 THEN PORTC.0=1 ELSE PORTC.0=0 pause 500 PORTC.0= 1 pause 500 PORTC.0= 0 ENDIF GOTO START LOOP2: IF PORTA.5 = 1 THEN PORTC.0 = 1 ELSE PORTC.0 = 0 ENDIF GOTO START




Bookmarks