;~ File : .c
;~ File : E:/PROGRAMY INSTALOVANE/FED/PIXIE/PreProc.C
;~ File : E:/PROGRAMY INSTALOVANE/FED/PIXIE/Libs/ProcIncs/P16F628.h

;~ Line : 00003 typedef unsigned char BYTE;


;~ Line : 00004 typedef unsigned char FileReg;


;~ Line : 00005 typedef unsigned int WORD;


;~ Line : 00006 typedef unsigned long ulong;


;~ Line : 00079 extern FileReg INDF ;


;~ Line : 00080 extern FileReg TMR0 ;


;~ Line : 00081 extern FileReg PCL ;


;~ Line : 00082 extern FileReg STATUS ;


;~ Line : 00083 extern FileReg FSR ;


;~ Line : 00084 extern FileReg PORTA ;


;~ Line : 00085 extern FileReg PORTB ;


;~ Line : 00086 extern FileReg PCLATH ;


;~ Line : 00087 extern FileReg INTCON ;


;~ Line : 00088 extern FileReg PIR1 ;


;~ Line : 00089 extern FileReg TMR1L ;


;~ Line : 00090 extern FileReg TMR1H ;


;~ Line : 00091 extern FileReg T1CON ;


;~ Line : 00092 extern FileReg TMR2 ;


;~ Line : 00093 extern FileReg T2CON ;


;~ Line : 00094 extern FileReg CCPR1L ;


;~ Line : 00095 extern FileReg CCPR1H ;


;~ Line : 00096 extern FileReg CCP1CON ;


;~ Line : 00097 extern FileReg RCSTA ;


;~ Line : 00098 extern FileReg TXREG ;


;~ Line : 00099 extern FileReg RCREG ;


;~ Line : 00100 extern FileReg CMCON ;


;~ Line : 00101 extern FileReg OPTION_REG ;


;~ Line : 00102 extern FileReg TRISA ;


;~ Line : 00103 extern FileReg TRISB ;


;~ Line : 00104 extern FileReg PIE1 ;


;~ Line : 00105 extern FileReg PCON ;


;~ Line : 00106 extern FileReg PR2 ;


;~ Line : 00107 extern FileReg TXSTA ;


;~ Line : 00108 extern FileReg SPBRG ;


;~ Line : 00109 extern FileReg EEDATA ;


;~ Line : 00110 extern FileReg EEADR ;


;~ Line : 00111 extern FileReg EECON1 ;


;~ Line : 00112 extern FileReg EECON2 ;


;~ Line : 00113 extern FileReg VRCON ;


;~ Line : 00114 


;~ Line : 00152 enum T_STATUS {


;~ Line : 00153 IRP =0x0007,RP1 =0x0006,RP0 =0x0005,NOT_TO =0x0004,NOT_PD =0x0003,Z =0x0002,DC =0x0001,C =0x0000


;~ Line : 00154 };


;~ Line : 00155 


;~ Line : 00156 enum T_INTCON {


;~ Line : 00157 GIE =0x0007,PEIE =0x0006,T0IE =0x0005,INTE =0x0004,RBIE =0x0003,T0IF =0x0002,INTF =0x0001,RBIF =0x0000


;~ Line : 00158 };


;~ Line : 00159 


;~ Line : 00160 enum T_PIR1 {


;~ Line : 00161 EEIF=7,CMIF =0x0006,RCIF=5,TXIF=4,CCP1IF=2,TMR2IF=1,TMR1IF=0


;~ Line : 00162 };


;~ Line : 00163 


;~ Line : 00164 enum T_T1CON {


;~ Line : 00165 T1CKPS1 =0x0005,T1CKPS0 =0x0004,T1OSCEN =0x0003,NOT_T1SYNC =0x0002,TMR1CS =0x0001,TMR1ON =0x0000


;~ Line : 00166 };


;~ Line : 00167 


;~ Line : 00168 enum T_T2CON {


;~ Line : 00169 TOUTPS3 =0x0006,TOUTPS2 =0x0005,TOUTPS1 =0x0004,TOUTPS0 =0x0003,TMR2ON =0x0002,T2CKPS1 =0x0001,T2CKPS0 =0x0000


;~ Line : 00170 };


;~ Line : 00171 


;~ Line : 00172 enum T_CCP1CON {


;~ Line : 00173 CCP1X =0x0005,CCP1Y =0x0004,CCP1M3 =0x0003,CCP1M2 =0x0002,CCP1M1 =0x0001,CCP1M0 =0x0000


;~ Line : 00174 };


