PicoP Gen4 Windows SDK Getting Started Guide DA0140033 Pico P

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 12

DownloadPicoP Gen4 Windows SDK Getting Started Guide DA0140033 Pico P
Open PDF In BrowserView PDF
Getting Started with PicoP® Gen4 SDK for Windows

1. Abstract
This guide explains how to get started with the MicroVision Windows Software Development Kit
(SDK) for its 4th Generation PicoP Scanning Engines (PSE). The PicoP Windows SDK allows
developers to quickly and easily integrate PicoP Scanning Engine control into a Windows
application. The Windows Application can communicate with PSE over USB or UART. The SDK
package includes the C Application Programming Interface (API), SDK libraries, documentation,
and sample projects that demonstrate use of some basic (PSE) functions. The sample applications
have been developed and built using Microsoft Visual Studio 2017.

2. Table of Contents
1.

ABSTRACT .........................................................................................................................................................1

2.

TABLE OF CONTENTS ...................................................................................................................................1

3.

ACQUIRING AND INSTALLING THE PICOP WINDOWS SDK ..............................................................2

4.

ACCESSING SDK DOCUMENTATION ........................................................................................................4

5.

USING THE PICOP APPLICATION PROGRAMMING INTERFACE (API) ..........................................5
5.1.
SDK VERSION CONTROL ..............................................................................................................................5
5.2.
STEP 1: LINK SDK LIBRARY TO THE APPLICATION .......................................................................................5
5.3.
STEP 2: INITIALIZE THE SDK LIBRARY .........................................................................................................5
5.4.
STEP 3: CONNECT TO PICOP ..........................................................................................................................6
5.5.
STEP 4: CONFIGURE AND CONTROL PICOP ....................................................................................................6
5.5.1.
Connection Management .....................................................................................................................6
5.5.2.
Display Control Functions ..................................................................................................................7
5.5.3.
System Management Functions ...........................................................................................................8
5.5.4.
Input Control Functions ......................................................................................................................8
5.5.1.
3D Sensing Functions ..........................................................................................................................8
5.5.2.
Rendering Functions ...........................................................................................................................8
5.6.
STEP 5: EXIT APPLICATION ...........................................................................................................................9

6.

“HELLO, WORLD“ - PROGRAM ................................................................................................................ 10

7.

PICOP_CONSOLE SAMPLE PROJECT ..................................................................................................... 11
7.1.
7.2.

PREREQUISITES ........................................................................................................................................... 12
BUILDING THE PICOP_CONSOLE SAMPLE APPLICATION ............................................................................. 12

PicoP Gen4 Windows SDK Ver. 1.3 Getting Started Guide
MVIS #: DA0140033 May 2019 Revision A.3
© 2018 MicroVision, Inc. All rights reserved.

MicroVision.com
Page 1 of 12

PicoP® is a registered trademark of MicroVision, Inc.
Specifications subject to change without notice.

Getting Started with PicoP® Gen4 SDK for Windows

3. Acquiring and Installing the PicoP Windows SDK

The latest PicoP Windows SDK can be cloned or downloaded from:
https://github.com/MicroVision-Inc/Interactive_Projection/tree/master/PicoP_Windows_SDK

Alternatively, the SDK may be delivered as a compressed zip file named
PicoP_Windows_SDK_Ver_X_Y_Z.zip. The X_Y_Z postfix of the file name represents the version
number of the SDK (X equals the major version, Y the minor version, and Z the patch number of the
SDK). To install the SDK, simply unzip the file into c:\PicoP_Windows_SDK or another directory
of your choice.
The downloaded or unzipped destination folder will contain the following subfolders:

PicoP Gen4 Windows SDK Ver. 1.3 Getting Started Guide
MVIS #: DA0140033 May 2019 Revision A.3
© 2018 MicroVision, Inc. All rights reserved.

MicroVision.com
Page 2 of 12

PicoP® is a registered trademark of MicroVision, Inc.
Specifications subject to change without notice.

Getting Started with PicoP® Gen4 SDK for Windows

The files/folders included in the SDK distribution package are described in more detail below:
SDK Root folder

PicoP_Windows_SDK
Docs
Reference_Guide
index.html

Interface

Lib

*.html
DA0140028_PicoP_Gen4_Progra
mmers_Guide.pdf
EULA.pdf

