Problems with inout, please help!!

Discussion in 'VHDL' started by piolin86, Oct 13, 2011.

  1. piolin86

    piolin86

    Joined:
    Oct 13, 2011
    Messages:
    7
    I try to make a sensor with one input a three inoutputs. If the sensor change its value, send the information for three outputs and if un inoupts receive sth it send the information to the rest but not by itself. This is my code, I hace latch beacuse I change the value in two different places, but i dont know hoy can i make it. Please help me.

    Lectura is the port when the inout received something.
    Ad1,2,3 is the acumulator to compare the value
    d1,d2,d3 its the inout

    if (lectura1='1' or lectura2='1' or lectura3='1') THEN
    if (lectura1= '1' AND d1/=Ad1 AND lectura2 ='0' AND lectura3 ='0') THEN
    d2<= d1;
    d3<= d1;
    Ad1 <= d1;
    d1 <= d1;
    Ad2<= Ad2;
    Ad3<= Ad3;
    elsif (lectura1= '0' AND d2/=Ad2 AND lectura2 ='1' AND lectura3 ='0') THEN
    d1<= d2;
    d3<= d2;
    Ad1 <= Ad1;
    d2 <= d2;
    Ad2<= d2;
    Ad3<= Ad3;
    elsif (lectura1= '0' AND d3/=Ad3 AND lectura2 ='0' AND lectura3 ='1') THEN
    d1<= d3;
    d3<= d3;
    Ad1 <= Ad1;
    d2 <= d3;
    Ad2<= Ad2;
    Ad3<= d3;
    else
    d1<="00000000";
    d2<="00000000";
    d3<="00000000";
    Ad2<= Ad2;
    Ad1 <= Ad1;
    Ad3<= Ad3;
    end if;
    else
     
    piolin86, Oct 13, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Cazed

    problems with inout port

    Cazed, Feb 2, 2006, in forum: VHDL
    Replies:
    6
    Views:
    829
    ake.forslund@gmail.com
    Mar 1, 2006
  2. KK
    Replies:
    2
    Views:
    664
    Big Brian
    Oct 14, 2003
  3. =?ISO-8859-15?Q?Fr=E9d=E9ric_Lochon?=

    connecting std_logic inout ports and std_logic_vector inout port

    =?ISO-8859-15?Q?Fr=E9d=E9ric_Lochon?=, Nov 6, 2007, in forum: VHDL
    Replies:
    3
    Views:
    877
  4. Ken

    inout to inout

    Ken, May 9, 2008, in forum: VHDL
    Replies:
    2
    Views:
    645
    Aiken
    May 9, 2008
  5. THurkmans
    Replies:
    14
    Views:
    1,910
    Mike Treseler
    Aug 11, 2009
Loading...

Share This Page