Re: VHDL anyone ?





Guido Piasenza wrote:

> Hi folks,
>
> does anybody know where I can find VHDL source
> for a quadrature decoder ?

I just did one, although I used a schematic format rather than
VHDL.  But, I'm not ready to give it away just yet.  But, most
designs I am aware of use a state machine with 4 states, and
make the state machine track the 4 transitions around the
quadrature waveform.  Each transition also increments or
decrements the counter.

> Also, I have a doubt about encoders' voltage levels:
> I think unipolar encoders are TTL compatible, so I
> can input their values directly into a FPGA,

Not all single-ended encoders are TTL.  Some use TTL
levels, but are driven by open collector drivers, so the
rise times may be slow.  Others use 5-24 V outputs.

> whereas
> I have no idea about how to interface bipolar
> encoders.

By bipolar, I assume you mean differential?  You would use
a differential line receiver to convert to TTL single-ended
levels.

Or, do you mean a ground-centered analog output encoder?
These could be read at the gross resolution level with a
simple comparator, and, in fact, you could use a differential
line receiver with the other input referenced to ground to
convert to TTL.  But, doing this, you lose the higher resolution
the encoder was designed for, since the simple approach
does not interpolate.

Jon




Date Index | Thread Index | Back to archive index | Back to Mailing List Page

Problems or questions? Contact