Announcement

Collapse
No announcement yet.

UART communication

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • UART communication

    Hi,
    I'm new in working on 4D screens. Actually, I'm using a GEN4-ULCD-43DCT-CLB-SB and I'd like to connect it to a Texas Instrument board by UART. I'm also using the gen4-IB adapter to connect them.
    In particular, I'd like to send a character to the TI board using the keyboard on the display. So far, I can't read anything, can you suggest me how to do that? Should I use Visi or Visi Genie? How can I set the communication up?
    Thank you.
    Sam

  • #2
    Hi,

    You would be best to use the Visi environment for this task as you are sending a single character via serial.

    I have attached a simple example that will send a character from the keyboard at 115200 baud.

    Best regards

    Paul
    Attached Files

    Comment


    • #3
      Hi Paul,
      Thank you very much for your reply and the example. Very useful!
      And in case I'd like to print on the screen a string coming from the TI board? What should I do?
      Thanks in advance.
      Best regards,
      Samuele

      Comment


      • #4
        Hi Samuele,

        I have modified the example to print the characters sent from your TI Board.

        Best regards

        Paul
        Attached Files

        Comment


        • #5
          Hi Paul,
          thank you. I have a last question. How can I modify the code in order to put the keyboard in the second form. I'd like to use a "user button" to switch from the first form to the second one, where the keyboard is placed (and that's ok). But the keyboard is not working anymore, can you provide me with an example?
          Moreover, I'd like to print the letters (coming from the uart) in a "string" object. How can I do that?
          Thank you!

          Best regards,

          Sam

          Comment


          • #6
            Hi Samuele,

            It would be easier If I was to look at your code as it is now and recommend changes to make it work as you need. Would it be possible to send your project as it is now.

            Best regards

            Paul

            Comment


            • #7
              Hi Paul,
              thank you for the reply. Most of my project has been implemented in Visi Genie, so now I'm trying to write it in Visi since I want the UART communication between the keyboard and the TI board.
              Nevertheless, I've just read in the documentation that is possible to add "magic code" and "magic keyboard" objects in the Visi Genie environment. So, I was wondering if it is possible to implement the UART connection adding a piece of code in the project I already made.
              In my project in Visi Genie, there is a keyboard in the third form and it prints letters in a string object. I'd like to keep printing these letters and at the same time send them to the TI board via UART.
              Thanks.

              Best regards,

              Sam

              Comment


              • #8
                Hi Sam,

                These application notes may help.

                https://4dsystems.com.au/blog/4d-an-00154/
                https://4dsystems.com.au/blog/4d-an-00003/
                https://4dsystems.com.au/blog/4d-an-00199/
                https://4dsystems.com.au/blog/4d-an-00188/

                Best regards

                Paul

                Comment

                Working...
                X