Boost ADC speed to closer to maximum spec

This commit is contained in:
Kelvin Ly 2020-01-08 00:10:12 -05:00
parent faaf9415a0
commit 21984a4b1a
1 changed files with 7 additions and 4 deletions

View File

@ -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)