0
\$\begingroup\$

I'm stuck with a sampling issue. I'm trying to sample a serial data line coming from a sensor. Basically, I send clk (max. 5Mhz) from the FPGA to the sensor, and then I receive the data bits from the sensor (1 bit per clock cycle).

I have written (in Verilog) a module to send a 5Mhz clk to the sensor, but I don't know how to sample a 5Mhz serial data line with a 50Mhz FPGA.

Any ideas?

asked Mar 17, 2018 at 0:29
\$\endgroup\$
1
  • \$\begingroup\$ What kind of FPGA? Different ones have different input capabilities. \$\endgroup\$ Commented Mar 17, 2018 at 0:48

1 Answer 1

1
\$\begingroup\$

One simple way is to create a clock enable signal, which pulses high once every 10 clock cycles (of your 50 MHz system clock).

Register your incoming serial data as an input to a DFF, clocked with your system clock, and clock-enabled with the signal created above.

This keeps your registers clocked properly, and prevents cross-domain clocking issues.

answered Mar 17, 2018 at 0:41
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.