Forum Discussion
Altera_Forum
Honored Contributor
8 years ago --- Quote Start --- dout <= to_integer(signed(interna_data)); it needs library numeric_std --- Quote End --- ok,, in my code when compile, generate multiple output pins, not a single pin "deci" why? library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity joystick is port ( d1,d2,d3,d4,d5,d6,d7,d8 : in std_logic; deci : out integer range 0 to 255) ; end joystick; architecture lectura of joystick is signal val_bin : std_logic_vector(7 downto 0); begin val_bin <= d8 & d7 & d6 & d5 & d4 & d3 & d2 & d1; deci <= to_integer(signed(val_bin)); end lectura; i can save this output in one only value for send these after data to a serial COM for using in a program in PC? my code generate various output pins.