Skip to content

Designer or ViSi: PICASO Serial Communication

Introduction

This codebase example shows how UART serial communication is implemented on a PICASO display module. More specifically, this codebase example shows how to read data from the serial port, how to print the received data on the screen, and how to send the data back to the serial port. Furthermore, the concept of buffered serial communication is illustrated.

Prerequisites

Before reading this codebase example, the reader is expected to know the basics of creating a Designer project in the Workshop4 IDE and downloading the compiled program onto a display. Beginners may refer to the application note Designer: Getting Started - First Project.

Readers who want to study more basic 4DGL code examples may refer to the following application notes.

Instructions

Follow the instructions below to run this example. The reader is also advised to watch the accompanying video.

Part 1: Use the Serial Port COM0

  1. Prepare the display and programming modules.
  2. Open the Designer project "serialPBasic_R_1_0" in the Workshop4 IDE.
  3. Connect the display-and-programming modules setup to a USB port of the PC.
  4. Make sure that the Workshop4 IDE is able to detect the display module (select the correct COM port).
  5. Compile the code and download (or upload) the program to the display module.
  6. Open the Serial Terminal utility in Workshop.
  7. Send ASCII bytes to the display module.

Part 2: Use the Serial Port COM1

  1. Open the Designer project "serialPBasic_R_1_0b". Compile it and download the program to the display module. Then disconnect the programming module from the display module.
  2. Prepare the programming module. Here COM1 is used and the programming module is connected to the display module using jumper wires.
  3. Connect the display-and-programming modules setup to a USB port of the PC.
  4. Open the Serial Terminal utility in Workshop.
  5. Send ASCII bytes to the display module.

Part 3: Buffered serial communication Illustrated

  1. Open the Designer project "serialPBasic_R_1_0c". Compile the code and download the program to the display module.
  2. Use the Serial Terminal Utility to send and receive bytes to and from the display module. Send ten or less bytes at a time.

If not familiar with the details of opening a Designer project and programming the display module, consult the application note Designer: Getting Started - First Project.

Attachment

Project File