S08 Input Capture Problem

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

S08 Input Capture Problem

666件の閲覧回数
martindiaz
Contributor I

Hi all. I am using the TPM2 module, set to input capture mode, of a MCU MC9S08JM60 in order to measure the frequency of a rectangular signal. The problem is that I can not get a value by executing the following instructions:

 

TPM2C1DL = TPM2C1VL; TPM2C1DH = TPM2C1VH; TPM2C1DH = TPM2C1DH * 256; TPM2C1D = TPM2C1DL + TPM2C1DH; TPM2C1D = (TPM2C1D * 12) /100000 TPM2C1D  = 1/TPM2C1D 

(All variables are of the type " unsigned short ")

 

The module uses the BUSCLK as reference clock, which previously set in the Bypassed Internal Low Power mode, which understand that the BUSCLK is 32kHz / 2/2 = 8 kHz. What could be happening?.

 

Thanks!

 

Martin.

ラベル(1)
0 件の賞賛
返信
0 返答(返信)