Rules | Recent posts | topic RSS | Search | Register  | Log in

vhdl code for serial communication

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> PLD, SPLD, GAL, CPLD, FPGA Design
Author Message
j hemangini



Joined: 21 Jul 2008
Posts: 35


Post22 Jul 2008 14:10   vhdl code for serial communication

I got this serial in serial out vhdl code , but please tell me how it will work. Because i am not getting any response. Actually i want to communicate this board with hyperterminal and want to display on LCD, what i m writing on hyperterminal.
If someone has code for it then please post it.
Thank you.
Back to top
kvingle



Joined: 05 Nov 2007
Posts: 133
Helped: 12
Location: Mumbai, India.


Post23 Jul 2008 5:14   Re: vhdl code for serial communication

where is the code....?
Back to top
j hemangini



Joined: 21 Jul 2008
Posts: 35


Post23 Jul 2008 5:38   Re: vhdl code for serial communication

This is the code which i got on my mail id.

/////////////////////////////

library ieee;
use ieee.std_logic_1164.all;

entity SISO is
port (clk : in std_logic;
rst : in std_logic;
s_in : in std_logic;
s_out : out std_logic);
end SISO;

architecture s1 of SISO is
begin
process(clk,rst,sin)
begin
if(rst=\'0\') then
sout <= 1\'b0;
elsif(clk=\'1\' and clk\'event) then
sout <= sin;
end if;
end process;
end s1;
Back to top
kvingle



Joined: 05 Nov 2007
Posts: 133
Helped: 12
Location: Mumbai, India.


Post23 Jul 2008 5:47   Re: vhdl code for serial communication

j hemangini wrote:
I got this serial in serial out vhdl code , but please tell me how it will work. Because i am not getting any response. Actually i want to communicate this board with hyperterminal and want to display on LCD, what i m writing on hyperterminal.
If someone has code for it then please post it.
Thank you.


the SISO code looks fine...(except the unwanted '\' syntaxes )

But to archieve the desired communication between board and hyperterminal you'll have to code a UART for serial communication and not a SISO.
Back to top
j hemangini



Joined: 21 Jul 2008
Posts: 35


Post23 Jul 2008 5:56   Re: vhdl code for serial communication

I have used this code removing this unwanted syntex ' \' . Then tell me what i will get if i use this code? Because i am not getting or may be that i am not understanding any response. And if u can provide me code for my problem then please help me.
Thank you.
Back to top
kvingle



Joined: 05 Nov 2007
Posts: 133
Helped: 12
Location: Mumbai, India.


Post23 Jul 2008 6:12   Re: vhdl code for serial communication

what do you mean by not getting any response
if you simulate this code then you will a get signal delayed by one clk. That is what a SISO hardware is supposed to do.

so s_out will be an delayed version of S_in.

what you need for serial communication is an UART. you can find code of UART at www.opencores.org .
Back to top
j hemangini



Joined: 21 Jul 2008
Posts: 35


Post23 Jul 2008 6:45   Re: vhdl code for serial communication

Ok , i try to find code on that web site. Thanks for the information.
Back to top
j hemangini



Joined: 21 Jul 2008
Posts: 35


Post24 Jul 2008 5:42   Re: vhdl code for serial communication

Hi kvingle,
I could not get any VHDL code for UART from the website WWW.OPENCORES.org.
I have also created my account on that website. Please tell me how can i find that code.
Back to top
kvingle



Joined: 05 Nov 2007
Posts: 133
Helped: 12
Location: Mumbai, India.


Post24 Jul 2008 5:47   Re: vhdl code for serial communication

http://www.opencores.org/projects.cgi/web/uart/overview
Back to top
j hemangini



Joined: 21 Jul 2008
Posts: 35


Post24 Jul 2008 6:35   Re: vhdl code for serial communication

Is this type of communication is possible in spartan-3a starter kit? I am not getting uart in this kit.
Back to top
kvingle



Joined: 05 Nov 2007
Posts: 133
Helped: 12
Location: Mumbai, India.


Post24 Jul 2008 7:06   Re: vhdl code for serial communication

yes. It is possible in kit the you are having...you should have RS-232 port (DB-9) connector already mounted on the PCB. refer to the documentation of your kit to know the RxD, Txd pin details..
Back to top
sree205



Joined: 13 Mar 2006
Posts: 417
Helped: 30


Post24 Jul 2008 7:12   vhdl code for serial communication

Usually, SISO is supposed to take the serial input and send out the serial output. Depending on the delay that you need between ur input and output, the width of the register used will vary too.

For example, if u want to have a 8 clock pulse delay between ur input and output, use a 8-bit shift register,where input is fed into the LSB and output is taken out of the MSB or vice-versa
Back to top
j hemangini



Joined: 21 Jul 2008
Posts: 35


Post24 Jul 2008 10:10   Re: vhdl code for serial communication

I got the vhdl code. That link was really very helpful for me. But now i m confused that what should be the pin outs for IntRx_N , IntTx_N ,Addr (1 to 0), DataIn(7 to 0) , DataOut (7 to 0) etc . Because i could not find pinouts for all these. I know only pinouts for RxD & TxD.
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> PLD, SPLD, GAL, CPLD, FPGA Design
Page 1 of 1 All times are GMT + 1 Hour


Abuse
Administrator
Moderators
topic RSS 
sitemap