Skip to content

ViSi: Pulse Width Modulation with RGB LEDs


This codebase example demonstrates how pulse width modulation (PWM) is implemented on the uLCD-35DT, which is a DIABLO-16 display module.


This codebase example assumes the reader can program the 4D Systems display module using Workshop4 IDE ViSi environment. Beginners are advised to read the following aplication notes.


Hardware Setup

The project outputs the pulse-width modulated signals on pins PA4, PA5, and PA6. An LED and a series resistor are connected to each of these pins, as shown below.


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

  1. Extract the content/s of the Workshop4 Project zip file to a folder.
  2. Open the project in Workshop.
  3. Compile the project source code and download or upload the program to the target display module (a uLCD-35DT in this codebase example). Let Workshop copy the supporting files to a uSD card mounted to the PC.
  4. Properly unmount the uSD card from the PC and mount it to the display module.


Project File