No announcement yet.

Serial Interface on COM1

  • Filter
  • Time
  • Show
Clear All
new posts

  • Serial Interface on COM1

    I have a project using the gen4-uLCD-24PT where I would like to use the Serial Environment. My hardware is already setup to communicate via the second UART (my original thinking was you wanted COM0 for firmware updates). Can I setup the display to read COM1. I found other post along these lines, but they are a few years old and don't appear to work with the newer firmware.

  • #2
    Hello bfreeman,

    You can use COM1 in the Serial Environment. Just follow these steps:
    1. Open your Workshop4 IDE with the Serial Environment loaded and your display connected. Click on the SPE LOAD under the tools section.
    2. Look and open for the "temp4D" designer file in your PC. It could be in the location This PC> Local Disk (C: )>Users>user>AppData>Local>Temp; or you can simply search for %temp% using your search function.
    3. (This step allows you to alter the default communication port of the serial environment.)
    A. Find and replace all serin() functions with serin1(). (NOTE: Be careful not to change the serinw() user function.)
    B. Find and replace everything that has got to do with the com port.
    Line >>Replace>> With
    210>> com0_Init(combuff,200,0); >> com1_Init(combuff,200,0);
    214, 448 >>com_Count()>> com1_Count()
    *Please see attached file as basis.
    4. Compile and Load the Designer code to the display.

    For Testing, I used a uUSB PA5. You can follow the following steps if you want to test your display.

    5. Connect the uUSB PA5 to the display. uUSB PA5's RX to the display's TX1 and uUSB's PA5's TX to the display's RX1.
    6. Go to Comm's section and make sure to choose the uUSB PA5's port. It would display "Device is not responding" but that's alright.
    7. Run the Serial Commander under the Tools Section and choose the Command that you'd like to use. Ex: gfx > cls would clear the display's screen.

    I hope this helps.

    Best Regards,
    Attached Files
    Last edited by Eran; 3 April 2018, 04:38 PM.


    • #3
      That worked. Thank you so much.