Clarification regarding MC9S12G28

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

Clarification regarding MC9S12G28

1,384 次查看
veeresh_b
Contributor I

Hi,

 

       I have difficulty in finding one of the information in your data sheet of 16 bit controller MC9S12G128. I am writing the drivers for the Analog to Digital module of 10 bit 12 channel. According to my requirement I need to sample the analog channel 3 when their is a trigger on the pin ETRIG1.

 

        But according to the data sheet information,  I could not select both of the ETRIG and channel pins at a time. My question is how to select a channel when their is trigger on the pin ETRIG1. The project is getting delayed because of this issue. I am waiting for your erliest reply.

 

   

标签 (1)
0 项奖励
回复
3 回复数

1,253 次查看
kef
Specialist I

Channel to sample (or first channel in case you want to sample multiple channels) is selected using Cx bits in ATDCTL5 register. Trigger is selected using ETRIGSEL and ETRIGCHx bits in ATDCTL1 register. Does this answer your question?

0 项奖励
回复

1,253 次查看
veeresh_b
Contributor I

Thanks for your reply. But I still want to go in depth of this. If I select ETRIGSEL =1, ETRIGCH[0:3] and CA,CB,CC,CD bit I can select channels. But there is no intrupt flag when we found trigger on the ETRIG pins.

 

According to my requirement, if there is a positive edge on the pin ETRIG1 then I need to sample the channel 3. But my doubt is how can I synchronise the conversation on channel no 3 with trigger in the pin ETRIG1?

0 项奖励
回复

1,253 次查看
kef
Specialist I
  • But there is no intrupt flag when we found trigger on the ETRIG pins.

But you have ATD sequence complete interrupt.

 

  • According to my requirement, if there is a positive edge on the
  • pin ETRIG1 then I need to sample  the channel 3. But my doubt is how can I
  • synchronise the conversation on channel no 3 with trigger in the pin ETRIG1?

Once trigger is enabled, when trigger occurs ATD will convert Cx channel or a seqiemce of channels automatically. It will be synchronous to trigger.

0 项奖励
回复