Facebook Pixel

AN-00012 ViSi-Genie Digital Display

 

Description This Application Note explores the possibilities provided by ViSi-Genie for the Digits objects:
• LED digits
• Custom digits
• LED
• User LED
Supported Processor PICASO, DIABLO16
Supported Environment ViSi-Genie
Difficulty Medium

File Downloads
Files

Description

This Application Note explores the possibilities provided by ViSi-Genie for the Digits objects:

This application note requires:

  • Workshop 4 has been installed according to the document Workshop 4 Installation;
  • The user is familiar with the Workshop 4 environment and with the fundamentals of ViSi-Genie, as described in Workshop 4 User Guide and ViSi-Genie User Guide;
  • When downloading an application note, a list of recommended application notes is shown. It is assumed that the user has read or has a working knowledge of the topics discussed in these recommended application notes.

Four ViSi-Genie projects are provided as examples to help you along this application note.

 

Application Overview

It is often difficult to design a graphical display without being able to see the immediate results of the application code. ViSi-Genie is the perfect software tool that allows the user to see the instant results of their desired graphical layout with this large selection of gauges and meters that can simply be dragged and dropped onto the simulated module display.

  •  LED digits
  •  Custom digits
  •  LED
  •  User LED

Each object can have properties edited and at the click of a button, all relevant code is produced in the user program. Each feature of ViSi-Genie will be outlined with examples below.

 

Setup Procedure

This application note comes with a zip file which contains two ViSi-Genie projects.

For instructions on how to launch Workshop 4, how to open a ViSi-Genie project, and how to change the target display, kindly refer to the section “Setup Procedure” of the application note:

ViSi Genie Getting Started – First Project for Picaso Displays (for Picaso)

or

ViSi Genie Getting Started – First Project for Diablo16 Displays (for Diablo16).

 

Create a New Project

Create a New Project

For instructions on how to create a new ViSi-Genie project, please refer to the section “Create a New Project” of the application note

ViSi Genie Getting Started – First Project for Picaso Displays (for Picaso)

or

ViSi Genie Getting Started – First Project for Diablo16 Displays (for Diablo16).

 

Simulation Procedure

Select the Home menu to display the objects:

The Digits objects are located on the Gauges pane:

To add an object, first click on the desired icon, here start with the first one, the LED Digits

…and then click on the WYSIWYG screen to place it.

Add a track-bar as input object…

…from the Inputs pane…

…and place it on the left of the form:

 

By default, the track-bar has the following minimum and maximum values:

Define the event onChanging for the TrackBar0 as LedDigits0Set:

Each time the cursor on the track-bar is moved, the LED digits display is updated accordingly.

 

LED Digits Options

You can load the example…

Example:  4D-AN-00012 PICASO  – LED Digits or 4D-AN-00012 DIABLO16  – LED Digits

…or follow the procedure described hereafter.

Number of Digits

By default, the number of digits is 4.

Number of Decimals

The number of decimals can be adjusted. By default, it is 2.

     

However, the same 1234 figure will be displayed independently of the decimals. Here are the results:

  • 1234 if decimals = 0
  • 4 if decimals = 1
  • 34 if decimals = 2
  • 234 if decimals = 3

Leading Zero

Leading zeroes can be omitted:

    

Colours

There are two colours to define:

  • High for segments on,
  • Low for segments off.

To obtain a high contrast yellow on black display, just define High as yellow and Low as black:

Custom Digits Options

You can load the example…

Example:  4D-AN-00012 PICASO  – Custom Digits or 4D-AN-00012 DIABLO16 – Custom Digits

…or follow the procedure described hereafter.

Start with a new project and select the Custom Digits…

…from the Digits pane…

…and then click on the WYSIWYG screen to place it.

Add a track-bar as input object…

…from the Inputs pane…

…and place it on the left of the form:

By default, the track-bar has the following minimum and maximum values:

Define the event onChanging for the TrackBar0 as CustomDigits0Set:

Each time the cursor on the track-bar is moved, the custom digits display is updated accordingly.

The options provided by the CustomDigits object are limited:

The CustomDigits object is perfect for basic display.

Number of Digits

By default, the number of digits is 4.

LED Options

You can load the example…

Example:  4D-AN-00012 PICASO – LED or 4D-AN-00012 DIABLO16 – LED

…or follow the procedure described hereafter.

Start with a new project and select the LED object…

…from the Digits pane…

…and then click on the WYSIWYG screen to place it.

Add a rocker switch as input object…

…from the Inputs pane…

…and place it on the left of the form:

 

Define the event onChanged for the RockerSwitch0 as Led0Set:

Each time the switch is turned on and off, the LED is updated accordingly.

The options include parameters for the LED and for the caption:

 

Font Options

The font options provide the usual parameters:

For example, the size can be adjusted:

Layout Options

The LED can be placed anywhere compared to the caption…

LED Options

The LED can have different types:

The Spacing parameter defines the distance between the LED and the caption:

Palette Options

Two palettes need to be defined, one for each state:

  • High, when the LED is on;
  • Low, when the LED is off.

In the following example, the LED is red when on or high; and green when off or low:

 

User LED Options

You can load the example…

Example:  4D-AN-00012 PICASO  – User LED or 4D-AN-00012 DIABLO16 – User LED

…or follow the procedure described hereafter.

Start with a new project and select the LED object…

…from the Digits pane…

…and then click on the WYSIWYG screen to place it.

Add a rocker switch as input object…

…from the Inputs pane…

…and place it on the left of the form:

Define the event onChanged for the RockerSwitch0 as UserLed0Set:

Each time the switch is turned on and off, the LED is updated accordingly.

Bevel Options

All the options related to the bevel are under the Bevel line:

Click on the  to show them all:

The standard Windows Open file appears and asks for a video:

Palette and Colours Options

Two palettes need to be defined, one for each state:

  • High, when the LED is on:

   

  • Low, when the LED is off:

   

  • Each palette consists of two colours, one for the top and the other for the bottom, as in this example:

  

  • The example includes the following presentation:

   

 

Build and Upload the Project

For instructions on how to build and upload a ViSi-Genie project to the target display, please refer to the section “Build and Upload the Project” of the application note

ViSi Genie Getting Started – First Project for Picaso Displays (for Picaso)

or

ViSi Genie Getting Started – First Project for Diablo16 Displays (for Diablo16).

The uLCD-32PTU and/or the uLCD-35DT display modules are commonly used as examples, but the procedure is the same for other displays

 

Debugger Output

Setting the handler to Message sends the values to the debugger, Genie Test Executor or GTX.

Launch the Debugger

To launch the Genie Test Executor or GTX, select the Tools menu…

…and then click on the GTX button.

A new screen appears, with the form and objects we have defined previously, here from the LED User example:

Setting the Value of the User LED

The circle is dark green for off:

Press  to send the command to the screen module.

The right part of the GTX window displays the command sent with value 00 00 and the successful acknowledgement 06:

Click on the circle to switch it on: it turns light green.

Press  to send the command to the screen module.

The right part of the GTX window displays the command sent with value 00 01 and the successful acknowledgement 06:

Share: