1st September 2008, 14:54 #1
Member level 3
Looking for a sample VHDL code for SPI in FPGA
Hi, i am new to vhdl. I am provided with a spartan3 fpga. After sourcing for an ADC(10 bit), i have selected the microchip (MCP3002) which requires SPI.
I am a bit confused on how to start. I've tried reading vhdl code but it doesnt make sense to me. On the ADC datasheets, i know that i need SCK,CS,Din,Dout. What confuses me is on the clock frequency required for SCK? Based on the timing diagrams, it seems to be varying.
Can someone help me on this or if possible, provide any sample VHDL code on SPI so that i can figure it out.
Really appreciate it.
1st September 2008, 14:54