;~ Line : 00175 


;~ Line : 00176 enum T_RCSTA {


;~ Line : 00177 SPEN =0x0007,RX9 =0x0006,SREN =0x0005,CREN =0x0004,ADDEN =0x0003,FERR =0x0002,OERR =0x0001,RX9D =0x0000


;~ Line : 00178 };


;~ Line : 00179 


;~ Line : 00180 enum T_CMCON {


;~ Line : 00181 C2OUT=0x0007,C1OUT=0x0006,C2INV=0x0005,C1INV=0x0004,


;~ Line : 00182 CIS=0x0003,CM2=0x0002,CM1=0x0001,CM0=0x0000


;~ Line : 00183 };


;~ Line : 00184 


;~ Line : 00185 enum T_OPTION {


;~ Line : 00186 NOT_RBPU =0x0007,INTEDG =0x0006,T0CS =0x0005,T0SE =0x0004,PSA =0x0003,PS2 =0x0002,PS1 =0x0001,PS0 =0x0000


;~ Line : 00187 };


;~ Line : 00188 


;~ Line : 00189 enum T_PIE1 {


;~ Line : 00190 EEIE =0x0007,CMIE =0x0006,RCIE =0x0005,TXIE =0x0004,CCP1IE =0x0002,


;~ Line : 00191 TMR2IE =0x0001,TMR1IE =0x0000


;~ Line : 00192 };


;~ Line : 00193 


;~ Line : 00194 enum T_PCON {


;~ Line : 00195 OSCF=0x0003,NOT_POR =0x0001,NOT_BO =0x0000


;~ Line : 00196 };


;~ Line : 00197 


;~ Line : 00198 enum T_TXSTA {


;~ Line : 00199 CSRC =0x0007,TX9 =0x0006,TXEN =0x0005,SYNC =0x0004,BRGH =0x0002,TRMT =0x0001,TX9D =0x0000


;~ Line : 00200 };


;~ Line : 00201 


;~ Line : 00202 enum T_EECON1 {


;~ Line : 00203 WRERR =0x0003,WREN =0x0002,WR =0x0001,RD =0x0000


;~ Line : 00204 };


;~ Line : 00205 


;~ Line : 00206 enum T_VRCON {


;~ Line : 00207 


;~ Line : 00208 VREN=7,VROE=6,VRR=5,VR3=0x3,VR2=0x2,VR1=0x1,VR0=0


;~ Line : 00209 };


;~ Line : 00214 struct sPort


;~ Line : 00215 {


;~ Line : 00216 unsigned char B0:1;


;~ Line : 00217 unsigned char B1:1;


;~ Line : 00218 unsigned char B2:1;


;~ Line : 00219 unsigned char B3:1;


;~ Line : 00220 unsigned char B4:1;


;~ Line : 00221 unsigned char B5:1;


;~ Line : 00222 unsigned char B6:1;


;~ Line : 00223 unsigned char B7:1;


;~ Line : 00224 };


;~ Line : 00225 


;~ Line : 00226 extern sPort PA;


;~ Line : 00228 extern sPort PB;


;~ Line : 00230 extern sPort PC;


;~ Line : 00232 extern sPort PD;


;~ Line : 00234 extern sPort PE;

;~ File : E:/PROGRAMY INSTALOVANE/FED/PIXIE/Libs/ProcIncs/P16F628_bits.h

;~ Line : 00005 extern bit bC;


;~ Line : 00007 extern bit bDC;


;~ Line : 00009 extern bit bIRP;


;~ Line : 00011 extern bit bNOT_PD;


;~ Line : 00013 extern bit bNOT_TO;


;~ Line : 00015 extern bit bRP0;


;~ Line : 00017 extern bit bRP1;


;~ Line : 00019 extern bit bZ;


;~ Line : 00021 


;~ Line : 00022 extern bit bGIE;


;~ Line : 00024 extern bit bINTE;


;~ Line : 00026 extern bit bINTF;


;~ Line : 00028 extern bit bPEIE;


;~ Line : 00030 extern bit bRBIE;


;~ Line : 00032 extern bit bRBIF;


;~ Line : 00034 extern bit bT0IE;


;~ Line : 00036 extern bit bT0IF;


;~ Line : 00038 


;~ Line : 00039 extern bit bCCP1IF;


