Ernest Snaith

Output Compare (Manually setting) for mc9s12xdt512 with CW 4.6

Discussion created by Ernest Snaith on May 20, 2007
Latest reply on May 20, 2007 by Ernest Snaith

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

Message Edited by J2MEJediMaster on 2007-05-21 01:19 PM