U-HID Pac-LED64 PacDrive U-HID LEDs



Similar documents
SRF08 Ultra sonic range finder Technical Specification

AN601 I2C 2.8 Communication Protocol. SM130 SM130 - Mini APPLICATION NOTE

Implementing SPI Master and Slave Functionality Using the Z8 Encore! F083A

Control III Programming in C (small PLC)

Hagenberg Linz Steyr Wels. API Application Programming Interface

Virtual Integrated Design Getting started with RS232 Hex Com Tool v6.0

APPLICATION NOTE. AVR2130: Lightweight Mesh Developer Guide. Atmel MCU Wireless. Features. Description

NaturalPoint Tracking Tools Users Manual : Getting Started 04/19/10 18:47:59

CANnes PC CAN Interface Manual

APPLICATION PROGRAMMING INTERFACE

GUIDE FOR THE INSTALLATION OF C18 COMPILER IN MPLAB IDE

User Manual. 3-Heights PDF Producer API. Version 4.6

Microcontroller Systems. ELET 3232 Topic 8: Slot Machine Example

SUDT AccessPort TM Advanced Terminal / Monitor / Debugger Version 1.37 User Manual

Chapter 11: Input/Output Organisation. Lesson 06: Programmed IO

Inwall 4 Input / 4 Output Module

GW-7552 PRIFIBUS/MODBUS GATEWAY

UvA facelab 5 extension for Presentation

Application Note AN0008. Data Logging Extension. For. Venus 8 GPS Receiver

WIFI OBD GPS Tracker T356 User Manual

Config software for D2 systems USER S MANUAL

Freescale Semiconductor, I

The BSN Hardware and Software Platform: Enabling Easy Development of Body Sensor Network Applications

Linux Driver Devices. Why, When, Which, How?

AN1754 APPLICATION NOTE

After: bmotorreflected[port2]= 1; //Flip port2 s direction

#include <Gamer.h> Gamer gamer; void setup() { gamer.begin(); } void loop() {

Tebis application software

AN1229. Class B Safety Software Library for PIC MCUs and dspic DSCs OVERVIEW OF THE IEC STANDARD INTRODUCTION

Embedded Systems Design Course Applying the mbed microcontroller

MXwendler Javascript Interface Description Version 2.3

Using the HCS12 Serial Monitor on Wytec Dragon-12 boards. Using Motorola s HCS12 Serial Monitor on Wytec s Dragon-12 boards

S4000TH HART. HART Communication Manual

Push button 3gang standard flush-mounted xx

Virtuozzo Virtualization SDK

MeshBee Open Source ZigBee RF Module CookBook

NAND Flash & Storage Media

Lesson 8: Simon - Arrays

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

Wireless Security Camera with the Arduino Yun

SN132 SNAPstick QUICK START GUIDE. v1.0

BIT COMMANDER. Serial RS232 / RS485 to Ethernet Converter

USB 2.0 Flash Drive User Manual

RapidIO Network Management and Diagnostics

Affdex SDK for Windows!

Different Ways of Connecting to. 3DLevelScanner II. A.P.M Automation Solutions LTD. Version 3.0

M85 OpenCPU Solution Presentation

WIZnet S2E (Serial-to-Ethernet) Device s Configuration Tool Programming Guide

UM0853 User manual. 1 Introduction. M24LRxx application software user guide

4511 MODBUS RTU. Configuration Manual. HART transparent driver. No. 9107MCM100(1328)

8903/CN ControlNet Communications Interface

CSC230 Getting Starting in C. Tyler Bletsch

Big Data & Scripting Part II Streaming Algorithms

EE289 Lab Fall LAB 4. Ambient Noise Reduction. 1 Introduction. 2 Simulation in Matlab Simulink

eztcp Technical Document Modbus/TCP of eztcp Caution: Specifications of this document may be changed without prior notice for improvement.

Jorix kernel: real-time scheduling

udrive-usd-g1 Embedded DOS micro-drive Module Data Sheet

An Introduction To Simple Scheduling (Primarily targeted at Arduino Platform)

CIA405.lib. Contents. WAGO-I/O-PRO 32 Library

Driver Installation and Hyperterminal Operation of iload Digital USB Sensors

USB > RS485 > 8 Channel Relay Controller

How to Install Applications (APK Files) on Your Android Phone

Light scene push button 8gang comfort flush-mounted xx

Fingerprint Based Biometric Attendance System

Get the Better of Memory Leaks with Valgrind Whitepaper

Software User Guide UG-461

Programing the Microprocessor in C Microprocessor System Design and Interfacing ECE 362

Application Note 120 Communicating Through the 1-Wire Master

IBM SDK, Java Technology Edition Version 1. IBM JVM messages IBM

