Heh Guys,
I am programming in the c computer language using the xc8 c compiler (free version) and the MPLABX IDE both from Microchip. The microcontroller I am using is a pic18f458. I have completed my first coding project and have this one annoying bug in my code that won't go away. I configured bit 0 of port B with the following command (which worked fine) TRISBbits.TRISB0=1;. Here is the line of code that keeps giving an error:
if (PORTBbits.PORTB0==0) numgen (float numb1,numb2,numb3,rannumseed);
The error keeps showing up at "PORTB0" in the above line of code. I am trying to read a logic zero on pin 0 of port b of the pic18f458. This is my first project programming a microcontroller in c. Everything else in my code seems to work fine. Anyway any help you guys could give me on this issue would be much appreciated. By the way the program is four pages long.
I am programming in the c computer language using the xc8 c compiler (free version) and the MPLABX IDE both from Microchip. The microcontroller I am using is a pic18f458. I have completed my first coding project and have this one annoying bug in my code that won't go away. I configured bit 0 of port B with the following command (which worked fine) TRISBbits.TRISB0=1;. Here is the line of code that keeps giving an error:
if (PORTBbits.PORTB0==0) numgen (float numb1,numb2,numb3,rannumseed);
The error keeps showing up at "PORTB0" in the above line of code. I am trying to read a logic zero on pin 0 of port b of the pic18f458. This is my first project programming a microcontroller in c. Everything else in my code seems to work fine. Anyway any help you guys could give me on this issue would be much appreciated. By the way the program is four pages long.