Just as a follow-up, I looked at the PIC12F508 to do this, and it can't=20 quite handle it - too slow (4Mhz) and no interrupt capability so I can=20 miss narrow pulses. However, I then discovered the relatively new (?)=20 PIC10F320, which is an amazing upgrade from the F508 for the same price.=20 So much stuff in a 6-pin, 46c/100 chip. Hard to believe. So, things are now working! Hooray, this fixed-price nightmarish=20 project just may finally conclude! J Jesse Lackey wrote: > Hi all, this is correct, I'm using digital control to make a constant > current source. The reason to do all this is that the design is for a > specialized application that needs constant-current LEDs with highspeed > PWM: 29Khz with 1000 steps. This is more than an order of magnitude > better than LED driver chips can do. > > So it is basically 7 channels of buck constant-voltage dc/dcs with a > large cap on them, with their feedback (i.e. pump/don't pump) controlled > by a separate highspeed comparator that samples the current when the > LEDs are on during the PWM cycle, which can be as short as 100nsec > range. So this way I have 7 dynamically-adjusting "power supplies" that > are creating the correct voltage to produce the right amount of current > thru the LEDs. (180mA or 700ma or 800mA @ approx 44V in this case). > > The problem appears to be the dc/dc chip is having trouble with the > "faked" feedback I give it, which has to be 1.2V to 1.5V, since that is > what it expects to see across a current sense resistor when it is used > as it is normally designed. It is getting a very rapid 1.2V to 1.5V > signal (basically the comparator's low/high output generates 1.2V or > 1.5V) that wouldn't happen if the chip were used as normal and I believe > this is the core of the problem. > > So I'm looking into ways to clean up the highspeed comparator's > "chatter". Digital methods preferred but all considered. > > Cheers > J > > > > > Robert Dvoracek wrote: >> ---------------------------------------- >>> Date: Mon, 10 Mar 2014 12:00:00 +0000 Subject: Re: [EE]: pulse/rate >>> limiter From: cpmcsweeny@gmail.com To: piclist@mit.edu >>> >>> On Mon, Mar 10, 2014 at 1:54 AM, Jesse Lackey >>> wrote: >>> >>> I'm not sure if I'm missing something here, but it seems what >>> you're trying to produce is a constant current, yet you're trying >>> to do this using digital rather than analogue control. The constant >>> current controllers I've done (including those with uC control of >>> current for dimming, using a PWM output and RC filter to provide a >>> control voltage) >> >> Exactly. He needs to cut out the middleman (comparator) and use the >> feedback pin on the buck chip directly. There is already a >> comparator inside. Another one will only add to the latency of the >> system. The exact implementation depends on the chip you're using. >> I would say to look up the datasheet. There should be formulas for >> the proper component selection and maybe even example circuits. It >> all depends on the operation frequency and the inductance value used >> in the output. >> --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .