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 4113 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
Parents
  • Former Member
    Former Member over 13 years ago

    hello Michael;

    i'm using an osilloscope to see my signal, however since the  transient of PCLK and SIN are too fast, i can't see them,

     

    until now this is my progress : i send tow loop to te AD75019

    loop1: a loop of zero '0' (to open all the switch ) to SIN and a loop of PCLK=0 each 256 SCLK cycle -->  all my switch are OPENED

    loop2: a loop of one '1'  (to open all the switch ) to SIN and a loop of PCLK=0 each 256 SCLK cycle -->  more than half of switch are CLOSED the rest are OPENED

    now i'm focusiong how can i add dely to PCLK and SCLK

     

    thanks Michael your help is very precious image.


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

    hello Michael;

    i'm using an osilloscope to see my signal, however since the  transient of PCLK and SIN are too fast, i can't see them,

     

    until now this is my progress : i send tow loop to te AD75019

    loop1: a loop of zero '0' (to open all the switch ) to SIN and a loop of PCLK=0 each 256 SCLK cycle -->  all my switch are OPENED

    loop2: a loop of one '1'  (to open all the switch ) to SIN and a loop of PCLK=0 each 256 SCLK cycle -->  more than half of switch are CLOSED the rest are OPENED

    now i'm focusiong how can i add dely to PCLK and SCLK

     

    thanks Michael your help is very precious image.


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

    Hello Hachani,

     

    I'm glad you are getting somewhere - please let me know how you get on with the improved code.

     

    Michael Kellett

    • 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