;~ Line : 00041 extern bit bCMIF;


;~ Line : 00043 extern bit bEEIF;


;~ Line : 00045 extern bit bRCIF;


;~ Line : 00047 extern bit bTMR1IF;


;~ Line : 00049 extern bit bTMR2IF;


;~ Line : 00051 extern bit bTXIF;


;~ Line : 00053 


;~ Line : 00054 extern bit bNOT_T1SYNC;


;~ Line : 00056 extern bit bT1CKPS0;


;~ Line : 00058 extern bit bT1CKPS1;


;~ Line : 00060 extern bit bT1OSCEN;


;~ Line : 00062 extern bit bTMR1CS;


;~ Line : 00064 extern bit bTMR1ON;


;~ Line : 00066 


;~ Line : 00067 extern bit bT2CKPS0;


;~ Line : 00069 extern bit bT2CKPS1;


;~ Line : 00071 extern bit bTMR2ON;


;~ Line : 00073 extern bit bTOUTPS0;


;~ Line : 00075 extern bit bTOUTPS1;


;~ Line : 00077 extern bit bTOUTPS2;


;~ Line : 00079 extern bit bTOUTPS3;


;~ Line : 00081 


;~ Line : 00082 extern bit bCCP1M0;


;~ Line : 00084 extern bit bCCP1M1;


;~ Line : 00086 extern bit bCCP1M2;


;~ Line : 00088 extern bit bCCP1M3;


;~ Line : 00090 extern bit bCCP1X;


;~ Line : 00092 extern bit bCCP1Y;


;~ Line : 00094 


;~ Line : 00095 extern bit bADEN;


;~ Line : 00097 extern bit bCREN;


;~ Line : 00099 extern bit bFERR;


;~ Line : 00101 extern bit bOERR;


;~ Line : 00103 extern bit bRX9;


;~ Line : 00105 extern bit bRX9D;


;~ Line : 00107 extern bit bSPEN;


;~ Line : 00109 extern bit bSREN;


;~ Line : 00111 


;~ Line : 00112 extern bit bC1INV;


;~ Line : 00114 extern bit bC1OUT;


;~ Line : 00116 extern bit bC2INV;


;~ Line : 00118 extern bit bC2OUT;


;~ Line : 00120 extern bit bCIS;


;~ Line : 00122 extern bit bCM0;


;~ Line : 00124 extern bit bCM1;


;~ Line : 00126 extern bit bCM2;


;~ Line : 00128 


;~ Line : 00129 extern bit bINTEDG;


;~ Line : 00131 extern bit bNOT_RBPU;


;~ Line : 00133 extern bit bPS0;


;~ Line : 00135 extern bit bPS1;


;~ Line : 00137 extern bit bPS2;


;~ Line : 00139 extern bit bPSA;


;~ Line : 00141 extern bit bT0CS;


;~ Line : 00143 extern bit bT0SE;


;~ Line : 00145 


;~ Line : 00146 extern bit bCCP1IE;


;~ Line : 00148 extern bit bCMIE;


;~ Line : 00150 extern bit bEEIE;


;~ Line : 00152 extern bit bRCIE;


;~ Line : 00154 extern bit bTMR1IE;


;~ Line : 00156 extern bit bTMR2IE;


;~ Line : 00158 extern bit bTXIE;


;~ Line : 00160 


;~ Line : 00161 extern bit bNOT_BO;


;~ Line : 00163 extern bit bNOT_BOR;


;~ Line : 00165 extern bit bNOT_POR;


;~ Line : 00167 extern bit bOSCF;


;~ Line : 00169 


;~ Line : 00170 extern bit bBRGH;


;~ Line : 00172 extern bit bCSRC;


;~ Line : 00174 extern bit bSYNC;


;~ Line : 00176 extern bit bTRMT;


;~ Line : 00178 extern bit bTX9;


;~ Line : 00180 extern bit bTX9D;


;~ Line : 00182 extern bit bTXEN;


;~ Line : 00184 


;~ Line : 00185 extern bit bRD;


;~ Line : 00187 extern bit bWR;


;~ Line : 00189 extern bit bWREN;


;~ Line : 00191 extern bit bWRERR;


;~ Line : 00193 


;~ Line : 00194 extern bit bVR0;


;~ Line : 00196 extern bit bVR1;


;~ Line : 00198 extern bit bVR2;


;~ Line : 00200 extern bit bVR3;


