- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Re: spartan 3e adc- spi
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-21-2010 03:44 AM
pumaju1808 wrote:
Another question, so XPS_DeltaSigma core when is used??, in what kind of "hardware"??
This doc may be helpful. Post again if you don't find the answer inside.
- Bob
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369
Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Re: spartan 3e adc- spi
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-21-2010 10:44 AM
zc20060102 wrote:
First ,you should make sure you have sent the gain succesfully.Second , you'd better slow down the clk .
It's hard to capture the data from ad throuh spi because the timing is tight.Read the datasheet carefully,ad1407a outputs data at least 8 ns after rising edge of spi clk.you may implement constrains on some signals. good luck.
Dunno what you're on about, but the usual thing one does with SPI or SPI-like interfaces is to realize that the device will output data on the falling edge of the clock and you capture it in on the rising edge of the clock. With typical SPI speeds you have plenty of set-up time here. If your FPGA has a much higher speed clock from which the SPI clock is derived, you can (and probably should) use a simple rising-edge detector to shift in each bit.
----------------------------------------------------------------
Yes, I do this for a living.
Re: spartan 3e adc- spi
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-16-2011 11:36 AM
Not is necesary add 2 ipcores spi, only, configure in the ucf file. Dont forget that ss port are than a array of pins, and you can simply put Net ss<0> Pin=............ Net ss<1> Pin=..............
Re: spartan 3e adc- spi
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-16-2011 11:49 AM - edited 02-16-2011 11:51 AM
celojan wrote:
Not is necesary add 2 ipcores spi, only, configure in the ucf file. Dont forget that ss port are than a array of pins, and you can simply put Net ss<0> Pin=............ Net ss<1> Pin=..............
Even if this thread hadn't been dormant for 5 months, this entire thread - and especially this latest post, on its own merits - deserves an appropriate followup response.
- Bob Elkind
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369
Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Re: spartan 3e adc- spi
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-17-2011 08:10 PM
Dear Sir,
I am facing problems with the adc spi interface. I am seeing only 2FFF in my seven segment disply. But that too is blinking. I divided the 50M clock to a 1M clock and i am using that clock. I will post my codes here. Kindly let me know what is the problem in the code that is making it to give output as previosuly mentioned. Also, I do not get what celojan had posted earlier regarding the ucf file.The code I am using is a modifed version of a code I got from the forum. Thanks in advance. I have disabled the other devices like dac_Cs in the toplevel code. So I have commented it here.
!!
--------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 09:17:56 02/27/2008
-- Design Name:
-- Module Name: ADC_AMP - Behavioral
-- Project Name:
-- Target Devices:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
--------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity ADC_AMP is
Port (
spi_AMP_SHDN : out std_logic;
amp_dout :in std_logic;
ce_amp : in std_logic;
gain : in std_logic_vector(7 downto 0);
clk50 : in STD_LOGIC;
start_conv : in STD_LOGIC;
SPI_MISO : in std_logic; --adc
-- sample: out std_logic;
CONV : out STD_LOGIC; --adc
ADC1 : out std_logic_vector(13 downto 0):= (others => '0');
ADC2 : out std_logic_vector(13 downto 0):= (others => '0');
AMP_CS : out STD_LOGIC;
MOSI : out STD_LOGIC; -- amp
SCK : out STD_LOGIC
);
end ADC_AMP;
architecture Behavioral of ADC_AMP is
type state_type is (IDLE1,IDLE, START,START2,HI,HI_DUMMY,LO,LO_DUMMY,FINE,IDLE_AD, START_AD,HI_AD,LO_AD,FINE_AD);
signal state : state_type;
signal counter : std_logic_vector (5 downto 0);
signal sample : std_logic;
-- signal ADC2 : std_logic_vector (13 downto 0);
signal bit_count: std_logic_vector (4 downto 0);
signal gain_temp: std_logic_vector (7 downto 0);
begin
-- strataflash_oe <= '1';
-- strataflash_we <= '1';
-- strataflash_ce <= '1';
-- platformflash_oe <= '0';
--DAC_CS <= '1';
--SPI_SS_B <= '0';
process(clk50)
begin
if clk50'event and clk50 ='1' then
case state is
when IDLE1 => if ce_amp = '1' then
when IDLE =>
spi_AMP_SHDN <= '0';
SCK <= '0';
AMP_CS <= '1';
MOSI <='0';
counter <= "000000";-- 0;
state <= START;
when START =>
state <= LO_DUMMY;
bit_count <= "00000"; --:=0;
AMP_CS <= '0';
gain_temp <= gain;
when START2 =>
state <= HI;
MOSI <= gain_temp(7);
when HI =>
if counter = "000010" then--2 then
state <= HI_DUMMY;
else
SCK <= '1';
counter <= counter +1;
state <= HI;
end if;
when HI_DUMMY =>
bit_count <= bit_count + 1; --:= bit_count + 1;
state <= LO;
counter <= "000000";--0;
SCK <= '1';
gain_temp(7 downto 1) <= gain_temp(6 downto 0);
-- mosi <= amp_dout;
when LO =>
if bit_count = "01000" then --8 then
state <= FINE;
elsif counter = "000010" then --2 then
MOSI <= gain_temp(7);
state <= LO_DUMMY;
else
SCK <= '0';
counter <= counter +1;
state <= LO;
end if;
when LO_DUMMY =>
counter <="000000";
SCK <= '0';
state <= HI;
when FINE =>
AMP_CS <='1';
SCK <= '0';
MOSI <= '0';
state <= IDLE_AD;
when IDLE_AD =>
AMP_CS <= '1';
SCK <= '0';
CONV <= '0';
sample <='0';
if CE_AMP = '0' then
state <= IDLE1;
elsif start_conv = '1' then
state <= START_AD;
else
state <= IDLE_AD;
end if;
when START_AD =>
SCK <= '0';
CONV <= '1';
counter <= "000000";--0;
sample <='0';
state <= HI_AD;
when HI_AD =>
SCK <= '1';
CONV <= '0';
counter <= counter +1;
sample <='0';
state <= LO_AD;
when LO_AD =>
SCK <= '0';
if counter = "010100" then
elsif counter = "010101" then
elsif counter = "010110" then
elsif counter = "010111" then
elsif counter = "011000" then
elsif counter = "011001" then
elsif counter = "011010" then
elsif counter = "011011" then
elsif counter = "011100" then
elsif counter = "011101" then
elsif counter = "011110" then
elsif counter = "011111" then
elsif counter = "100000" then
elsif counter = "100001" then
else
end if;
if counter = "100010" then
else
end if;
when FINE_AD =>
state <= IDLE_AD;
counter <= "000000";
SCK <= '0';
CONV <= '0';
sample <= '1';
when others =>
SCK <= '0';
CONV <= '0';
-- AMP_CS <= '1';
-- MOSI <='0';
state <= IDLE_AD;
end case;
end if;
end process;
end Behavioral;
Re: spartan 3e adc- spi
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-01-2011 09:30 AM
Please try it..!!!!! I hope that you understand the verylog code...!!!!
Re: spartan 3e adc- spi
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-15-2011 05:38 AM
I don't get a part of your vhdl-code, you're not initialising the gain-parameter. Shouldn't you be sending temp_gain to the gain-parameter in the end of the preamp part?
greetings
Re: spartan 3e adc- spi
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-20-2011 04:34 AM
Thanks a lot for sharing the verilog code.......its very easy to understand and gives a good idea on how the sampling will be done.
i wanted to know did you tested it on the kit yet?.
Re: spartan 3e adc- spi
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-07-2012 02:43 PM
please someone help me with some project using spi spartan 3e card 1600???
Re: spartan 3e adc- spi
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-07-2012 06:55 PM
latinotaty wrote:
please someone help me with some project using spi spartan 3e card 1600???
It might be an interesting project to see what happens when you put the board into the microwave over and set the oven on high for a few minutes.
----------------------------------------------------------------
Yes, I do this for a living.











