Have a project do.
I am using a PIC16F1937. and HI-Tech C compiler v9.65 with MPLAB v8.46
I can not get a Function to work at all. ( I can put stuff in the main loop and it works )
Have use functions on a PIC16F690, PIC16F616, PIC16F887 And they all work fine, But not on a PIC 16F1937.
In the example below RC0 will turn ON but RA1 will not.
***** sample of code*****
//Setup the chip __Config.
void main() { // Start OF main
void myfunction (void); // declare the function
// Setup ports/pins/stuff
//*************************
while(1) {
myfunction();
RC0=1;
} }// End of Main Loop
//*************************
void myfunction (void)
{
RA1=1;
}
// END of All CODE
I am using a PIC16F1937. and HI-Tech C compiler v9.65 with MPLAB v8.46
I can not get a Function to work at all. ( I can put stuff in the main loop and it works )
Have use functions on a PIC16F690, PIC16F616, PIC16F887 And they all work fine, But not on a PIC 16F1937.
In the example below RC0 will turn ON but RA1 will not.
***** sample of code*****
//Setup the chip __Config.
void main() { // Start OF main
void myfunction (void); // declare the function
// Setup ports/pins/stuff
//*************************
while(1) {
myfunction();
RC0=1;
} }// End of Main Loop
//*************************
void myfunction (void)
{
RA1=1;
}
// END of All CODE