Hi guys, i would like to ask rite... how can a pic detect voltage / current? if i need to detect it from a buck converter and send it as a feedback to the PIC...
You will need two adc's in the pic.
One can be connected to a voltage divider for the voltage measurement.
The other can be connected to a current sensing resistor (eventualy amplified by an opamp).
To measure current, there are two ways that I know -- sense resistor and Hall effect. Most simple is a sense resistor, though it does introduce a small resistance. You need to decide whether to measure it low side or high side. You probably need to condition the signal before reading with the PIC.
To measure voltage, you must condition the signal so it's within the range of the PIC's ADC, with a voltage divider or some other arrangement. Often you will include a current-limiting resistor in the signal path to protect the PIC against overvoltage.
Want to get more specific, maybe post a schematic or block diagram?