element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Embedded Forum programming AD75019 with FPGA
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 37 replies
  • Subscribers 480 subscribers
  • Views 4128 views
  • Users 0 members are here
Related

programming AD75019 with FPGA

Former Member
Former Member over 13 years ago
Report Post       Today, 06:56 AM

Hello,
please , i want to program AD75019 , an analogue Cross point Switch from analogue devices 16x16, with FPGA, ad75019 have a serial interface, i'have to shift 256 bit into 256 bit shift register , once the register is full i apply a PCLK pulse to to transfer the register to latch (like it's mentionned in the datasheet) my problem is, that i can'T close or open any switch image
please , anyone could help, thanks in Advance

 

this my configuration:

 

VDD:11V
VCC:5V
VSS: 0V

 

SCLK: 1MHZ

 

this how i did the spi interface : a shift register of 256 bit with a state machine for controlling PCLK signal:

 


-- spi_SM.vhd

 


library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_signed.all;
use ieee.std_logic_arith.all;

 

entity spi_SM is

 

generic(N:integer :=256; C:integer :=9; D:integer :=4 );
-- generic(C:integer :=9);
port(
clk :in std_logic;
rst_n:in std_logic;

 

data: in std_logic_vector (N-1 downto 0);
SCLK: inout std_logic; --inout pour qu'il peut etre lu en process
SIN imageut std_logic;
PCLK: out std_logic

 

);
end spi_SM;

 

architecture rtl of spi_SM is

 


type States is (ACTIF, UPDATE, IDLE);
signal state : States := ACTIF;
signal EndSend : std_logic_vector(8 downto 0);
signal t_rst_cnt_n : std_logic ;

 

