Hi All,
Please, how can I set my pic16f88 to read current sampling and voltage sampling in my boost converter ?
I write in Hitec C and this is how I wrote it below
Presumably you want to read analog amounts rather than just high or low so you need to use the ADC module. You configure the pins as analog inputs and select them one at a time then read the value back from the ADC results registers. The value will be in step sizes decided by the reference voltage you choose divided by 1023 so you will need to do some math on the result to convert it back to real volts and amps.
I'm afraid I do not have Hitech C, I usually program in assembly language or Wiz-C, occasionally XC8 and XC16.
I will try to help with the methods but I won't be able to confirm whether the code itself is correct, especially if you use Hitech's built in library functions.
A quick search found this: https://extremeelectronics.co.in/mi...tal-converter-–-pic-microcontroller-tutorial/
which might be useful to you. It is specific to the 18F PIC mentioned in the text but isn't far off what you would use for the 16F88. You need to change the PIC configuration values and adjust the maximum number of channels but the rest is fairly straight forward. It should be enough to give you some ideas.