Difference between ICR1 and OCR1A - in Fast PWM?

Gathering data from other threads, I gather you're trying to provide clock for some sort of Manchester Data provider?

1)Is 125kHz the "carrier" frequency, or the data rate? - Carrier frequency

  1. In most Manchester encoding examples, there is a clock that is 2x the data rate, but you showed a diagram where you have 32 clocks per bit (or half-bit)? - The diagram was of a BiPhase encoded signal - Where RF/32 represent the data bits. For manchester it is different.

  2. Manchester gets the data bit value from the direction of the data bit transition in the middle of the data period. I'm not sure that using ICR (which gives you time between transitions) is going to be helpful. I guess "long" means the data bit is different than the last bit, while "short" means it's the same.

  3. I thought that a point of manchester encoding was that you can derive the clock from the data stream. Why are YOU generating the 125kHz? Because I don't have an analog front end that does the same. I want to use that 125kHz for my reference, so that I can read values at the mid-bit or rising or falling edges. (hope that made sense ... :confused: ). I could have used Timer1 functions like Timer1.initialize and Timer1.pwm. But it's causing a conflict between libraries. Any suggestions on how to solve that?

  4. If you have 8 or 128 clocks per data bits, and are using OCRA to generate that clock, you can certainly use OCRB to check the databit at (or slightly past) the midpoint. (OCRA as top, OCRB as interrupt, read the bit in the ISR. Or poll, except then you don't really need the OCR to help.) - I will try that and keep posted.

Thanks a ton for your time.

Best,

Azim