Issues with Timer Module, Pulse Accumulator B set to Event Counter Mode - MC9S12DP256B

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

Issues with Timer Module, Pulse Accumulator B set to Event Counter Mode - MC9S12DP256B

1,732件の閲覧回数
admin
Specialist II
Hello,

I am using MC9S12DP256B. I am trying to get Pulse Accumulator A and Pulse Accumulator B working in Event Counter Mode for both A and B. I have function Generator connected to ICO0 and ICO7. Timer Registers are all default except: PACTL = 40h and PBCTL = 40h. Pulse Accumulator A works fine with this setup but Pulse Accumulator B is not counting pulses. I am not sure what I am doing wrong.

 

Also I am using Code Warrior, with what command would I be able to read PACN3 and PACN2 in one clock cycle.

 

Thanks for all the help and Happy New Year everybody.

Ulan



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

805件の閲覧回数
kef
Specialist I
Pulse accumulators A and B are not the same. PACTL register has edge and mode select bits, while PBCTL doesn't have edge select bits. Active edge for accumulator B is selected the same as input capture edge for channel 0. So you should also set up TCTL4 register. According to ECT_16B8C Block User Guide V01.06, pulse accumulator B (like pulse accumulator A) is also independent from timer enable bit (TEN).
 
I don't know why do you want to access PACN3 and PACN2 in the same cycle. Pulse accumulator B uses concatenated 16bits register PACN1:smileytongue:ACN0.
Try writing help and hit enter in CW command window. DW command seems to be what you need.
0 件の賞賛
返信