Output Compare (Manually setting) for mc9s12xdt512 with CW 4.6

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Output Compare (Manually setting) for mc9s12xdt512 with CW 4.6

1,333 Views
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
Labels (1)
0 Kudos
Reply
1 Reply

562 Views
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 Kudos
Reply