+ Post New Thread
Results 1 to 6 of 6
  1. #1
    Newbie level 2
    Points: 795, Level: 6

    Join Date
    Jul 2008
    Posts
    2
    Helped
    0 / 0
    Points
    795
    Level
    6

    rs232 vhdl

    I have a Xilinx Spartan-3E and what i want to do is this:

    Press a button ex. East Button on the board and send a signal eg. "00101100" to a device on the other end of Spartans RS232 port.

    Like when i press the button and the leds are on i want to send this signal over the serial port lets say to a PC on the other end.

    The only thing i have done is to send a character via hyperterminal to the board and return me another character. but when i try to use the board as the master i get stuck.

    As you might think i am new to this area. Thanks.

    •   AltAdvertisement

        
       

  2. #2
    Advanced Member level 5
    Points: 32,456, Level: 44

    Join Date
    Apr 2002
    Location
    USA
    Posts
    3,942
    Helped
    663 / 663
    Points
    32,456
    Level
    44

    vhdl rs232

    Here is one possible approach to the project. Each time the button is pressed, you can load a shift register with the desired serial bit pattern, including the start and stop bits. The clock shifts the register out to the serial port. Of course you also need a baud rate counter that controls the shift rate. You may also need to debounce the pushbutton. That's just one general approach.


    1 members found this post helpful.

    •   AltAdvertisement

        
       

  3. #3
    Newbie level 2
    Points: 795, Level: 6

    Join Date
    Jul 2008
    Posts
    2
    Helped
    0 / 0
    Points
    795
    Level
    6

    rs232 spartan 3e

    I was thinking of writing a Wishbone Master interface so that it is triggered every time i press a button on the board and will send the data associated to that button. Just by sending the data as you proposed it is not always sure if the data will be sent if the channel is busy.
    The thing is that i am trying to write the VHDL code without having much experience on that field.

    --- Update begins ---
    I finally did it! I used the Wishbone interface to send and receive data from the FPGA to the PC and tomorrow i will try to drive a robotic arm using the signals i send via the serial port from the FPGA to the robotic arm. Hope it works.
    --- Update ends ---



    •   AltAdvertisement

        
       

  4. #4
    Newbie level 2
    Points: 790, Level: 6

    Join Date
    Jul 2008
    Posts
    2
    Helped
    0 / 0
    Points
    790
    Level
    6

    spartan 3e rs232

    hey can you give me the code? I am looking at using an RS 232 too and am having a few probs



  5. #5
    Junior Member level 1
    Points: 591, Level: 5

    Join Date
    Feb 2010
    Posts
    18
    Helped
    0 / 0
    Points
    591
    Level
    5

    Re: RS232 VHDL code for Spartan-3E

    Can I get this code as well? I'm trying to send data over the rs232 com port.

    Thanks a bunch.



    •   AltAdvertisement

        
       

  6. #6
    Full Member level 2
    Points: 2,255, Level: 11
    Achievements:
    7 years registered

    Join Date
    Jul 2009
    Location
    Turkey
    Posts
    147
    Helped
    21 / 21
    Points
    2,255
    Level
    11

    RS232 VHDL code for Spartan-3E

    you can find the code int the pong's book. Here is the nme of book
    FPGA prototyping by VHDL examples: Xilinx Spartan-3 version



--[[ ]]--