Detailed Programmer’s Reference Guide
Programmer’s Reference Guide entry point
Programmer’s Reference Guide documentation
High-Level Programmer’s Guide

PicoP_rpc.dll
PicoP_rpc.lib
PicoP_rpc.exp

SDK End User License Agreement
PicoP SDK API Interface
PicoP SDK header file with function prototypes
PicoP SDK definitions files
PicoP SDK return codes
PicoP SDK Windows libraries (64-bit)
PicoP SDK dynamic link library
PicoP SDK import library
PicoP SDK library export

Bin

Contains the 64-bit executables for the sample
applications.

picop_api.h
picop_def.h
picop_rc.h

Samples

Simplest “Hello, World” application
demonstrating how to communicate with PSE.

Hello_PicoP
PicoP_Console
DA0140033_PicoP_Gen4_Windows_SDK_Gett
ing_Started_Guide.pdf

PicoP Gen4 Windows SDK Ver. 1.3 Getting Started Guide
MVIS #: DA0140033 May 2019 Revision A.3
© 2018 MicroVision, Inc. All rights reserved.

Simple Console Application demonstrating the
basic usage of sample C APIs for Display
functions
This Getting Started guide for PicoP Windows
SDK.

MicroVision.com
Page 3 of 12

PicoP® is a registered trademark of MicroVision, Inc.
Specifications subject to change without notice.

Getting Started with PicoP® Gen4 SDK for Windows

4. Accessing SDK Documentation
For high level description of functions/commands supported by the PSE Application Programming
Interface (API), please refer to the DA0140028_PicoP_Gen4_Programmers_Guide.pdf .
For detailed description of the C-language API, please refer to the Programmer’s Reference Guide at
Docs\Reference_Guide\index.html. The Reference Guide is a set of hyperlinked HTML files
containing detailed description of all Function interfaces and definitions provided by the API.

PicoP Gen4 Windows SDK Ver. 1.3 Getting Started Guide
MVIS #: DA0140033 May 2019 Revision A.3
© 2018 MicroVision, Inc. All rights reserved.

MicroVision.com
Page 4 of 12

PicoP® is a registered trademark of MicroVision, Inc.
Specifications subject to change without notice.

Getting Started with PicoP® Gen4 SDK for Windows

5. Using the PicoP Application Programming Interface (API)
The PicoP SDK for Windows allows you to easily interface your application software with the PicoP
Scanning Engine. This section explains the steps of the integration process.

5.1. SDK Version Control
The SDK API version can be queried with the PicoP_GetLibraryInfo() function. The
Library info returns the major (X), minor (Y), and patch number (Z) for the SDK Version X.Y.Z.
The library information also includes capability flags which can differentiate library implementation
enhancements that are compatible with the same API and header files.
// Library information
typedef struct {
UINT8 majorVersion;
UINT8 minorVersion;
UINT8 patchVersion;
UINT32 capabilityFlags;
} PicoP_LibraryInfoS;

//
//
//
//

Contains the major version of the library
Contains the minor version of the library
Contains the patch version of the library
Flags that describe the capability of the library

5.2. Step 1: Link SDK Library to the application

To include the PicoP Windows SDK to an application, include the picop_api.h header file into
the application source code and link the PicoP_rpc.lib library to the application executable:

// Include this into source code …
#include "picop_api.h"




PicoP_rpc.lib;%(AdditionalDependencies)

../../Lib


../../Interface


5.3. Step 2: Initialize the SDK Library

The first step in connecting to a PicoP is to initialize the PicoP library by calling
PicoP_OpenLibrary(). The PicoP_OpenLibrary() function returns a handle to the library
that can be used to open a connections to the PicoP device.

PicoP Gen4 Windows SDK Ver. 1.3 Getting Started Guide
MVIS #: DA0140033 May 2019 Revision A.3
© 2018 MicroVision, Inc. All rights reserved.

MicroVision.com
Page 5 of 12

PicoP® is a registered trademark of MicroVision, Inc.
Specifications subject to change without notice.

Getting Started with PicoP® Gen4 SDK for Windows

5.4. Step 3: Connect to PicoP

After successful initialization of the library, the next step is to create a connection to the PicoP
device. The connection can be established using either Universal Serial Bus (USB) or Universal
Asynchronous Receiver-Transmitter (UART) physical interfaces. To create a connection to the PicoP
Scanning Engine, call either the PicoP_OpenConnection(), PicoP_OpenConnectionUSB(),
or PicoP_OpenConnectionUart() functions. Upon successful connection, the library will
return a connection handle to be used with subsequent library calls. The connection handle identifies
the connected system.

