Re:VHDL anyone ?


 

Hi folks,

does anybody know where I can find VHDL source
for a quadrature decoder ?
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, whereas
I have no idea about how to interface bipolar
encoders.

Can anybody give me a hint ?

Thanks,
Guido

following fits in a GAL 22V10. It generates an UP or DOWN pulse from a quadrature signal.
There is one pulse on every edge of the encoder, so the actual pulses per revolution are multiplied by 4.
I hope this wil help you. Any further questions, mail me ...
 
Luc Vercruysse
 
 
 
; pin assignments
PIN 2 CLK ; clock pin
PIN 3 A ; Channel A
PIN 4 B ; Channel B
PIN 20 S1
PIN 21 S2
PIN 23 S3 ;
PIN 24 S4 ;
PIN 17 UP
PIN 18 DOWN
PIN 19 PULSE
PIN 26 PHI0
PIN 27 PHI90
; Boolean equations for registers
EQUATIONS
 
PHI0 := A
PHI90 := B
/S1 := /PHI0
/S2 := /S1
/S3 := /PHI90
/S4 := /S3
 
 
DOWN = S1 * S2 * S3 * /S4 * PHI0 * PHI90
+ /S1 * /S2 * /S3 * S4 * /PHI0 * /PHI90
+ S1 * /S2 * /S3 * /S4 * PHI0 * /PHI90
+ /S1 * S2 * S3 * S4 * /PHI0 * PHI90
 
UP = /S1 * /S2 * S3 * /S4 * /PHI0 * PHI90
+ S1 * S2 * /S3 * S4 * PHI0 * /PHI90
+ S1 * /S2 * S3 * S4 * PHI0 * PHI90
+ /S1 * S2 * /S3 * /S4 * /PHI0 * /PHI90
 


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

Problems or questions? Contact