Output Compare (Manually setting) for mc9s12xdt512 with CW 4.6

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

Output Compare (Manually setting) for mc9s12xdt512 with CW 4.6

1,334件の閲覧回数
ernestsnaith
Contributor I
Hi

I would like to use an output compare channel to deliver a pulse when needed of a precise duration. Therefore when i require this pulse i call a function including:

PTT_PTT6 = 1;           // manually set OC channel 6 high
TC6 = TCNT + 5000;      // Set OC to clear OC6 after set time.

I believe i have set up the OC channel properly so that it clears the channel on a succesful compare. However i dont think i am manually setting the channel correctly to begin with, (first line). What is the correct way to manually set OC channels.

Many Thanks

CW 4.6
mc9s12xdt512








Message Edited by J2MEJediMaster on 2007-05-21 01:19 PM
ラベル(1)
0 件の賞賛
返信
1 返信

563件の閲覧回数
ernestsnaith
Contributor I
I've figured out how to do this using OC7 mask and data registers but is this the only way? seems a waste of a channel.
0 件の賞賛
返信