lpcware

Need better SCT examples

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by rickta59 on Thu Aug 08 10:26:06 MST 2013
I'm trying to use the SCT peripheral to reshape a serial clocked input signal.

There are 2 inputs, a serial clock pin and a data pin. There is one output.  I want to use the data pin to decide if i should output a pulse of ~375ns when the pin is high and ~750ns when the pin is low.

I've looked at the various samples. Some of them seem to be close to what I want to do. However I'm at a loss to figure out some of the techniques they use. The IRQ thing seems to be something I might want to use but I have no idea what it does.

Basically the SCT should sit and wait for a low->high transition on the serial clock pin.
Then it should sample the data pin and set an output pin hi until it reaches one of two matches times depending on the value of the data pin.
When the proper match is made it should set the output pin low.
Then it should go back and wait for another lo->high transition on the serial clock pin.

Seems simple enough. Sadly, I've not been able to figure it out though.
Any hints or a working example would be appreciated.

Thanks,

-rick

Outcomes