/*
MCU: PIC18F452.
Oscillator: HS, 20.0000 MHZ.
SW: mikroC PRO for PIC.
* NOTES:
*/
unsigned char cursx,cursy;
void E2D1(void){
unsigned char cursx,cursy;
cursx=0;
cursy=7;
LK1:
if((cursy==7)&&(RB5_bit)) goto sbtlen0;
sbtlen0: switch(cursx){
case 5: E2D1();break;
case 7: E1M1();break;
case 11: E4CA1();break;
}
Delay_ms(313);
goto LK1;
}//~
void E1M1(void){
unsigned char cursx,cursy;
cursx=0;
cursy=7;
LK1:
if((cursy==7)&&(RB5_bit)) goto sbtlen0;
sbtlen0: switch(cursx){
case 5: E2D1();break;
case 7: E1M1();break;
case 11: E4CA1();break;
}
Delay_ms(313);
goto LK1;
}//~
void E4CA1(void){
unsigned char cursx,cursy;
cursx=0;
cursy=7;
LK1:
if ((cursy==7)&&(RB5_bit)) goto sbtlen0;
sbtlen0: switch(cursx){
case 5: E2D1();break;
case 7: E1M1();break;
case 11: E4CA1();break;
}
Delay_ms(313);
goto LK1;//EXIT.
}//~
void main() {
PORTA=0;//Clear portA.
TRISA=0XFF;//PortA is input.
PORTD=0;//Clear portD.
TRISD=0;//PortD is output.
PORTC=0;//Clear portC.
TRISC=0;//portC is output.
PORTB=0;//Clear portB.
TRISB=0XFF;//portB is input.
PORTE=0;//Clear portE.
TRISE=0;//PortE is Output. zzzzz.
TRISC = PORTC = 0;
RCON.IPEN =1;//Enable priority levels on interrupts.
INTCON.INT0IE =1;//Enables the INT0 external interrupt.
INTCON2.INTEDG0 =0;//Interrupt on falling edge.
INTCON.RBIE =1;//Enables the RB Port change interrupt.
ADCON1=0;//Configure AVDD=A/DVref+,AVss=A/DVref,16-Analog channels analog I/P.
ADCON2=1;//Right justified A/D Result Format,
//0TAD[A/D acquisition time select bits],
//Fosc/2[A/D conversion clock select bits.].
Delay_ms(400);
E4CA1();
}//~!
***Errors;
0 125 All files Preprocessed in 62 ms
0 121 Compilation Started SwhInstcTST.c
36 324 Undeclared identifier 'E1M1' in expression SwhInstcTST.c
38 324 Undeclared identifier 'E4CA1' in expression SwhInstcTST.c
66 324 Undeclared identifier 'E4CA1' in expression SwhInstcTST.c
135 324 Undeclared identifier 'ADCON2' in expression SwhInstcTST.c
0 102 Finished (with errors): 01 Jun 2011, 18:30:50 SwhInstcTST.mcppi