;~ Line : 00202 extern bit bVREN;


;~ Line : 00204 extern bit bVROE;


;~ Line : 00206 extern bit bVRR;

;~ File : E:/PROGRAMY INSTALOVANE/FED/PIXIE/Libs/PortBits.h

;~ Line : 00009 extern bit bRA0,bRA1,bRA2,bRA3,bRA4,bRA5,bRA6,bRA7;


;~ Line : 00010 extern bit bTRA0,bTRA1,bTRA2,bTRA3,bTRA4,bTRA5,bTRA6,bTRA7;


;~ Line : 00011 extern bit bRB0,bRB1,bRB2,bRB3,bRB4,bRB5,bRB6,bRB7;


;~ Line : 00012 extern bit bTRB0,bTRB1,bTRB2,bTRB3,bTRB4,bTRB5,bTRB6,bTRB7;


;~ Line : 00013 extern bit bRC0,bRC1,bRC2,bRC3,bRC4,bRC5,bRC6,bRC7;


;~ Line : 00014 extern bit bTRC0,bTRC1,bTRC2,bTRC3,bTRC4,bTRC5,bTRC6,bTRC7;


;~ Line : 00015 extern bit bRD0,bRD1,bRD2,bRD3,bRD4,bRD5,bRD6,bRD7;


;~ Line : 00016 extern bit bTRD0,bTRD1,bTRD2,bTRD3,bTRD4,bTRD5,bTRD6,bTRD7;


;~ Line : 00017 extern bit bRE0,bRE1,bRE2,bRE3,bRE4,bRE5,bRE6,bRE7;


;~ Line : 00018 extern bit bTRE0,bTRE1,bTRE2,bTRE3,bTRE4,bTRE5,bTRE6,bTRE7;

;~ File : C:/Documents and Settings/Marek/Desktop/Bakalarka 2009/PIC628A program/StpDrvPic628/StepperDriverPic628_Auto.h

;~ Line : 00022 void UserInitialise();


;~ Line : 00023 void UserInterrupt();


;~ Line : 00024 void UserLoop();

;~ File : C:/DOCUMENTS AND SETTINGS/Marek/Desktop/BAKALARKA 2009/PIC628A PROGRAM/STPDRVPIC628/STEPPERDRIVERPIC628_USER.C

;~ Line : 00021 bool freeride;


;~ Line : 00035 void SendChar(char send)


;~ Line : 00036 {


; Function : SendChar
;======================
; Depth=0,LocOpt Size=1,Locals Offset=0
;
;  Parameter send optimised to (LocOpt+0x0)
module "SendChar"
SendChar::
;~ Line : 00037
 bsf STATUS,RP0
;~ Line : 00038
 btfss TXSTA,TRMT
;~ Line : 00039
 goto $-1
;~ Line : 00040
 bcf STATUS,RP0

;~ Line : 00041 TXREG = send;

movfw H'21'

movwf H'19'

;~ Line : 00042 }

SETPCLATH 0,SendChar,1
return
endmodule

;~ Line : 00043 


;~ Line : 00044 void SendCommand(char *command, char length)


;~ Line : 00045 {


; Function : SendCommand
;=========================
; Depth=1,LocOpt Size=5,Locals Offset=1
; Calls: SendChar(5)
;  Parameter command optimised to (LocOpt+0x3)
;  Parameter length optimised to (LocOpt+0x5)
;  Local Variable i optimised to (LocOpt+0x1)
module "SendCommand"
SendCommand::
_SexAD = 1
_PushD = 1
_LoadWD = 1
_CompSD = 1
_LoadPACCA = 1

;~ Line : 00046 int i;


;~ Line : 00047 SendChar(0x0D);

movlw 13
movwf (LocOpt+0x0)
SETPCLATH SendChar,SendCommand,1
call SendChar

;~ Line : 00048 SendChar(0x0A);

movlw 10
movwf (LocOpt+0x0)
SETPCLATH SendChar,0,1
call SendChar

;~ Line : 00049 for(i = 0; i < length; i++)

clrf H'22'
clrf 35
SETPCLATH SendCommand,0,0
L000025:
movfw 38

movwf ACC
SETPCLATH 0,SendCommand,1
call SexAD
call PushD
bcf STATUS,IRP
movlw 34
call LoadWD
call Pop2D
_Pop2D = 1
call CompSD
SETPCLATH L000031,0,0
skpnc
goto L000031
SETPCLATH SendCommand,L000031,0
L000027:

;~ Line : 00050 {


;~ Line : 00051 SendChar(*command);

bcf STATUS,IRP
movlw 36
SETPCLATH 0,SendCommand,1
call LoadWD
call LoadPACCA
movwf (LocOpt+0x0)
SETPCLATH SendChar,0,1
call SendChar

;~ Line : 00052 command++;

incf 37
incfsz H'24'
decf 37

;~ Line : 00053 }

SETPCLATH SendCommand,0,0
L000029:
incf 35
incfsz H'22'
decf 35
SETPCLATH L000025,SendCommand,1
goto L000025
SETPCLATH SendCommand,L000025,0
L000031:

;~ Line : 00054 SendChar(0x0D);

movlw 13
movwf (LocOpt+0x0)
SETPCLATH SendChar,SendCommand,1
call SendChar

;~ Line : 00055 SendChar(0x0A);

movlw 10
movwf (LocOpt+0x0)
SETPCLATH SendChar,0,1
call SendChar

;~ Line : 00056 }