5.5. Step 4: Configure and Control PicoP
The PicoP API is split into the following functional categories:
•

Connection & Library Management: Connect to PicoP over USB or Serial (UART)
interface.

•

Display Control: Configure and control the PicoP Display.

•

System Management: Manage the PicoP System, Firmware upgrades, Event Log, etc.

•

Input Control: Configure the PicoP Input Video.

•

3D Sensing: Configure and control PicoP 3D Sensing interface.

•

Rendering: Display test patterns by rendering them into the Framebuffer.

5.5.1. Connection Management

The Connection Management Functions are used to connect to the PicoP Display Engine using USB
or UART.

Function
PicoP_OpenLibrary( )

PicoP_GetLibraryInfo( )
PicoP_CloseLibrary( )
PicoP_OpenConnection( )
PicoP_OpenConnectionUart( )
PicoP_CloseConnection( )

Description
Opens the library and allocates resources necessary for
operation. It returns a handle to the library that must be
used in subsequent calls
Retrieves the version and capability information of the SDK
Library
Closes the library and releases all resources. It also closes
all the open connections.
Opens a connection to the PicoP Display Engine using
either USB or UART.
Opens a connection to the PicoP Display Engine using
UART.
Closes a previously opened connection to the PicoP Display
Engine.

PicoP Gen4 Windows SDK Ver. 1.3 Getting Started Guide
MVIS #: DA0140033 May 2019 Revision A.3
© 2018 MicroVision, Inc. All rights reserved.

MicroVision.com
Page 6 of 12

PicoP® is a registered trademark of MicroVision, Inc.
Specifications subject to change without notice.

Getting Started with PicoP® Gen4 SDK for Windows

5.5.2. Display Control Functions
The Display Control Functions can be used to configure the output display.

Function

Description

PicoP_SetBrightness( )
PicoP_GetBrightness( )
PicoP_SetColorMode( )
PicoP_GetColorMode( )
PicoP_SetGamma( )
PicoP_GetGamma( )
PicoP_SetVideoGammaBoostMode( )
PicoP_GetVideoGammaBoostMode( )
PicoP_SetMicroWeaveMode( )
PicoP_GetMicroWeaveMode( )
PicoP_SetFlipState()

Sets brightness for the output display.
Returns brightness setting of the output display.
Sets color mode for the output display.
Returns color mode setting of the output display.
Sets gamma value for the output display.
Returns gamma value setting of the output display.
Set the color specific video gamma boost mode.
Return the color specific video gamma boost mode.
Select the MicroWeave mode.
Return the MicroWeave mode.
Sets the flip state of the image to horizontal, vertical,
both horizontal and vertical or none.

PicoP_GetFlipState()
PicoP_SetOutputVideoState( )

Returns the current flip state of the output display.
Set the video output state to enabled or disabled.

PicoP_GetOutputVideoState( )

Returns the current video output state.

PicoP_GetOutputVideoProperties( )

Return output video properties.

PicoP_SetBiPhase( )

Sets the scan line phase delay to align the forward and
reverse scan video.
Returns the scan line phase delay setting.

PicoP_GetBiPhase( )
PicoP_SetColorAlignment()
PicoP_GetColorAlignment()
PicoP_SetColorConverter()
PicoP_GetColorConverter()
PicoP_SetFrameRateMode( )
PicoP_GetFrameRateMode( )

Performs vertical or horizontal color alignment for the
selected color
Gets the color alignment offset of the chosen color
Sets the color converter values
Gets the color converter values
Sets the output frame rate mode (frame rate vs. vertical
display and sensing resolutions) and display scaling.
Returns the output frame rate mode (frame rate vs.
vertical display and sensing resolutions) and display
scaling

PicoP Gen4 Windows SDK Ver. 1.3 Getting Started Guide
MVIS #: DA0140033 May 2019 Revision A.3
© 2018 MicroVision, Inc. All rights reserved.

MicroVision.com
Page 7 of 12

PicoP® is a registered trademark of MicroVision, Inc.
Specifications subject to change without notice.

Getting Started with PicoP® Gen4 SDK for Windows

5.5.3. System Management Functions

The System Management Functions are used to control the PicoP System and to access the system
information.

