My project is 'optimum solar cell implementation using dc-dc boost converter controlled by fuzzy logic controller'. I'm using MPLAB IDE for programming the PIC18F4431. I really don't have any idea about the c programming for fuzzy logic controller. I had done the inference rules in Matlab fuzzy logic toolbox. The input is error, E and change in error, CE. The output is the duty ratio, D of the boost converter. Below is the rules.
For example, If E is NB and CE is ZE then D is NB.
So any examples of fuzzy logic controller c programming which are related to this project will be helpful to me. Thank you.
I don't know fuzzy logic but looking at your inference rules, I would treat it like a quadrature decoder. Have a function for each "E" condition and loop there waiting for a change. Then you can assign that value to your variable, return to Main(), which would call function for the new "E" condition and wait for a change.