SETPCLATH 0,0,1
return
endmodule

;~ Line : 00057 


;~ Line : 00058 void UserInterrupt()


;~ Line : 00059 {


; Function : UserInterrupt
;===========================
; Depth=2,LocOpt Size=1,Locals Offset=6
; Calls: SendChar(8),SendCommand(1)
;  Local Variable Recchar optimised to (LocOpt+0x6)
module "UserInterrupt"
UserInterrupt::
_LSEQ = 1
_DoSwitch = 1

;~ Line : 00060 


;~ Line : 00061 if(PIR1 & (1 << TMR2IF))

btfss (H'0C'+0),1
goto L000033
L000035:

;~ Line : 00062 {


;~ Line : 00063 ledCounter++;

incf  H'38'

;~ Line : 00064 if(ledCounter == 50)

movlw 50
subwf H'38',w
SETPCLATH L000038,UserInterrupt,0
skpz
goto L000038
SETPCLATH UserInterrupt,L000038,0
L000040:

;~ Line : 00065 {


;~ Line : 00066 


;~ Line : 00067 bRB3 = !bRB3;

andlw 0 
btfsc 6,3 
addlw 1 

SETPCLATH 0,UserInterrupt,0
bcf 6,3 
btfsc STATUS,Z 
bsf 6,3 






;~ Line : 00068 ledCounter = 0;

clrf H'38'

;~ Line : 00069 }

SETPCLATH UserInterrupt,0,0
L000038:

;~ Line : 00070 PIR1 &= ~(1 << TMR2IF);

movlw 253
andwf H'0C'

;~ Line : 00071 }

L000033:

;~ Line : 00072 if(PIR1 & (1 << TMR1IF))

btfss (H'0C'+0),0
goto L000043
L000045:

;~ Line : 00073 {


;~ Line : 00074 if(!stop)

btfsc (H'34'+0),1
goto L000048
L000050:

;~ Line : 00075 {


;~ Line : 00076 bRA2 = 0;

bcf 5,2

;~ Line : 00077 bRB4 = 0;

bcf 6,4

;~ Line : 00078 bRB0 = !bRB0;

movf 6,w 
andlw 1 


SETPCLATH 0,UserInterrupt,0
bcf 6,0 
btfsc STATUS,Z 
bsf 6,0 






;~ Line : 00079 bRB6 = !bRB6;

andlw 0 
btfsc 6,6 
addlw 1 

call LSEQ
movfw ACC 



bcf 6,6
btfss STATUS,Z
bsf 6,6

;~ Line : 00080 if((bRB0 == 1)||(bRB6 == 1)) steps++;

andlw 0
btfsc 6,0
addlw 1
addlw -1
SETPCLATH L000055,0,0
skpnz
goto L000055
SETPCLATH UserInterrupt,L000055,0
L000058:
andlw 0
btfsc 6,6
addlw 1
addlw -1
SETPCLATH L000053,UserInterrupt,0
skpz
goto L000053
SETPCLATH UserInterrupt,L000053,0
L000055:
incf  H'35'
L000053:

;~ Line : 00081 


;~ Line : 00082 if((steps == 10)&&(goalstep >= 10)&&(freeride == 0))

movlw 10
subwf H'35',w
SETPCLATH L000059,UserInterrupt,0
skpz
goto L000059
SETPCLATH UserInterrupt,L000059,0
L000065:
movlw 10
subwf H'36',w
SETPCLATH L000059,UserInterrupt,0
skpc
goto L000059
SETPCLATH UserInterrupt,L000059,0
L000064:
andlw 0
btfsc 52,2
addlw 1
bsf STATUS,C
iorlw 0
SETPCLATH L000059,UserInterrupt,0
skpz
goto L000059
SETPCLATH UserInterrupt,L000059,0
L000061:

;~ Line : 00083 {


;~ Line : 00084 SendChar(10);

movlw 10
movwf (LocOpt+0x0)
SETPCLATH SendChar,UserInterrupt,1
call SendChar

;~ Line : 00085 goalstep -= 10;

movlw 10
subwf  H'36'

;~ Line : 00086 steps = 0;

clrf H'35'

;~ Line : 00087 }

SETPCLATH UserInterrupt,0,0
L000059:

;~ Line : 00088 if((steps == 10)&&(freeride == 1))

movlw 10
subwf H'35',w
SETPCLATH L000066,UserInterrupt,0
skpz
goto L000066
SETPCLATH UserInterrupt,L000066,0
L000071:
andlw 0
btfsc 52,2
addlw 1
addlw -1
SETPCLATH L000066,UserInterrupt,0
skpz
goto L000066
SETPCLATH UserInterrupt,L000066,0
L000068:

;~ Line : 00089 {


;~ Line : 00090 SendChar(10);

movlw 10
movwf (LocOpt+0x0)
SETPCLATH SendChar,UserInterrupt,1
call SendChar

;~ Line : 00091 goalstep = 0;

clrf H'36'

;~ Line : 00092 steps = 0;

clrf H'35'

;~ Line : 00093 }

SETPCLATH UserInterrupt,0,0
L000066:

;~ Line : 00094 if((steps == goalstep)&&(freeride == 0))

movfw 54

subwf 53,w
SETPCLATH L000072,UserInterrupt,0
skpz
goto L000072
SETPCLATH UserInterrupt,L000072,0
L000077:
andlw 0
btfsc 52,2
addlw 1
bsf STATUS,C
iorlw 0
SETPCLATH L000072,UserInterrupt,0
skpz
goto L000072
SETPCLATH UserInterrupt,L000072,0
L000074:

;~ Line : 00095 {


;~ Line : 00096 SendChar(steps);

movfw steps

movwf (LocOpt+0x0)
SETPCLATH SendChar,UserInterrupt,1
call SendChar

;~ Line : 00097 steps = 0;

clrf H'35'

;~ Line : 00098 goalstep = 0;

clrf H'36'

;~ Line : 00099 stop = 1;

bsf 52,1

;~ Line : 00100 bRA2 = 1;

bsf 5,2

;~ Line : 00101 bRB4 = 1;

bsf 6,4

;~ Line : 00102 }

SETPCLATH UserInterrupt,0,0
L000072:

;~ Line : 00103 


;~ Line : 00104 }

L000048:

;~ Line : 00105 TMR1H = 0x90;

movlw 144
movwf H'0F'

;~ Line : 00106 PIR1 &= ~(1 << TMR1IF);

movlw 254
andwf H'0C'

;~ Line : 00107 }

L000043:

;~ Line : 00108 


;~ Line : 00109 if(PIR1 & (1 << RCIF))

btfss (H'0C'+0),5
goto L000078
L000080:

;~ Line : 00110 if((RCSTA & (1 << OERR))||(RCSTA & (1 << FERR)))

btfsc (H'18'+0),1
goto L000085
L000088:
btfss (H'18'+0),2
goto L000083
L000085:

;~ Line : 00111 {


;~ Line : 00112 


;~ Line : 00113 RCSTA &= ~(1 << CREN);

movlw 239
andwf H'18'

;~ Line : 00114 RCSTA |= (1 << CREN);

movlw 16
iorwf H'18'

;~ Line : 00115 }


;~ Line : 00116 else

SETPCLATH L000084,UserInterrupt,1
goto L000084
SETPCLATH UserInterrupt,L000084,0
L000083:

;~ Line : 00117 {


;~ Line : 00118 char Recchar = RCREG;

movfw 26

movwf H'27'

;~ Line : 00119 if(lastchar == '*')

movlw 42
subwf H'37',w
SETPCLATH L000090,UserInterrupt,0
skpz
goto L000090
SETPCLATH UserInterrupt,L000090,0
L000092:

;~ Line : 00120 lastchar = Recchar;

movfw H'27'

movwf H'37'

;~ Line : 00121 else

SETPCLATH L000091,UserInterrupt,1
goto L000091
SETPCLATH UserInterrupt,L000091,0
L000090:

;~ Line : 00122 {


;~ Line : 00123 switch(lastchar)

movfw lastchar

addlw -70
skpnz
goto L000100
addlw 4
skpnz
goto L000107
addlw -10
skpnz
goto L000114
addlw -6
skpnz
goto L000121
addlw -1
skpnz
goto L000128
addlw 40
skpnz
goto L000129
goto L000096

;~ Line : 00124 {


;~ Line : 00125 case('F'):

SETPCLATH UserInterrupt,-1,0
L000100::

;~ Line : 00126 {


;~ Line : 00127 bRA1 = 0;

bcf STATUS,RP0
bcf STATUS,RP1
bcf 5,1

;~ Line : 00128 bRB7 = 1;

bsf 6,7

;~ Line : 00129 goalstep = Recchar;

call DupBlock1 



;~ Line : 00130 if(goalstep == 0) freeride = 1; else freeride = 0;



SETPCLATH L000101,UserInterrupt,0
skpz
goto L000101
SETPCLATH UserInterrupt,L000101,0
L000103:
bsf 52,2
SETPCLATH L000102,UserInterrupt,1
goto L000102
SETPCLATH UserInterrupt,L000102,0
L000101:
bcf 52,2
L000102:

;~ Line : 00131 SendChar(steps);

call DupBlock0 





;~ Line : 00132 steps = 0;



;~ Line : 00133 stop = 0;



;~ Line : 00134 break;


goto L000096

;~ Line : 00135 }


;~ Line : 00136 case('B'):

SETPCLATH UserInterrupt,L000096,0
L000107::

;~ Line : 00137 {


;~ Line : 00138 bRA1 = 1;

bsf 5,1

;~ Line : 00139 bRB7 = 0;

bcf 6,7

;~ Line : 00140 goalstep = Recchar;

call DupBlock1 



;~ Line : 00141 if(goalstep == 0) freeride = 1; else freeride = 0;



SETPCLATH L000108,UserInterrupt,0
skpz
goto L000108
SETPCLATH UserInterrupt,L000108,0
L000110:
bsf 52,2
SETPCLATH L000109,UserInterrupt,1
goto L000109
SETPCLATH UserInterrupt,L000109,0
L000108:
bcf 52,2
L000109:

;~ Line : 00142 SendChar(steps);

call DupBlock0 





;~ Line : 00143 steps = 0;



;~ Line : 00144 stop = 0;



;~ Line : 00145 break;


goto L000096

;~ Line : 00146 }


;~ Line : 00147 case('L'):

SETPCLATH UserInterrupt,L000096,0
L000114::

;~ Line : 00148 {


;~ Line : 00149 bRA1 = 0;

bcf 5,1

;~ Line : 00150 bRB7 = 0;

bcf 6,7

;~ Line : 00151 goalstep = Recchar;

call DupBlock1 



;~ Line : 00152 if(goalstep == 0) freeride = 1; else freeride = 0;



SETPCLATH L000115,UserInterrupt,0
skpz
goto L000115
SETPCLATH UserInterrupt,L000115,0
L000117:
bsf 52,2
SETPCLATH L000116,UserInterrupt,1
goto L000116
SETPCLATH UserInterrupt,L000116,0
L000115:
bcf 52,2
L000116:

;~ Line : 00153 SendChar(steps);

call DupBlock0 





;~ Line : 00154 steps = 0;



;~ Line : 00155 stop = 0;



;~ Line : 00156 break;


goto L000096

;~ Line : 00157 }


;~ Line : 00158 case('R'):

SETPCLATH UserInterrupt,L000096,0
L000121::

;~ Line : 00159 {


;~ Line : 00160 bRA1 = 1;

bsf 5,1

;~ Line : 00161 bRB7 = 1;

bsf 6,7

;~ Line : 00162 goalstep = Recchar;

call DupBlock1 



;~ Line : 00163 if(goalstep == 0) freeride = 1; else freeride = 0;



SETPCLATH L000122,UserInterrupt,0
skpz
goto L000122
SETPCLATH UserInterrupt,L000122,0
L000124:
bsf 52,2
SETPCLATH L000123,UserInterrupt,1
goto L000123
SETPCLATH UserInterrupt,L000123,0
L000122:
bcf 52,2
L000123:

;~ Line : 00164 SendChar(steps);

call DupBlock0 





;~ Line : 00165 steps = 0;



;~ Line : 00166 stop = 0;



;~ Line : 00167 break;


goto L000096

;~ Line : 00168 }


;~ Line : 00169 case('S'):

SETPCLATH UserInterrupt,L000096,0
L000128::

;~ Line : 00170 {


;~ Line : 00171 bRA1 = 0;

bcf 5,1

;~ Line : 00172 bRB7 = 0;

bcf 6,7

;~ Line : 00173 SendChar(steps);

movfw steps

movwf (LocOpt+0x0)
SETPCLATH SendChar,UserInterrupt,1
call SendChar

;~ Line : 00174 steps = 0;

clrf H'35'

;~ Line : 00175 bRA2 = 1;

bsf 5,2

;~ Line : 00176 bRB4 = 1;

bsf 6,4

;~ Line : 00177 stop = 1;

bsf 52,1

;~ Line : 00178 break;

SETPCLATH L000096,0,1
goto L000096

;~ Line : 00179 }


;~ Line : 00180 case('+'):

SETPCLATH UserInterrupt,L000096,0
L000129::

;~ Line : 00181 {


;~ Line : 00182 SendCommand("Hello",5);

movlw 5
movwf (LocOpt+0x5)
L000130:
movlw (L130|0x8000)
movwf ACC
movlw (((L130|0x8000)>>8)&0xff)|0x80
movwf ACC+1
movfw ACC

movwf (LocOpt+0x3)
movfw 114

movwf 37
SETPCLATH SendCommand,UserInterrupt,1
call SendCommand

;~ Line : 00183 break;

SETPCLATH L000096,0,1
goto L000096

;~ Line : 00184 }


;~ Line : 00185 }

SETPCLATH UserInterrupt,L000096,0
L000096::

;~ Line : 00186 lastchar = '*';

movlw 42
movwf H'37'

;~ Line : 00187 }

L000091:

;~ Line : 00188 }

L000084:
L000078:
;~ Line : 00189
 SETPCLATH UserIntReturn,-1
;~ Line : 00190
 goto UserIntReturn

;~ Line : 00191 }

SETPCLATH 0,UserInterrupt,1
return
endmodule

;~ Line : 00201 void UserInitialise()


;~ Line : 00202 {


; Function : UserInitialise
;============================
; Depth=0,LocOpt Size=0,Locals Offset=0
;
module "UserInitialise"
UserInitialise::

;~ Line : 00207 TXSTA=(1<<BRGH)|(1<<TXEN);

bsf STATUS,RP0
movlw 36
movwf H'98'

;~ Line : 00208 SPBRG=20000000/16/9600-1;

movlw 129
movwf H'99'

;~ Line : 00209 


;~ Line : 00210 RCSTA=(1<<SPEN)|(1<<CREN);

bcf STATUS,RP0
movlw 144
movwf H'18'

;~ Line : 00211 INTCON|=(1<<PEIE);

movlw 64
iorwf H'0B'

;~ Line : 00212 PIE1|=(1<<TMR1IE);

bsf STATUS,RP0
movlw 1
iorwf H'8C'

;~ Line : 00213 PIE1|=(1<<TMR2IE);

movlw 2
iorwf H'8C'

;~ Line : 00214 PIE1|=(1<<RCIE);

movlw 32
iorwf H'8C'

;~ Line : 00215 CMCON = 0x07;

bcf STATUS,RP0
movlw 7
movwf H'1F'

;~ Line : 00216 bRA2 = 1;

bsf 5,2

;~ Line : 00217 bRB4 = 1;

bsf 6,4

;~ Line : 00218 bRA3 = 1;

bsf 5,3

;~ Line : 00219 bRB5 = 1;

bsf 6,5

;~ Line : 00220 


;~ Line : 00221 }

SETPCLATH 0,UserInitialise,1
return
endmodule

;~ Line : 00229 void UserLoop()


;~ Line : 00230 {


; Function : UserLoop
;======================
; Depth=0,LocOpt Size=0,Locals Offset=0
;
module "UserLoop"
UserLoop::

;~ Line : 00231 }

SETPCLATH 0,UserLoop,1
return
endmodule