Function
PicoP_GetSystemInfo( )
PicoP_GetSystemStatus( )
PicoP_GetEventLog( )
PicoP_RestoreFactoryConfig( )
PicoP_CommitAll( )
PicoP_UpgradeSoftwareEx( )

Description
Retrieves system information.
Retrieves the system status.
Retrieves the system event log.
Restores System Settings to Factory Configuration.
Commits all user settings to flash.
Upgrades the embedded Software.

5.5.4. Input Control Functions

The Input Control functions are used to configure the PicoP Input Video.

Function

PicoP_GetInputVideoProperties( )
PicoP_SetInputVideoState( )
PicoP_GetInputVideoState( )

Description

Returns detected input video Frame Rate and Lines per
Frame.
Enables or Disables the input video. When input video is
disabled, the framebuffer will not be updated and the
output video will contain the last captured frame.
Returns the current state of the input video.

5.5.1. 3D Sensing Functions

The 3D Sensing functions are used to configure the 3D sensor as well as to retrieve the 3D depth
data.

Function

Description

PicoP_SetSensingState( )

Turns the 3D Sensing function on or off. When the 3D
Sensing function is off, the IR laser is not pulsing and no
3D sensing data is sent over the USB or MIPI-CSI.

PicoP_GetSensingState( )

Returns the current Sensing state.

5.5.2. Rendering Functions

The Rendering function allows the host system to render information into the PicoP On-Screen
Display (OSD) or FrameBuffer.
PicoP Gen4 Windows SDK Ver. 1.3 Getting Started Guide
MVIS #: DA0140033 May 2019 Revision A.3
© 2018 MicroVision, Inc. All rights reserved.

MicroVision.com
Page 8 of 12

PicoP® is a registered trademark of MicroVision, Inc.
Specifications subject to change without notice.

Getting Started with PicoP® Gen4 SDK for Windows

Function

PicoP_DrawTestPattern( )

Description

Displays one of the built-in test patterns.

5.6. Step 5: Exit Application

gracefully exit the host application, call the PicoP_CloseConnection() and
PicoP_CloseLibrary() functions to shut down the connection to PicoP and to release all
To

resources used by the library.

PicoP Gen4 Windows SDK Ver. 1.3 Getting Started Guide
MVIS #: DA0140033 May 2019 Revision A.3
© 2018 MicroVision, Inc. All rights reserved.

MicroVision.com
Page 9 of 12

PicoP® is a registered trademark of MicroVision, Inc.
Specifications subject to change without notice.

Getting Started with PicoP® Gen4 SDK for Windows

6. “Hello, World“ - Program

The below listing shows the simplest “Hello, World” sample program with a PicoP connected to the USB
port. This Hello_PicoP.cpp sample program simply flips the display.
//! \file Hello_PicoP.cpp
#include 
#include 
#include "../../interface/picop_api.h"
int main()
{
PicoP_HANDLE hLibraryHandle = NULL;
// Library handle
PicoP_HANDLE hConnectionHandle = NULL;
// Connection handle
PicoP_ConnectionInfoS connectionInfo;
const PicoP_USBInfoS sUsbInfo= { 0x0004, "123456789" }; // USB Info
PicoP_ReturnStatus eResult;
// Open the SDK library
eResult = PicoP_OpenLibrary(&hLibraryHandle);
if (eResult != ePICOP_RETURN_SUCCESS) {
printf("*** ERROR: PicoP_OpenLibrary() failed, rc = 0x%x\n", eResult);
return eResult;
}
connectionInfo.connectionType = eUSB;
memcpy(&connectionInfo.usbInfo, &sUsbInfo, sizeof(PicoP_USBInfoS));
// Connect to PSE with USB
eResult= PicoP_OpenConnection(hLibraryHandle, connectionInfo, &hConnectionHandle);
if (eResult != ePICOP_RETURN_SUCCESS) {
printf("** ERROR: PicoP_OpenConnection() failed, rc = 0x%x\n", eResult);
PicoP_CloseLibrary(hLibraryHandle);
return eResult;
}
// Flip the display horizontally and vertically
eResult = PicoP_SetFlipState(hConnectionHandle, eFLIP_BOTH, eCURRENT_VALUE);
if (eResult == ePICOP_RETURN_SUCCESS) {
printf("Display flipped!\n");
} else {
printf("** ERROR: PicoP_SetFlipState() failed, rc = 0x%x\n", eResult);
}
// Close connection & library
PicoP_CloseConnection(hConnectionHandle);
PicoP_CloseLibrary(hLibraryHandle);
}

