#include <htc.h>
#ifndef GLCD_CS1
#define GLCD_CS1 PORTBbits.RB0 // Chip Selection 1
#endif
#ifndef GLCD_CS2
#define GLCD_CS2 PORTBbits.RB1 // Chip Selection 2
#endif
//Function Prototype
void Select_Side(bit side);
void main()
{
TRISB = 0x00;
Select_Side(0); [color:red][B][I]//ERROR at this line "can't generate code for this expression"[/I][/B][/color]
while(1);
}
//Function definition
void Select_Side(bit side)
{
if(side) [color:red][B][I]//ERROR at this line "can't generate code for this expression"[/I][/B][/color]
GLCD_CS2 = 1;
else
GLCD_CS1 = 1;
}