AnsweredAssumed Answered

MKW21D512 ADC not starting conversions

Question asked by Robert Frumusa on Jan 20, 2016

Hi,

 

I am trying to use the ADC with the MKW21D512 Processor, I am able to initialize the ADC module and Calibrate the Module, every time I calibrate it, the Plus side gain comes out to be 512 and the minus side gain comes out to be 256.

 

After I initialize the module and calibrate it, I try and start a conversion by changing the channel in ADC0_SC1A bits 0-4. This doesn't start the conversion though. I tried to check the COCO bit in the ADC0_SC1 register, but that bit never gets set. I also tried to check the ADACT Bit in the ADC0_SC2 Register to see if the conversion is active, and that is never set either.

 

I am not sure why the ADC will not start after I have initialized it.

 

I have attached my main and my ADC files and my main header file with the register definitions to the post, my entire project is too large to upload.

 

Thank you in advance for your help,

Robbie.

Original Attachment has been moved to: main.c.zip

Original Attachment has been moved to: AD1.h.zip

Original Attachment has been moved to: AD1.c.zip

Original Attachment has been moved to: MK21D5.h.zip

Outcomes