Using the module
Interfacing with this module is very simple. Hook up
all of the appropriate signals (see the comments in the file) and control
it as follows.
- Start by providing a reset pulse of some duration. I found that
64 clock cycles at 50MHz worked well. If you don't, the pre-amp
hardware doesn't settle correctly.
- When you are ready to program the gain, load the pre-amp gain into
the gain bus, and then pulse amp_cfg for one clock cycle.
- Wait for amp_done to go high. Now you
can begin sending ADC conversion requests whenever you want.
- To get a sample from the ADC, pulse start_conv for
one clock cycle and wait for to go high. At
this point, the signals adc_a and adc_b will be valid until the next conversion request.
Eventually I may add support for continuous gain control, but for now
you can only set it in the begining.