Constant Current LED Driver Using PIC18

Is it possible to check the value of the voltage (hence the current) with such a high-frequency waveform? How fast can the ADC in your microprocessor provide an accurate representation of an analog signal?

Assuming the scope shot you've provided shows a 10 µs/div scaling, our ADC's can keep up with this signal. We recommend using an ADC with at least a 1 Mbps sampling rate. You can use our MAPS tool to narrow down the 16-bit device which meets your needs.

Will the low value of the voltage across the sense resistor be a problem?

Assuming 1.72 A on the scope shot is the amplitude of the waveform, this shouldn't be a problem for the controller ADC.

If you believe that this is achievable, is there a recommended sensing circuitry?

If 1.72 V is the peak voltage seen across Rsense, you may need to pick a resistor which is capable of dissipating the power you are putting through it. Using P = (V2)/R = [(1.72)*(1.72)] / (0.36) = 8.2 W. Currently, you have a 2 W resistor for Rsense. Also, we recommend that you put a buffer on the CS node (input to the micro ADC) to keep the holding cap on the ADC channel from loading the signal.

© 2018 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.