AnsweredAssumed Answered

How to get the DAC working on an MKE16F MCU

Question asked by Ammar Bazzaz on Oct 24, 2017
Latest reply on Oct 25, 2017 by Ammar Bazzaz

I am having trouble getting output on the DAC0 pin of my MKE16F512VLH16 MCU.  Have done the following:

 

1) PCC->CLKCFG[PCC_PORTE_INDEX] |= 0x40000000; // enable clock on PORT E

2) PCC->CLKCFG[PCC_DAC0_INDEX] |= 0x40000000; // enable clock on DAC0

3) DAC0->STATCTRL |= 0x60800; // enable output buffer, enable test ouput, enable DAC0

4) DAC0->DAT[0] = 1023; //bias_adjust; // send bias adjustment to DAC0 out

 

But I get no output on the physical Pin (PORTE9 PIN 16 on 64LQFP), expecting to see (1024/4096)*5000mV or 1250mV.

 

Any suggestions would be greatly appreciated.  Thanks in advance.

Outcomes