DAC voltage reference on TWR-K64

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DAC voltage reference on TWR-K64

924 Views
aberger
Contributor V

The K64 Reference manual states that the onboard 12-bit DACs on the TWR-K64F120M can be set to use DACREF_1 or DACREF_2. Where do I choose the voltages that determine DACREF_1 and DACREF_2?

Using jumper J29, I am able to choose V_BRD as:

  • 1-2: 3.3 V from K20 (default)
  • 3-4: 3.3 V from K64
  • 5-6: 3.3 V from regulator
  • 7-8: 1.8 V from regulator

But regardless of the jumper setting I use, setting the DACREF to 1 vs. 2 in software has little effect on the maximum DAC output. That is, if I use jumper setting 1-2, I get about 3.3 V out regardless of whether I set the DAC reference to DACREF_1 or DACREF_2 in software. And for jumper setting 7-8, I get about 1.8 V regardless of the software setting. Is there a way to independently set DACREF_1 and DACREF_2?

Tags (2)
0 Kudos
3 Replies

726 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Andy,

   At first, you need to know DACREF_1 and DACREF_2 is what.

  DACREF_1: VREF_OUT

  DACREF_2:VDD.

pastedImage_1.png

  The DAC refernce can be selected in the register DACx_C0[DACRFS],  you can choose the VDD as your DAC reference voltage, then try the DAC convert.

  About the code ,you can use our SDK_2.3_TWR-K64F120M which can be downloaded from this link:

Welcome | MCUXpresso SDK Builder 

The dac code can be found in the folder:SDK_2.3_TWR-K64F120M\boards\twrk64f120m\driver_examples\dac

Wish it helps you!
Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

726 Views
aberger
Contributor V

I did find on pg 131 of the K64 Reference Manual that:

DACREF_1 = VREF_OUT

DACREF_2 = VDDA

It's not clear what VREF_OUT is though. How does it differ from VREFH?

Also, from the TWR-K64F120M schematic, it appears that VREFH is just an LC filtered version of VDDA. What are the typical uses cases for VREFH vs VDDA?

0 Kudos

726 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Andy,

   VREF_OUT is the Internally-generated Voltage Reference output, you can check K64 reference manual, Chapter 38
Voltage Reference (VREFV1).

pastedImage_1.png

VREFH is used for the ADC,  DAC didn't use it, but normally, it recommended to connect to the VDDA.

Wish it helps you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------