Is it possible to read a single ended input on a DMx input pin?

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

Is it possible to read a single ended input on a DMx input pin?

1,767 次查看
robotjosh
Contributor IV

  I'm using the K40X256 tower board and one of the backemf signals from the 3phase motor board goes to ADC0_DM0 and I need to read it.  Processor expert warns me if I try to configure channel 0 as a single ended input but nothing in the datasheet I see indicates that channel 0 is differential-only.

0 项奖励
回复
3 回复数

1,568 次查看
mjbcswitzerland
Specialist V

Josh

All devices allow ADC0_DM0 as single ended ADC input.

To be absolutely sure I just connected the ADC0_DM0 input to the potentiometer wiper on the TWR-K40x256 board and compared the values read from ADC0_DM0 and ADC1_DM1 (both set up for single-ended operation) and the two ADC samples for the two inputs followed each other (to within 2 noise bits) across the potentiometer range (0x0000..0x0ffff).

Regards

Mark

0 项奖励
回复

1,567 次查看
robotjosh
Contributor IV

Did you set it up with processor expert adc_init?

Josh Jordan

Engineer

0 项奖励
回复

1,567 次查看
mjbcswitzerland
Specialist V

Josh

No - I just used the uTasker project since it supports the ADCs in interrupt and DMA mode on all K and KL boards (just selected the K40 TWR target and changed one line of code to select the input you asked about).

Try ignoring the warning (PE may have bugs and limitiations) and see whether it works or not.

Regards

Mark

0 项奖励
回复