Output Compare (Manually setting) for mc9s12xdt512 with CW 4.6

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

Output Compare (Manually setting) for mc9s12xdt512 with CW 4.6

1,299 次查看
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 回复

528 次查看
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 项奖励
回复