Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
10 years ago

RS232 rxd code

Hi :)

i'm new here and i need some help...

i work on project and i need to read from kind of machine some letters... there is an ascii code to all letter. this machine send words that i need to read them. in this words i need to check the letters (Y/N)?

for the start of this check i want to check one letter/char for example: ( or Y or / .

i know that machine send '1' (idle) always and when i press "reset" on this machine, the machine send words that i need to read with start bit+8 bits (data)+stop bit.

I'll be glad if someone would help me to write this code or give me examples of rxd codes :)

thanks...

14 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    I would use a timer for waiting, and add a state to check the timer.

    --- Quote End ---

    can you show me how?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I could, but there is enough reference material on the www. Use your favorite search engine and search for VHDL Timer.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You might think about changing the clock and use the wait timer to also time the bits.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    I could, but there is enough reference material on the www. Use your favorite search engine and search for VHDL Timer.

    --- Quote End ---

    --- Quote Start ---

    You might think about changing the clock and use the wait timer to also time the bits.

    --- Quote End ---

    its work :) rx was connected to rx and tx was connected to tx but its work just if rx to tx and tx to rx (wires)...

    thank you all :)