USB PD ENGINEERING CHANGE NOTICE Title: Discover Identity VDO Applied to: USB Power Delivery Revision 2.0, Version 1.

如 何 在 C#.2005 中 使 用 ICPDAS I/O Card 的 DLL 檔 案

ADU208/218 USB Relay I/O Interface User Manual

Introducing etoken. What is etoken?

BLUETOOTH SMART CABLE REPLACEMENT

Interrupts and the Timer Overflow Interrupts Huang Sections What Happens When You Reset the HCS12?

CS 241 Data Organization Coding Standards

Bluetooth HID Profile

Quick Installation. A Series of Intelligent Bar Code Reader with NeuroFuzzy Decoding. Quick Installation

WinCON8000-R2/R8. Hardware User s Manual

STIM202 Evaluation Kit

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

Alarms Dispatcher Cod. DOCS 11 AD-E Build 1101

AlazarTech SDK Programmer s Guide. Version May 28, 2010

L16. Quectel GNSS Engine. EVB User Guide L16_EVB_UGD_V1.0

E-Blocks Easy RFID Bundle

Study and installation of a VOIP service on ipaq in Linux environment

Phys4051: C Lecture 2 & 3. Comment Statements. C Data Types. Functions (Review) Comment Statements Variables & Operators Branching Instructions

Home Security System for Automatic Doors

Application Note Dialogic Diva Media Boards

Kendrick Astro Instruments

AT09333: USB Host Interface (UHI) for Communication Class Device (CDC) Introduction. Atmel Microcontrollers APPLICATION NOTE

SECURE USB FLASH DRIVE. Non-Proprietary Security Policy

FIPS Non Proprietary Security Policy: Kingston Technology DataTraveler DT4000 Series USB Flash Drive

AC-115 Compact Networked Single Door Controller. Installation and User Manual

1500 bytes Universal Serial Bus Bandwidth Analysis

TUTORIAL FOR INITIALIZING BLUETOOTH COMMUNICATION BETWEEN ANDROID AND ARDUINO

Leak Check Version 2.1 for Linux TM

Embedded Event Manager Commands

Time Clock V1.2 User Manual. Time Clock V1.2. User Manual. Page 1.

Chapter Introduction. Storage and Other I/O Topics. p. 570( 頁 585) Fig I/O devices can be characterized by. I/O bus connections

Transcription:

Pac-LED64 PacDrive U-HID LEDs Software Development Kit

1. Introduction... 3 2. Common Functions (all boards)... 4 int PacSetCallbacks((void)(int id) attach, (void)(int id) remove)... 4 int PacInitialize()... 4 void PacShutdown()... 4 int PacGetDeviceType(int id)... 4 int PacGetVersionNumber(int id)... 4 3. PacDrive / U-HID LED Functions... 5 bool PacSetLEDStates(int id, ushort data)... 5 bool PacSetLEDState(int id, int port, bool state)... 5 4. PacLED64 Functions... 6 Introduction:... 6 bool Pac64SetLEDIntensity(int id, int port, byte intensity)... 6 bool Pac64SetLEDStates(int id, int group, byte data)... 6 bool Pac64SetLEDState(int id, int group, int port, bool state)... 6 bool Pac64SetLEDStatesRandom(int id)... 7 bool Pac64SetLEDFadeTime(int id, byte fadetime)... 7 bool Pac64SetScriptStepDelay(int id, byte stepdelay)... 7 bool Pac64StartScriptRecording(int id)... 7 bool Pac64StopScriptRecording(int id)... 7 bool Pac64RunScript(int id)... 7 bool Pac64ClearFlash(int id)... 7 bool Pac64SetDeviceId(int id, int newid)... 7 5. U-HID Functions... 9 bool PacProgramUHid(int id, char *sfilepath)... 9 6. Examples in C++... 10 7. Release History... 10

1. Introduction The Ultimarc PacDrive, PacLED64 & U-HID SDK is a collection of source code examples for controlling the PacDrive, PacLED64 & U-HID LED controller hardware by Ultimarc. For more information on these devices please visit: PacDrive - http://www.ultimarc.com/pacdrive.html U-HID - http://www.u-hid.com It contains source code projects in the following languages: C# C++ Delphi VB6 VB.NET

2. Common Functions (all boards) int PacSetCallbacks((void)(int id) attach, (void)(int id) remove) Set the callbacks to receive device attach and removal messages Id is the id of the device being attached or removed When a device is removed all device id s below it will be moved up a position int PacInitialize() Initialize all PacDrive, PacLED64 and U-HID Devices Returns the number of PacDrives, PacLED64s and U-HIDs on the PC or 0 if none are found void PacShutdown() Shutdown all PacDrive, PacLED64 and U-HID Devices No return value int PacGetDeviceType(int id) Returns the Device Type of the device specified by id 0 is Unknown, 1 is PacDrive, 2 is U-HID and 3 is PacLED64 int PacGetVersionNumber(int id) Returns the Version Number of the device specified by id