return 0;

PicoP Gen4 Windows SDK Ver. 1.3 Getting Started Guide
MVIS #: DA0140033 May 2019 Revision A.3
© 2018 MicroVision, Inc. All rights reserved.

MicroVision.com
Page 10 of 12

PicoP® is a registered trademark of MicroVision, Inc.
Specifications subject to change without notice.

Getting Started with PicoP® Gen4 SDK for Windows

This Hello_PicoP sample project is located in the PicoP_Windows_SDK\samples\Hello_PicoP
directory.

7. PicoP_Console Sample Project

The PicoP_Console.sln sample project is a simple Windows console application developed in
C. It demonstrates the use of SDK interfaces to communicate with the PicoP device and to control
basic Projector functions. The application can control the following PicoP operations:
• Retrieve library info and PSE system status
• Turn display off
• Turn display on
• Retrieve display color mode setting
• Change display color mode
• Flip display horizontally
• Flip display vertically
The basic PicoP_Console app user interface is shown below. The desired function can be selected by
pressing the corresponding number 1-9 on the keyboard.

PicoP Gen4 Windows SDK Ver. 1.3 Getting Started Guide
MVIS #: DA0140033 May 2019 Revision A.3
© 2018 MicroVision, Inc. All rights reserved.

MicroVision.com
Page 11 of 12

PicoP® is a registered trademark of MicroVision, Inc.
Specifications subject to change without notice.

Getting Started with PicoP® Gen4 SDK for Windows

7.1. Prerequisites

The System Requirements for running and compiling the PicoP_Console sample project are:
• 64-bit Windows operating system: Windows 7 or later
• 1.8 GHz of faster processor, minimum 4GB of RAM
• Microsoft Visual Studio 2017 or later.

7.2. Building the PicoP_Console Sample Application
To build and run the PicoP_Console app, please follow the steps below:
1. Open the Solution/Project file
• Navigate to ‘PicoP_Windows_SDK\samples\PicoP_Console’ and double
click on the ‘PicoP_Console.sln’ solution file.
• This solution is created using Visual Studio 2017. If you are using a newer version of
Visual studio, conversion wizard will assist you to convert it to the newer version.
2. Check Dependencies
• This solution assumes SDK header files are available at relative path
‘PicoP_Windows_SDK\Interface’ and library at ‘PicoP_Windows_SDK\Lib’.
• If you are running the Console demo from a different path, update following project property
settings.
• SDK header file path at: ProjectPropertiesC/C++Additional
Include directories
• SDK lib path at: ProjectPropertiesLinkerAdditional
Dependencies
3. Build and Run the application
• For running the application, the PicoP_rpc.dll needs to be copied to the same directory
where the executable ‘PicoP_Console.exe‘ is located.

PicoP Gen4 Windows SDK Ver. 1.3 Getting Started Guide
MVIS #: DA0140033 May 2019 Revision A.3
© 2018 MicroVision, Inc. All rights reserved.

MicroVision.com
Page 12 of 12

PicoP® is a registered trademark of MicroVision, Inc.
Specifications subject to change without notice.



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.6
Linearized                      : Yes
Author                          : Jari Honkanen
Company                         : 
Create Date                     : 2019:05:23 20:02:07-07:00
Manager                         : 
Modify Date                     : 2019:05:23 20:02:11-07:00
Source Modified                 : 
Language                        : EN-US
Tagged PDF                      : Yes
XMP Toolkit                     : Adobe XMP Core 5.6-c016 91.163616, 2018/10/29-16:58:49
Metadata Date                   : 2019:05:23 20:02:11-07:00
Creator Tool                    : Acrobat PDFMaker 19 for Word
Document ID                     : uuid:3b20c216-6986-42b5-b692-6cb64934c026
Instance ID                     : uuid:05002fe8-ba4e-47ed-b9c9-2ad7301d1a98
Subject                         : 111
Format                          : application/pdf
Title                           : PicoP Gen4 Windows SDK Getting Started Guide
Creator                         : Jari Honkanen
Producer                        : Adobe PDF Library 19.12.66
Keywords                        : 
Page Layout                     : OneColumn
Page Count                      : 12
EXIF Metadata provided by EXIF.tools

Navigation menu