From 21984a4b1a82e2235e85287fc1f498d86cb84743 Mon Sep 17 00:00:00 2001 From: Kelvin Ly Date: Wed, 8 Jan 2020 00:10:12 -0500 Subject: [PATCH] Boost ADC speed to closer to maximum spec --- rtl/library/adc_driver.v | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/rtl/library/adc_driver.v b/rtl/library/adc_driver.v index 685dbda..5a67609 100644 --- a/rtl/library/adc_driver.v +++ b/rtl/library/adc_driver.v @@ -1,7 +1,10 @@ // driver for the MAX1141 ADC used in the board // it has 4 analog inputs, and is configured to automatically // scan them sequentially while being driven by SCK -// it uses +// it divides the input clock by 16 to produce the SPI clock + +// it writes one configuration word to the ADC and then constantly +// polls it for new data module adc_driver( input clk, input rstn, @@ -25,9 +28,9 @@ assign channel = channel_ff; assign val = adc_val_ff; assign vld = new & ~ack; -reg [1:0] sck_strobe = 0; -wire strobe = &sck_strobe; -wire strobe2 = &(sck_strobe^2'b10); +reg sck_strobe = 0; +wire strobe = sck_strobe; +wire strobe2 = ~sck_strobe; always @(posedge clk) begin if (rstn)