Converting a Hexadecimal Value to BCD in Vhdl
This is my second post about Vhdl programming on Quartus II and Modelsim. I was searching how to converting a hex number to the bcd (binary coded decimal). Finally i found from web and learned.
As you see will see from the program, we define 8 bit long vector. And program converts a given hex number to bcd. I made two examples and showed at Modelsim.
library ieee; use ieee.std_logic_1164.ALL; use ieee.std_logic_arith.ALL; entity gokhan IS port( D : OUT STD_LOGIC_VECTOR(7 DOWNTO 0)); end gokhan; architecture behavior OF gokhan is begin D <= x"8A"; end behavior; --ozturkgokhan.com
Have a nice day, Gökhan Öztürk
Mart 14, 2016 tarihinde Vhdl içinde yayınlandı ve Altera, CODING, DIY, Electronics, Fpga, programming, Project, Quartus, Vhdl olarak etiketlendi. Kalıcı bağlantıyı yer imlerinize ekleyin. Yorum yapın.