9s08qd 125khz Carrier Detection

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

9s08qd 125khz Carrier Detection

ソリューションへジャンプ
1,165件の閲覧回数
ksirob
Contributor I

AN3552 example for pulse width measurement doesn't work beyond few kHz, target enters in wait stop mode !!!!!

(i've modify this note for "rising edge only detection" in order to calculate periode)

 

I hope that AD compare function on QD4 will work better with shorter AD convertion time.... is there any example about ?

Any solution or help should be welcomed.

ラベル(1)
0 件の賞賛
返信
1 解決策
519件の閲覧回数
bigmac
Specialist III

Hello,

 

Further to my previous post, I notice that the 9S08QD4 does not contain an analogue comparator.  If this is required to "square up" the waveform applied to the TPM module, it would need to be an external component.  Additionally, the device makes no provision for an external clock for accurate measurement.

 

On the subject of the period measurement, I think that the feasibility is quite borderline of being able to measure the period of frequencies as high as 125 kHz.  Anyway, as there are only 64 bus cycles within the period, the resolution of the measurement will be extremely limited.

 

The direct measurement of frequency would potentially provide much more resolution, depending on the gate interval used.  However, frequency measurement would occupy two TPM modules, one to count the incoming cycles (via external TPM input) and the other for the gate timing.

 

Regards,

Mac

 

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
519件の閲覧回数
bigmac
Specialist III

Hello,

 

If you are referring to the conversion time of the ADC module, this has nothing to do with the use of tha analogue comparator, the output of which I would assume would be externally connected to a channel input pin of the TPM module.

 

The likely reason that you would not be able to measue the period of an external signal, wnen its frequency exceeded  "a few kilohertz", is that the period would become less than the ISR processing time for each input capture event.  Do you have maximum allowable bus frequency?  Are you performing unnecessary operations within the ISR code?  To improve the performance the ISR code should be minimal.  Perhaps you should consider inline assembly code.

 

To measure 125kHz, a period of 8 microseconds, and assuming a bus clock of 8 MHz, and allowing for the interrupt call, the execution of the ISR code should not exceed 30-40 cycles.

 

Regards,

Mac

 

0 件の賞賛
返信
520件の閲覧回数
bigmac
Specialist III

Hello,

 

Further to my previous post, I notice that the 9S08QD4 does not contain an analogue comparator.  If this is required to "square up" the waveform applied to the TPM module, it would need to be an external component.  Additionally, the device makes no provision for an external clock for accurate measurement.

 

On the subject of the period measurement, I think that the feasibility is quite borderline of being able to measure the period of frequencies as high as 125 kHz.  Anyway, as there are only 64 bus cycles within the period, the resolution of the measurement will be extremely limited.

 

The direct measurement of frequency would potentially provide much more resolution, depending on the gate interval used.  However, frequency measurement would occupy two TPM modules, one to count the incoming cycles (via external TPM input) and the other for the gate timing.

 

Regards,

Mac

 

0 件の賞賛
返信