0
\$\begingroup\$

I'm looking for a programmable comparator which has a digital or open-drain output and a voltage reference which can be programmed over I2C. My searches at my favourite sites of Microchip and Farnell haven't brought up anything interesting.

If this isn't possible I'd be looking at making an external R-2R (or R = 2^n) divider (precision not critical) from 4-5 IO pins to get 16 or 32 levels granularity. The setpoint needs to be adjusted to compensate for varying video levels.

Edit: such comparator should also have <1µs response time. Most comparators satisfy this, but there are a few cheap ones that don't.

\$\endgroup\$
  • \$\begingroup\$ I normally use mouser as they are close to me. I would also like to see what chips this turns up. \$\endgroup\$ – Kortuk Oct 29 '10 at 0:48
  • 2
    \$\begingroup\$ Would an I2C DAC and a regular, non-programmable comparator solve your problem? \$\endgroup\$ – Kevin Vermeer Oct 29 '10 at 14:18
  • \$\begingroup\$ Yep, but it would be nicer to have a single IC solution because of a) reduced size, b) probably lower cost. \$\endgroup\$ – Thomas O Oct 29 '10 at 14:19
3
\$\begingroup\$

Many PICs would be able to do this. Any part with I2C Slave, comparator and voltage reference module.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ My MCU doesn't have an onboard comparator. \$\endgroup\$ – Thomas O Oct 29 '10 at 9:08
  • \$\begingroup\$ Seems a waste just to have a PIC dedicated to this task. \$\endgroup\$ – Thomas O Oct 29 '10 at 10:13
  • \$\begingroup\$ Why? A low-end PIC is often cheaper and more flexible than a special-purpose IC. If you can live with a protocol simpler/slower than I2C, a 10F or 12F series device could easily do it. \$\endgroup\$ – mikeselectricstuff Oct 29 '10 at 23:56
4
\$\begingroup\$

Have you considered using a fixed voltage reference in conjunction with a I2C digital pot, for example the Analog Devices ADC5258.

As mikeselectricstuff has pointed out, this functionality is actually built into many PICs.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Size would be important; that chip is quite big. \$\endgroup\$ – Thomas O Oct 29 '10 at 8:50
1
\$\begingroup\$

If your micro has I2C and that many free IO's, does it have a built in DAC? If so then what reemrevnivek suggested would work. You don't need a separate DAC chip if you have one onboard...

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.