;~ File : .c
__ROMSIZE = 2048
;~ 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 ;

_IRP = 7
_RP1 = 6
_RP0 = 5
_NOT_TO = 4
_NOT_PD = 3
_Z = 2
_DC = 1
_C = 0

;~ 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 };

_GIE = 7
_PEIE = 6
_T0IE = 5
_INTE = 4
_RBIE = 3
_T0IF = 2
_INTF = 1
_RBIF = 0

;~ 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 };

_EEIF = 7
_CMIF = 6
_RCIF = 5
_TXIF = 4
_CCP1IF = 2
_TMR2IF = 1
_TMR1IF = 0

;~ 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 };

_T1CKPS1 = 5
_T1CKPS0 = 4
_T1OSCEN = 3
_NOT_T1SYNC = 2
_TMR1CS = 1
_TMR1ON = 0

;~ Line : 00163 


;~ Line : 00164 enum T_T1CON {


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


;~ Line : 00166 };

_TOUTPS3 = 6
_TOUTPS2 = 5
_TOUTPS1 = 4
_TOUTPS0 = 3
_TMR2ON = 2
_T2CKPS1 = 1
_T2CKPS0 = 0

;~ 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 };

_CCP1X = 5
_CCP1Y = 4
_CCP1M3 = 3
_CCP1M2 = 2
_CCP1M1 = 1
_CCP1M0 = 0

;~ Line : 00171 


;~ Line : 00172 enum T_CCP1CON {


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


;~ Line : 00174 };

_SPEN = 7
_RX9 = 6
_SREN = 5
_CREN = 4
_ADDEN = 3
_FERR = 2
_OERR = 1
_RX9D = 0

;~ 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 };

_C2OUT = 7
_C1OUT = 6
_C2INV = 5
_C1INV = 4
_CIS = 3
_CM2 = 2
_CM1 = 1
_CM0 = 0

;~ 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 };

_NOT_RBPU = 7
_INTEDG = 6
_T0CS = 5
_T0SE = 4
_PSA = 3
_PS2 = 2
_PS1 = 1
_PS0 = 0

;~ 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 };

_EEIE = 7
_CMIE = 6
_RCIE = 5
_TXIE = 4
_CCP1IE = 2
_TMR2IE = 1
_TMR1IE = 0

;~ 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 };

_OSCF = 3
_NOT_POR = 1
_NOT_BO = 0

;~ Line : 00193 


;~ Line : 00194 enum T_PCON {


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


;~ Line : 00196 };

_CSRC = 7
_TX9 = 6
_TXEN = 5
_SYNC = 4
_BRGH = 2
_TRMT = 1
_TX9D = 0

;~ 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 };

_WRERR = 3
_WREN = 2
_WR = 1
_RD = 0

;~ Line : 00201 


;~ Line : 00202 enum T_EECON1 {


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


;~ Line : 00204 };

_VREN = 7
_VROE = 6
_VRR = 5
_VR3 = 3
_VR2 = 2
_VR1 = 1
_VR0 = 0

;~ 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;

PA = 5

;~ Line : 00228 extern sPort PB;

PB = 6

;~ Line : 00230 extern sPort PC;

PC = 7

;~ Line : 00232 extern sPort PD;

PD = 8

;~ Line : 00234 extern sPort PE;

PE = 9
;~ 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_MAIN.C
;~ Line : 00028
 _PortInnCopy=1
;~ Line : 00036
 _PortInUsed=1

;~ Line : 00037 

;~ Line : 00038
 _PortIn0Used=1
;~ Line : 00046
 _In0Port=PORTB
;~ Line : 00047
 _In0Bit=1
;~ Line : 00048
 _RXPort=PORTB
;~ Line : 00049
 _RXBit=1

;~ Line : 00013 void LoadOscCal();


;~ Line : 00044 void main()


;~ Line : 00045 {


; Function : main
;==================
; Depth=1,LocOpt Size=0,Locals Offset=0
; Calls: UserInitialise(1),UserLoop(1)
module "main"
main::

;~ Line : 00046 OPTION_REG&=0x7f;

bsf STATUS,RP0
movlw 127
andwf H'81'

;~ Line : 00052 T2CON=((16-1)<<3)|(1<<2)|(2);

bcf STATUS,RP0
movlw 126
movwf H'12'

;~ Line : 00053 TMR2=0;

clrf H'11'

;~ Line : 00054 TMR1L=TMR1H=0;

clrf H'0F'
clrf H'0E'

;~ Line : 00055 T1CON=0x20 | 1 | ((!1)<<TMR1CS) | ((!1)<<NOT_T1SYNC) | (0<<T1OSCEN);

movlw 33
movwf H'10'

;~ Line : 00059 PORTA|=0xff;

movlw 255
iorwf H'05'

;~ Line : 00060 PORTB|=0xff;

movlw 255
iorwf H'06'

;~ Line : 00061 TRISB&=0x02;

bsf STATUS,RP0
movlw 2
andwf H'86'

;~ Line : 00062 TRISA&=0xf1;

movlw 241
andwf H'85'

;~ Line : 00063 


;~ Line : 00064 PORTB&=~(1<<2);

bcf STATUS,RP0
movlw 251
andwf H'06'

;~ Line : 00068 PORTB&=~(1<<4);

movlw 239
andwf H'06'

;~ Line : 00072 PORTB&=~(1<<5);

movlw 223
andwf H'06'

;~ Line : 00076 PORTB&=~(1<<6);

movlw 191
andwf H'06'

;~ Line : 00080 PORTB&=~(1<<7);

movlw 127
andwf H'06'

;~ Line : 00084 PORTA&=~(1<<1);

movlw 253
andwf H'05'

;~ Line : 00088 PORTB&=~(1<<3);

movlw 247
andwf H'06'

;~ Line : 00092 PORTB&=~(1<<0);

movlw 254
andwf H'06'

;~ Line : 00096 PORTA&=~(1<<3);

movlw 247
andwf H'05'

;~ Line : 00100 PORTA&=~(1<<2);

movlw 251
andwf H'05'

;~ Line : 00104 UserInitialise();

SETPCLATH UserInitialise,main,1
call UserInitialise

;~ Line : 00108 INTCON|=(1<<GIE);

movlw 128
iorwf H'0B'

;~ Line : 00112 while(1)

SETPCLATH main,0,0
L000008:
L000005:
L000007:

;~ Line : 00113 {


;~ Line : 00114 UserLoop();

SETPCLATH UserLoop,main,1
call UserLoop

;~ Line : 00118 }

SETPCLATH L000005,0,1
goto L000005
SETPCLATH main,L000005,0
L000006:

;~ Line : 00119 }

endmodule
_QuickInt = 1

;~ Line : 00124 const int QuickInt=1;


;~ Line : 00125 


;~ Line : 00126 void Interrupt()


;~ Line : 00127 {


; Function : Interrupt
;=======================
; Depth=0,LocOpt Size=0,Locals Offset=0
;
_Interrupt = 1
module "Interrupt"
Interrupt::
_IntRet = 1
;~ Line : 00131
SETPCLATH UserInterrupt,-1
;~ Line : 00132
goto UserInterrupt
;~ Line : 00133
UserIntReturn::
;~ Line : 00134
clrf STATUS
;~ Line : 00135
SETPCLATH IntRet,-1

;~ Line : 00137 }

SETPCLATH 0,Interrupt,1
goto IntRet
endmodule