3. PacDrive / U-HID LED Functions bool PacSetLEDStates(int id, ushort data) Sets LED states on the PacDrive or U-HID specified by id Each bit represents an LED on or off (Eg. 0xFFFF = all on, 0x0 = all off, 0xAAAA = every second LED on) Returns true for success and false for failure bool PacSetLEDState(int id, int port, bool state) Sets a single LED state on the PacDrive or U-HID specified by id Port is the LED number State is the LED value (true or false)

4. PacLED64 Functions Introduction: The PacLED64 can be controlled in direct or script mode. When the board is powered up, it will check if a script is present in flash and if so, will begin to run it. This will happen on power-up (USB and LED power required) and before the host has initialized the USB bus. Scripts are repeated continuously. When sending commands to be stored in a script, it is usual to start the script with a SetLEDFadeTime and a SetScriptStepDelay otherwise the script will run in an unpredictable way. When a first command is sent from the host, the script stops running and the command is processed. Additionally, when the first command is sent, the Fade Time is set to zero. The following commands can be sent in script or direct mode: bool Pac64SetLEDIntensity(int id, int port, byte intensity) Sets an LED s intensity on the PacLED64 specified by id Port is the LED number or -1 for all Intensity is a value from 0 to 255 (0 being off and 255 being full intensity) Note: In many applications this is the only command required, with the possible addition of one initial SetLEDFadeTime. The other commands are mainly provided for compact script sizes. bool Pac64SetLEDStates(int id, int group, byte data) Sets LED states on the PacLED64 specified by id LED s are in groups of 8 Each bit represents an LED state (Eg. 0xFF = all enabled, 0x0 = all off, 0xAA = every second LED enabled) Returns true for success and false for failure NOTE: Enabled means set to its previously stored brightness setting from earlier SetLEDIntensity command. bool Pac64SetLEDState(int id, int group, int port, bool state) Sets a single LED state on the PacLED64 specified by id Port is the LED number State is the LED value (true = enabled, or false = off)

NOTE: Enabled means set to its previously stored brightness setting from earlier SetLEDIntensity command. bool Pac64SetLEDStatesRandom(int id) Sets all LED s to random states on the PacLED64 specified by id bool Pac64SetLEDFadeTime(int id, byte fadetime) Sets the LED s fade time on the PacLED64 specified by id. This value is remembered by the board and used for all subsequent LED commands. bool Pac64SetScriptStepDelay(int id, byte stepdelay) Sets the script step delay on the PacLED64 specified by id The following commands are direct-mode only and cannot be incorporated in a script: bool Pac64StartScriptRecording(int id) Starts recording a script on the PacLED64 specified by id. All subsequently-sent commands will be stored in the script and then executed at power-on. Max script length is 32 steps. bool Pac64StopScriptRecording(int id) Stops recording a script on the PacLED64 specified by id. At the end of the script, the device inserts a goto start so the script is looped when executed at power-on. bool Pac64RunScript(int id) Runs the script on the PacLED64 specified by id (This also occurs at power-on). bool Pac64ClearFlash(int id) Clears the flash on the PacLED64 specified by id. Any saved script will no longer be run at power-on. bool Pac64SetDeviceId(int id, int newid) Sets the Device Id on the PacLED64 specified by id (1 to 4).

bool Pac64SetLEDIntensities(int id, byte* data) Sets all LEDs to a brightness level specified in a 64 byte array. NOTE: This is a long command and requires a delay of 20ms before sending any further command. This command should only be used when more than half the LEDs need to be changed. Do not use for setting a small number of LEDs, use SetLEDIntensity for this.

U-HID Functions bool PacProgramUHid(int id, char *sfilepath) Programs a U-HID device using a.raw file exported from U-Config Returns true for success and false for failure

5. Examples in C++ Set every second LED on the first Pacdrive device int devicecount = PacInitialize(); PacSetLEDStates(0, 0xAAAA); PacShutdown(); Set the second LED on PacSetLEDState(0, 1, true); Output the full device path of the first device char sdevicepath[256]; PacGetDevicePath(0, sdevicepath); printf( %s\n, sdevicepath); Program the U-HID PacProgramUHid(0, "C:\Settings.raw"); 6. Release History 19-9-2010-1.5 - Added support for the PacLED64 6-1-2010-1.4 - Added PacSetLEDState function 2-6-2009-1.3 - Added PacProgramUHid function 1-7-2008-1.2 - Added support for U-HID 17-10-2007-1.1 - Bug fix 4-9-2007-1.01 - Minor fixes 3-9-2007-1.0 - First Release