You can just remove "//" from the lines you want to make the controller type you like - PID, PD, PI. Also you must tune it with parameter kp ki kd for your system.
Here is configuration levitator886.h file
#FUSES NOWDT //No Watch Dog Timer
#FUSES HS //INTRC_IO //Internal RC Osc, no CLKOUT
#FUSES PUT //Power Up Timer
#FUSES NOMCLR //Master Clear pin used for I/O
#FUSES NOPROTECT //Code not protected from reading
#FUSES NOCPD //No EE protection
#FUSES NOBROWNOUT //No brownout reset
#FUSES NOIESO //Internal External Switch Over mode disabled
#FUSES NOFCMEN //Fail-safe clock monitor disabled
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NODEBUG //No Debug mode for ICD
#FUSES NOWRT //Program memory not write protected
#FUSES BORV21 //Brownout reset at 4.0V
#FUSES RESERVED //Used to set the reserved FUSE bits
Electromagnetic levitation
You can just remove "//" from the lines you want to make the controller type you like - PID, PD, PI. Also you must tune it with parameter kp ki kd for your system.
Here is configuration levitator886.h file
#FUSES NOWDT //No Watch Dog Timer
#FUSES HS //INTRC_IO //Internal RC Osc, no CLKOUT
#FUSES PUT //Power Up Timer
#FUSES NOMCLR //Master Clear pin used for I/O
#FUSES NOPROTECT //Code not protected from reading
#FUSES NOCPD //No EE protection
#FUSES NOBROWNOUT //No brownout reset
#FUSES NOIESO //Internal External Switch Over mode disabled
#FUSES NOFCMEN //Fail-safe clock monitor disabled
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NODEBUG //No Debug mode for ICD
#FUSES NOWRT //Program memory not write protected
#FUSES BORV21 //Brownout reset at 4.0V
#FUSES RESERVED //Used to set the reserved FUSE bits
#use delay(clock=25000000)
#use rs232(baud=38400,parity=N,xmit=PIN_B7,rcv=PIN_B6,bits=8)