1
0
mirror of git://projects.qi-hardware.com/nn-usb-fpga.git synced 2025-01-21 06:01:06 +02:00

Adding diagrams to DOCS and fixing someting source code.

This commit is contained in:
Juan64Bits 2010-04-14 21:45:30 -05:00
parent bde2a0a3cb
commit 47c949c5d3
12 changed files with 12 additions and 11 deletions

Binary file not shown.

View File

@ -2,7 +2,7 @@
ADCw::ADCw()
{
BUFFER_OFFSET = 9;
BUFFER_OFFSET = 8; //Ignore first 16 samples
ADC_SPI_CLKDIV=ADC_SPI_CLKDIV_MAX; //Set clock to minimum speed
BUFFER_LEN=16;
MUX_CHANNELS =0;
@ -65,7 +65,7 @@ JZ_REG* ADCw::takeSamplesADC(int CHANNEL)
void ADCw::adcConfig(uchar CMD)
{
ADCBuffer[0] = (((MUX_CHANNELS<<6) + CMD)<<24) + \
((BUFFER_LEN+(BUFFER_OFFSET-1)*2) << 8) + \
((BUFFER_LEN+BUFFER_OFFSET*2) << 8) + \
(ADC_SPI_CLKDIV);
while(adcCheckBufferFull()) usleep (10);
}

View File

@ -1,6 +1,6 @@
#############################################################################
# Makefile for building: ADC
# Generated by qmake (2.01a) (Qt 4.6.2) on: Mon Apr 12 21:21:04 2010
# Generated by qmake (2.01a) (Qt 4.6.2) on: Wed Apr 14 21:04:10 2010
# Project: ADC1.pro
# Template: app
# Command: /home/juan64bits/ebd/ECB/openwrt-xburst/build_dir/target-mipsel_uClibc-0.9.30.1/qt-everywhere-opensource-src-4.6.2/bin/qmake -spec ../../../../openwrt-xburst/build_dir/target-mipsel_uClibc-0.9.30.1/qt-everywhere-opensource-src-4.6.2/mkspecs/qws/linux-openwrt-g++ -unix -o Makefile ADC1.pro

Binary file not shown.

View File

@ -17,8 +17,7 @@ module ADC_peripheral( clk, reset, cs, ADC_EOC, ADC_CS, ADC_CSTART,
wire [7:0] rdBus1;
reg [7:0] wrBus2;
reg [10:0] addr2;
reg we1=0;
reg we2=0;
reg we1=0, we2=0;
wire we;
//Control registers
@ -40,6 +39,7 @@ module ADC_peripheral( clk, reset, cs, ADC_EOC, ADC_CS, ADC_CSTART,
//TEMPS
reg [9:0] SIZEB1=0; // Temporal for buffer size
reg [9:0] SIZEB2=0; // Temporal for buffer size
wire[9:0] subSIZEB; // Temporal for subtraction SIZEB1-SIZEB2
reg [2:0] CMD_OFFSET=0; // Channel offset counter MOD8
wire[2:0] CMD_OFFSETt; // Channel offset to use
wire[3:0] CMD_ADCt; // Temporal for channel offset
@ -245,14 +245,14 @@ module ADC_peripheral( clk, reset, cs, ADC_EOC, ADC_CS, ADC_CSTART,
2: begin
//Write data on BRAM (LOW)
wrBus2[7:0] <= out_buffer[7:0];
addr2 <= 4+2*(SIZEB1-SIZEB2);
addr2 <= {subSIZEB,1'b0};
we2 <= 1; w_st2 <= 3;
end
3: begin we2 <= 0; w_st2 <= 4; end
4: begin
//Write data on BRAM (HI)
wrBus2[7:0] <= {CMD_OFFSETt,2'b00,out_buffer[9:8]};
addr2 <= 5+2*(SIZEB1-SIZEB2);
wrBus2[7:0] <= out_buffer[9:8];
addr2 <= {subSIZEB,1'b1};
we2 <= 1; w_st2 <= 5;
end
5: begin
@ -261,6 +261,8 @@ module ADC_peripheral( clk, reset, cs, ADC_EOC, ADC_CS, ADC_CSTART,
endcase
end
assign subSIZEB = SIZEB1-SIZEB2;
// ADC channel offset, counter MOD8
always @(posedge clk)
if(fullB | reset)

View File

@ -1 +0,0 @@
Juan64Bits ,juan64bits,Maximus,12.04.2010 22:34,file:///home/juan64bits/.openoffice.org/3;

Binary file not shown.

BIN
docs/wiki/ADC_BUFFER.dia Normal file

Binary file not shown.

BIN
docs/wiki/ADC_BUFFER.dia~ Normal file

Binary file not shown.

BIN
docs/wiki/ADC_CONTROL.dia Normal file

Binary file not shown.

BIN
docs/wiki/ADC_SPI_CTRL.dia Executable file

Binary file not shown.

Binary file not shown.