Re: Confused about synchronous communications



On Thu, 20 Sep 2007 22:28:37 GMT, "Jon Slaughter"
<Jon_Slaughter@xxxxxxxxxxx> wrote:

I'm trying to implement a general prarallel port communications program but
I'm a little confused about the timing issues involved.


Jon,

I'm not sure it's safe to generalize. My advice is to refer to the
data *** for your device of interest and see what the manufacturer
wants and expects.

In general, though, it looks like you have the general principle
down pat.

When I'm bitbanging, I don't try to center the clock, as a rule. I
put my data up, then immediately toggle a clock pulse. Next data bit,
toggle again. Repeat as necessary, as long as that's within the
manufacturer's timing specs.

When I'm reading, I read the data as soon as I detect the
appropriate clock transition.

So far, it's worked.

BTW - when reading, make sure you understand the data ***.
You'll find yourself seeing the first data bit present before the
first clock pulse. If you don't prepare yourself for that conditon,
you'll be chasing your tail.

The data *** is your friend!

Good luck,

Tom

.