KV11z-DAC Output Enable

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

KV11z-DAC Output Enable

跳至解决方案
967 次查看
CMooN
Contributor I

Hello,

Can someone please help me about how to enable DAC output of KV11z ? I am using dac_basic from SDK. Thanks for any help.

0 项奖励
回复
1 解答
947 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Please read the relevant chapter of the Kinetis KV11: 75 MHz Arm Cortex-M0+ 64/128 KB Flash (32-64 pin)

DAC data buffer.png

There is description about DAC_SetBufferValue.

DAC_SetBufferValue.png

Please refer to the other two examples in the SDK:

dac examples.png

在原帖中查看解决方案

0 项奖励
回复
4 回复数
952 次查看
CMooN
Contributor I

Also, I want you to ask how can I control the change of the voltage with interrupt timer ? @Robin_Shen 

0 项奖励
回复
962 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi CMooN,

Did you follow the readme.txt of dac_basic example? Please input the value from terminal.

dac_basic.png

Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复
959 次查看
CMooN
Contributor I

Hi Robin,

Thanks for your answer. Can you also inform me about the buffer ? I do not understand about why we use buffer and what is the function of the buffer ? Also, I do not understant what is the function of the following code ?

void DAC_SetBufferValue(DAC_Type *base, uint8_t index, uint16_t value)
{
assert(index < DAC_DATL_COUNT);

base->DAT[index].DATL = (uint8_t)(0xFFU & value); /* Low 8-bit. */
base->DAT[index].DATH = (uint8_t)((0xF00U & value) >> 8); /* High 4-bit. */

0 项奖励
回复
948 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Please read the relevant chapter of the Kinetis KV11: 75 MHz Arm Cortex-M0+ 64/128 KB Flash (32-64 pin)

DAC data buffer.png

There is description about DAC_SetBufferValue.

DAC_SetBufferValue.png

Please refer to the other two examples in the SDK:

dac examples.png

0 项奖励
回复