IDAC_SetValue() doesn*t work

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

cross mob
TaGe_4284161
Level 2
Level 2
First like received

Hello Community,

i tried to measure the voltage with a multimeter at a resistor with 100 ohm. So I set my IDAC with different Values( from 0 to 0xFF) and it always shows me the same Voltage instead of different Volatge at the measurement point. The Measurement point is at Rref!

pastedImage_0.png

Thank you

Tak

0 Likes
1 Solution
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi Tarik,

How are you trying to measure the current ? I tested your project after keeping a break-point on line 107 where Ref IDAC channel is taken selected and IDAC_SetValue(0xff);. In debug, I was getting right output on pin 3[4].

Best Regards,
Vasanth R S

View solution in original post

0 Likes
8 Replies
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi Tarik,

Could you please share your project ? In PSoC Creator ,  go to File -> Create Workspace Bundle -> Select minimal. Please attach the generated file.

Meanwhile also make sure that you are below the IDAC compliance range as said in this KBA.

Best Regards,
Vasanth

0 Likes
NoriTan
Employee
Employee
25 sign-ins 5 questions asked 10 sign-ins

Did you _Start() the IDAC component?

Regards,

Noriaki

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

Yes, i started. I upload my Project

Thanks

0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi Tarik,

How are you trying to measure the current ? I tested your project after keeping a break-point on line 107 where Ref IDAC channel is taken selected and IDAC_SetValue(0xff);. In debug, I was getting right output on pin 3[4].

Best Regards,
Vasanth R S

0 Likes

Hi Vasanth,

as you see in the picture. The blue pin is my REF_Current, black is ref_negative, red is ref_positive, and the other black is tothe ground.

I measured the voltage from the blue resistant as you see. The resistant has 100 ohm. I always measure 112 mV. And as you mentioned the first run through (when I debug) shows me an different Voltage measure, but the following run through shows me again the 112.

thumbnail_IMG_0168.jpg

Best Reagrd Tarik

0 Likes

I think the Problem is the Mux, if I delete the Mux and just connect the IDA with my Ref_Resistor, I get a higher Voltage measurement af REF.

0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi

The project as such does not seem to have any problem. If you are measuring the voltage in the loop you will not get right voltage. You can keep a break-point after setting the value on IDAC and measure the voltage. That should give the right value. Also make sure IDAC compliance is met as stated in 2nd response.

Best Regards,
Vasanth

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Your meter may be loading the circuit what kind of meter are you using?

0 Likes