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?

779件の閲覧回数
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 返答(返信)

580件の閲覧回数
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 件の賞賛

579件の閲覧回数
robotjosh
Contributor IV

Did you set it up with processor expert adc_init?

Josh Jordan

Engineer

0 件の賞賛

579件の閲覧回数
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 件の賞賛