MC9S12ZVL ADC external trigger

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MC9S12ZVL ADC external trigger

802件の閲覧回数
lukasz_bittner
Contributor I

Hi Everyone,

I'm playing with the DEVKIT-S12ZVL board. What I'm trying to do it's an used an external trigger for ADC. I have created a project in the CW 11.1 with Processor Expert. As a trigger pin I'm using PAD5. To this pin I have connected logic analyzer as well. I have checked that the pin is pulled up. 

pastedImage_1.png

But the measuring is not starting. Could someone tell me what I'm doing wrong that I',m not able to start the measure?

0 件の賞賛
返信
2 返答(返信)

667件の閲覧回数
kef2
Senior Contributor V

I don't know, should digital input enable (DIENADL) be set for PAD5 when uses as an ETRIG? Generated code seems not setting DIEANADx, I would try adding to main:

DIENADL |= (1<<5); 

0 件の賞賛
返信

667件の閲覧回数
lukasz_bittner
Contributor I

Hi Edward, 

You were right. PE didn't generate the code for pin setting. But in my code there is next issue apart from of this. After set the input pin, there is needed to set the RSTA bit in the ADCFLWCTL register, and in case when restart mode is used (as in my example)  when the end of list is reached, the RSTA bit has to be re-set.

Thanks for your reply :smileyhappy:

0 件の賞賛
返信