Programming for the µChameleon
This page offers various programming examples with the complete source code. They will help you create what you want without having to start from scratch. These are generic examples but show real-world working code, with all the details actually necessary.
We plan to offer more sample code in the future, and if you'd like specific topics to be covered, don't hesitate to contact us and tell us about your interests.
Sending commands with DOS batch files
Event though it might not be considered actual programming, it is sometimes desirable to automate simple tasks buy just writing a simple text file. It shows how simple it can be to have your µChameleon do things for you.
Also, as some legacy environnements only allow you to launch DOS batch files, it shows a simple way to integrate a µChameleon in these applications.
Look how you can turn on and off the activity led of your µChameleon with single-line batch files.
Sending commands through the COM port
This project focuses on how simple it is to talk to a µChameleon: it will turn on or off the activity led on the side of the USB connector by sending text strings to a serial COM port. A very simple project to begin with.
Interfacing external circuits and devices
This project is a collection of very simple examples that show how to drive various external devices: it switches a mechanical relay on and off, changes the pitch and loudness of a sound buzzer, varies the speed of a DC motor, sets the position of an rc servo-motor, measures external voltages...
It was designed for a demo bench, as a one-stop application that integrates various examples, but feel free to cut-and-paste just what you need.
Download the demo bench source code here.
This project uses communication with the virtual serial port.
Test Application source code
Our test application, µChameleon Control, as provided on our install CD, and as shown in this screenshot, lets you play with the basic digital and analog I/O features of the µChameleon.
It is a bit more sophisticated than the previous samples on this page. It shows how to use the API to control the µChameleon, and can be used as a foundation for writing your own applications, especially because of the FTDI.bas file that has all the important DLL functions already defined.
You can download the project sources for the µChameleon control project sources here.
You can also download the latest version of the µChameleon control installer there.