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)