Digital comparator and adc

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
AndreaLB
Level 1
Level 1
10 replies posted 10 sign-ins 5 replies posted

Hi,

I have to compare a Digital output from an ADC with a Digital constant in a Digital comparator. How can i transfer my Digital output from ADC to a Digital comparator?

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

AndreaLB,

One possibility is to use a custom ADC_SAR modified with digital bus output. Attached below is a project showing this approach. 

Attached are project file and ADC_SAR_ex library. Please find library installation instructions below.

/odissey1

 

SAR_ADC_comparator_01a_A.png

View solution in original post

0 Likes
6 Replies
lock attach
Attachments are accessible only for community members.
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

A different aproach will be using a DAC and an analog comperator. Will use few resources and does not require interrupts etc. Have a look at the example provided.

Happy coding,

Bob

0 Likes

Thanks for the answer.

In this case, can i directly take my voltage from the pin and compare it with my max voltage, without using an ADC and a DAC?

 

0 Likes

When your max voltage is an analog input you can compare it to the voltage using the analog comparator. Take care of oscillations at the compare-point.

 

Bob

0 Likes

Thank you. I really appreciate, you were helpful.

0 Likes
lock attach
Attachments are accessible only for community members.

AndreaLB,

One possibility is to use a custom ADC_SAR modified with digital bus output. Attached below is a project showing this approach. 

Attached are project file and ADC_SAR_ex library. Please find library installation instructions below.

/odissey1

 

SAR_ADC_comparator_01a_A.png

0 Likes

Thank you. You were helpful

0 Likes