Forum Discussion

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

How to communicate via RS-232 (UART) between board Altera de2 and RFID reader

Hi friends,

I'm working on a project that aims to communicate between an Altera DE2 board (FPGA) with an RFID reader using the standard RS-232. I have some issues about the serial communication:

1 - I would like to open the serial port of the RFID reader through a C code embedded in the FPGA avoiding the use of an operating system? If so, how do that?

2 - How do I create a buffer of up to 20 bytes for transmission by the UART RS-232 FPGA to the RFID reader as the UART is limited to sending and receiving one byte at a time?

In advance, thank you for your help.

Best regards,

Lenardo Chaves.

2 Replies

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

    Hi,

    1. You can use a Nios II Processor, operating system is not compulsory

    2. You can use functions provided by the HAL (e.g. fwrite).

    Have a look on section 6 (UART Core) of "Quartus II Handbook Version 9.0 Volume 5: Embedded Peripherals", they detail the core and explain the software programming model with example.

    Jérôme
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Also - there are many examples for this out there on the web... try googling for FPGA-UART