Great! You’ve bought some easy to set up and control Decaf boards for your sensor / control project. This app note aims to get you started so you’ll have something running quickly.
Setting up your project environment
The PiXCL 11 installer is downloaded from our Support Pages, and installs to
Program Files\PiXCL for (32-bit Windows) or
Program Files (x86)\PiXCL for (64-bit Windows).
If you have not read through the Help Overview topic, we strongly recommend you do so: it takes about 30 minutes for most readers, and will give you a good idea of how the PiXCL language is used to create apps.
You can download and read the latest 8MB PiXCL 11 help file. For security reasons, Windows blocks downloaded CHM content display: you will need to use File Explorer–>Properties to unblock it.
While PiXCL 11 has over 1000 command keywords to handle just about any app requirement, in practice you’ll use a subset of about 100 most of the time.
There’s a wide variety of sample apps to give you ideas, and Helper apps written in PiXCL to assist the code development. Spend some time on these and get to know them.
Around 100 commands support the Decaf boards to send content to the LCDs, control digital outputs, and get input from, digital and analog sensors. In particular, PiXCL app graphics commands have very similar syntax to the equivalent graphics commands for a Decaf LCD. This makes app and LCD content development quick and efficient.
OK, let’s assume you’ve worked through the samples and are ready to start on your project.
Since Decaf boards are not in enclosures, they are potentially static-sensitive. Your local electronic parts store (you have one, right?) can sell you a conductive mat that is connected to a ground (e.g. on your PC case) that protects the Decaf boards while you work on your project.
You’ll probably need a soldering iron with a small tip, and various other small tools.
If you have already selected your sensors and controls, locate and store the device specifications, datasheets and app notes, if any. You will need them later.
If you have more than one Decaf board, you’ll definitely need a powered USB hub, otherwise you can overload the host USB port, which are usually limited to 500mA. If an overload occurs, Windows will usually shut down the port, and you will have to do a power off reset to correct it.
What does your gadget have to do?
Obviously you have an idea for a gadget with sensors, controls and probably an LCD for a user interface. Decaf boards can typically handle 8 digital outputs, 8 digital inputs and 2, 4, or 8 analog inputs.
There’s several parts of the design phase:
- Define sensor input (analog or/and digital) values or states at power up and in use. You will have to refer to the sensor data sheets for this information.
- Define (in general terms to start) any LCD user interface. Drawing some pictures (a.k.a. story boarding) is often helpful. You can also use the PiXCL 11 graphics command set to try ideas on the host PC.
- Define what your controlling app has to DO: for example, identify available boards, read or save files in various formats. Does the app query the board for changes in values or states (i.e. polling) or does it wait for the board to issue an event (a.k.a. USB interrupt) of some sort? What happens to these values or states?
- What do you want your host PC controlling app to LOOK LIKE to your users? This is typically the colour scheme, standard or custom dialogs, possibly other libraries. If you have Decaf with an LCD, it’s preferable that the host app and the LCD display look similar, otherwise this becomes a source of user confusion or worse, frustration. For example, text and graphics should be the same colour and font, with same or very similar wording. Another name for this is consistency: users appreciate this.
- Does you app need to access a host PC video device? PiXCL supports webcams and TWAIN scanner devices.
- Does the gadget include programmable devices from other manufacturers? You may need to create PiXCL extension command libraries using the Visual Studio DLL templates we supply.
Building an app, along with the LCD user interface is always an iterative process.
PiXCL 11 is a useful tool for building apps, but it’s not always the right tool for a complex device. You may find that C++ or better, C# is a more capable solution, but development takes longer. We are working to provide you with the libraries and Decaf SDK to achieve this.
We also offer custom firmware updates:
- Graphic command sequences such as full screen pages can generally be compressed into one firmware command that causes the board to render the screen page. You can expect around a 4x speed increase in render time i.e. a PiXCL 11 command sequence that takes 8 seconds will render in less than 2 seconds in firmware. The number of compressed pages is limited to the available memory in the mcu, but 20-30 pages can typically be added. We provide the utilities to upload the new firmware version.
- specific SPI devices and sensor calibration values can be set into firmware.
Contact us with your requirements. Our prices are affordable.
Copyright © 2018 PiXCL Automation Technologies Inc., Canada. All Rights Reserved.