--Diviseur (pour generer la frequence d'horloge du port SPI(20Khz-5Mhz))
component diviseur
generic ( N : integer := 4 );
port(
clk : in std_logic ;
rst_n : in std_logic ;
clk_out : out std_logic
);
end component;

 

--Compteurnbit
component Compteurnbit
generic ( N : integer := 16 );
port(
clk : in std_logic ;
rst_cnt_n : in std_logic ;
OutCount : inout std_logic_vector(N-1 downto 0)
);
end component;

 


--Sregister
component Sregister
generic ( N : integer := 256 );
port(
clk : in std_logic;
rst_n : in std_logic;
S :in std_logic_vector (N-1 downto 0);-- durée de train d'impulsion
Q : out std_logic
);
end component;

 


begin

 

U0_diviseur : diviseur generic map(D) port map(clk, rst_n, SCLK); ---definir frequence de SPI (clk de base=20 Mhz)
U0_Sregister : Sregister generic map(N) port map(SCLK,rst_n,data,SIN);
U0_Compteurnbit : Compteurnbit generic map(C) port map(SCLK,t_rst_cnt_n,EndSend);-- counting 256 pulse to set EndSend

 


send : process (SCLK,EndSend)
begin

 

if (rst_n='0') then
t_rst_cnt_n<='0';
else
case state is
when
actif=>
if (unsigned(EndSend) = 256) then -- opertation arithmetique donc convertit std_logic_vector en unsigned
PCLK<='0';--0
t_rst_cnt_n<='0';
state<= UPDATE;
else
t_rst_cnt_n<='1';
PCLK<='1';
state<= ACTIF;
end if;
when UPDATE=>
PCLK<='1';--0
-- state<= actif ;
state<= IDLE;
when IDLE=>
PCLK<='1';
state<= IDLE;

 


end case;

 

end if;
end process;

 

end;


  • Sign in to reply
  • Cancel
  • Former Member
    Former Member over 13 years ago

    I note also that after a while like 30 minute SCLK =0 V !

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • michaelkellett
    michaelkellett over 13 years ago in reply to Former Member

    Hello Hachani,

     

    Obviously something is wrong !

     

    Check that you have a good earth (0V) connection between your scope, FPGA and the AD75019.

    Are the pulses nice and square ?

    Are the low voltages all close to zero ?

     

    Can you post a picture of the setup ?

     

    Michael Kellett

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to michaelkellett

    HI Michael,

    i tried every solution that i know, but it still not working imageimage , i join a picture for my setup , you will see many diode, i put them just for testing in case my signal is driving to another output, my input could be any one of them

    i used oscilloscope for triggering a single sequence,  and i found that my sclk, pclk and sin are well sending (time diagram is respected ) , for the SOUT i don't receive any signal image, don't you think that there is some initialisation like sending a number of bits for initilazing ?

     

     

     

    Check that you have a good earth (0V) connection between your scope, FPGA and the AD75019.

     

    AD75019 has a digital ground, since there's a capacitor the potentiel on dgnd is 3.3V

     

     

    Are the pulses nice and square ?

     

    since all switch are closed, the potentiel of the rectangular pulse, become less than before

     

     

    Are the low voltages all close to zero ?

     

     

    for the low voltage, i have just Vss and DGND, so i connect Vss directly to the ground so Vss=0v and DGND is connected to the ground through a 0.1uf capacitor so DGND=3.3V

    image

     

    thanks for your help Michael

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • michaelkellett
    michaelkellett over 13 years ago in reply to Former Member

    I have to rush now so I'll think about it again tomorrow but I'm sure the problem is that digital ground must be at the same potential as analogue ground.

     

    Michael Kellett

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to michaelkellett

    ok thanks Michael

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • michaelkellett
    michaelkellett over 13 years ago in reply to Former Member

    Hello Hachani,

     

    It would be nice to see an circuit diagram but I am sure that you need to connecto 0V to DGND directly, not with a capacitor.

    The 75019 logic is like a big shift register so you won't see your input data coming out of it until the 256th clock pulse.

     

    Michael Kellett

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to michaelkellett

    Hello Michael;

     

    good news image , the AD75019 works finally , thanks to your recommendation ; it was about the DGND , when it's connected directly to the ground  it works correctly, i'm very grateful to you imageimage, can you tell me please why you was sure about it ?

     

    thanks a lot Michael

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • michaelkellett
    michaelkellett over 13 years ago in reply to Former Member

    Hello Hachani,

     

    I'm very happy it's working now. Almost any chip with multiple grounds needs them all to be at almost the same voltage. The AD75019 is a bit odd in that it doesn't have an AGND connection on the chip but it still needs the DGND to be at the right potential relative to the the three power supplies and the only way you can make this happen is if the supply 0V (AGND) is directly connected to DGND.

     

    Did you notice that Paul Clarke has posted an SPI example in the FPGA group - it isn't directly relevant to your application but it's still worth a look. (If you decide to copy his code then please consider using "ieee.numeric_std.all" rather than "ieee.std_logic_unsigned.all" - Google to find out why.)

     

    Michael Kellett

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to michaelkellett

    Hello Michael,

     

    Oh,  i understand now, i want to thank you for all your precious advice image , i will check the SPI code of Paul Clark, thanks again.

     

    Ahmed Hachani

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to Former Member

    Hello Hachani

     

    I am working on a project with the AD75019 and have been facing some problems. I read your post and discussion and figured that you might be able to help me out a little bit.

     

    I am trying to program the AD75019 using at PIC32 microcontroller. I am currently testing the chip for a single input single output configuration. Before I get into the programming part I'd like to know if my connections are right. Must the PCLCK pin be from a clock pin of the microcontroller or can it be any digital output from the microcontroller. I have currently connected it to a digital output pin from the microcontroller and after entering data into the serial buffer register of the microcontroller I output a logic low on the o/p pin and a logic high to represent an active low pulse. I am not sure if that is the right way to go about it.

     

    Also, the power supply connections. I have connected the Vdd to +10V; Vss = Grnd, Vcc = +5V. and as for the DGND pin, should it be grounded or left open or bypassed with a capacitor?

     

    Sorry to bombard you with so many questions but then I have been trying to program this chip for a while now and there isn't a lot of resources or support for this device. Looking forward to your assistance.

     

    Thank you

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
<>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube