Initializing adc16

The ADC16x250-8 must be initialized in a special way before it's used. The instructions to the CASPER sites are not very clear, so here is a step-by-step list of all you have to do in order to make them work. This instructions are for Ubuntu systems:

  • install ruby: sudo apt install ruby ruby-dev
  • install pgplot libraries:
    • sudo apt install pgplot5 libcpgplot0
    • sudo gem install pgplot
    • sudo gem install --source http://w.astro.berkeley.edu/~davidm/gems pgplotter
  • install adc16 libraries: sudo gem install --source http://w.astro.berkeley.edu/~davidm/gems/ adc16
  • copy adc16 repository: git clone git://github.com/david-macmahon/casper_adc16.git
  • run initialization script:
    • cd casper_adc16/ruby/bin
    • ./adc16_init.rb --demux 1 <ROACH_IP> <BOF_NAME>

Keep in mind that you have to load the bof into the ROACH2 internal memory to do the last step. Check here to see how.

I recommend you to take a snapshot of the ADC data before continuing with your model. If you see duplicate values in successive samples, try with ./adc16_init.rb --demux 2 <ROACH_IP> <BOF_NAME>