Step 10: Firmware Options and Explanation

UPDATE: ColorMotion Version 2 is now available, please visit http://www.chromationsystems.com/colormotion.html for more Information. Or utilize the Demostrantion HEX file found in the project files on Step 1.

Available in the ZIP file on Step 1 are a few different firmware options. The Full Featured ColorMotion Compatible Firmware must be purchased from the Store, but the demo version is included and has most of the same features, but has full Live Mode compatibility.

Project 2:

ColorMotion Version 1 Compatible Demo Firmware- 18f4550-ColorMotion-Demo-v1.hex
ColorMotion Version 2 Compatible Demo Firmware-18F4550-ColorMotion-FirmwareV2-rev-b-1.hex (recommended)

This firmware is a demonstration version. All features of the Full ColorMotion firmware work except for the uploading and saving of user created patterns and settings. Patterns can still be created and previewed(Demo Button) and will run till the device is powered down. Live communication from a computer to device is fully functional.

There are several patterns included in the Demo Firmware, they can not be changed. The full version of the firmware is available from the The Store.

Project 4:

MonoMotion Compatible Demo Firmware- 18F4550-MonoMotion-Demo-v1.hex 
- Link to Webpage
Similar to ColorMotion, but full of enhancements, additional features, more dynamic pattern storage, and ability to update to future versions, but is used to create patterns for single color LEDs. There are currently a few supported controllers and more will be added.

Processing Application - Live Mode Demo Software - Link to Webpage

The included application, including source code, can be found in the Project files on step 1. The program is used to demonstrate how to control a compatible ColorMotion device using Live Mode communication over USB. Using this software, colors can be selected on a computer and sent to the device to display. The color select options are Sliders, which select Black -> White -> Red -> Green -> Blue -> Purple, or there is an option to open a gradient image, then use the mouse to select the colors to display. There is a Color Cycle button which starts sending the device data that cycles it through all the colors. And lastly there are buttons, Settings Up and Settings Down, that can cycle through the patterns that have been uploaded to the device.

The code is well commented and can be used to create new compatible software or tweak to do what you require.

Project 1:

USB Communication, Old Processing Application - This is obsolete but still included.

Included is an application written in Processing, quite a simple language to learn, it is Java based, so works on most OS Platforms. Included is versions that should work on Windows, Linux and Mac.

It is just 24 sliders, that are labeled 0  - 100, position the sliders then press Spacebar to send the data to the circuit board. It converts the number to 0 - 255 and sends it to be used in the PWM routine. If more or less data bytes are sent, the data used in the PWM, will be out of alignment and the circuit will have to be reset.

Sliders are provided by the G4p library

Feel free to use any of my code for other projects, but please credit if it is released.

Firmware: 18F4550-24chanusb.hex

The firmware included here, written in C18, outputs 8-bit PWM to all 24 channels with the data sent from a Processing application. USB Communication is set up to go to the high interrupt and the simple PWM sequence is done in software in the main() function. But could easily be moved to an interrupt routine.

The project was originally in Microchip's Solutions library, under USB Device - CDC - Serial Emulator. So there are lots of comments and un-needed code still in it. The project already had setup files for the PICDEM USB board, which uses a 18F4550, so it was a matter of changing some lines of code and project setup.

In the Project folder I have included all the USB headers and Includes with in it, otherwise it expects them to be in the default folder, which gets confusing. So it should compile as is after changing the directories.(above)

Converting Microchip Solutions to work with the 24 Channel USB LED Controller, from Microchip's  Solutions Install folder: Any PICDEM Sample Code or Projects can be converted to work with this controller.

Open Project -> Build Options -> Project -> Directories

Add ../.. and ../../.. to Include & Library Search Path

Change include search paths to YourMicrochipDirectory\MCC18\h

Change Library search Path to YourMicrochipDirectory\MCC18\lib

Should compile then.

Converting Microchip solutions to work with the 24 Channel USB LED Controller from a different folder:

Open USB Device - CDC - Serial Emulator - C18 - PICDEM FSUSB.mcp

Open Project -> Build Options -> Project -> Directories

Add ../.. and ../../.. to Include & Library Search Path

Change include search paths to YourMicrochipDirectory\MCC18\h

Change Library search Path to YourMicrochipDirectory\MCC18\lib

Copy the USB folder from YourDirectory/Microchip/microchip solutions/microchip/include to your project directory.

Copy compiler.h from YourDirectory/Microchip/microchip solutions/microchip/include to your project directory.

on Hardware Profile - PICDEM USB.h comment out #define PROGRAMMABLE_WITH_USB_HID_BOOTLOADER

Hello Software and hex file or a working demo version
very interesting projects thanks.
Anyway you could hook this up to use a PC's power supply? I'd love to use it to control the lighting inside of my PC. (Much like Alienware does)
Yes it can easily hookup to a computer PSU, run +5v to the controller and configure the jumpers to what is best for your LED configuration. Some PC fans have a female Molex connectors(4-pin) that make it easy to hookup the power.
This would be much simpler and cheaper using a Teensy (http://www.pjrc.com/store/teensy.html) However it would require new code.
I've been busy and just got around to updating my CCS PIC compiler and bringing up the three 24 channel boards I bought and assembled. I built an adapter for the CCS ICD-U40 programmer I use and substituted a 47k ohm resistor between MCLR and 5 volts instead of the 10k one provided. I had an invisible solder bridge between PDC (programming clock pin and ground) that I had to find with a meter and cut open. The board has very tight trace spacings so be careful. <br> <br>Finally a significant oversight with the parts supplied with the kit is that it is missing two 15pf (surface mount) capacitors that go to ground on each side of the crystal. Without those the crystal and oscillator circuit will not start and run correctly. All the CCS prototype boards and Microchip's data sheets and schematics include them when using a crystal. After I added those and programmed the PIC with a color changing patter on an RGB LED, the board worked perfectly. Very pleased with the result.
The oscillator starts and runs correctly, the oscillator capacitors were excluded to allow the circuit boards to be one sided, to make it more DIY friendly. Though it would be better to have them included. There are 2x 100nF capacitors on the v.2 PCB, those could be soldered on the bottom of the board, directly to the PIC's Vss &amp; Vdd pins.<br><br>
One detail is that the kit comes with one 100nf cap and that should be soldered as close as possible to the power and ground pins on the chip, not off to the side as recommended. The reason is that this cap prevents power spikes and when mounted far from the power pins, causes the PCB trace wires to become inductors and the effect of the cap to smooth the power is reduced. So lay the cap on the bottom of the board between the two sets of power pins and solder to teh traces there for best effect. Prefereably the kit would ship with two and those would be soldered directly across each power and ground pin set, on the chip but my kits only included one cap.
Interesting project.

About This Instructable


35 favorites


Bio: Designing electronic creations from microcontrollers, LEDs and anything else I can pull out of a dumpster and make use of. Check my Profile
More by ChromationSystems: Make a Rug With Carpet Remnants And Duct Tape Acrylic Bender From Laser Printer With Relay Timer Box FTDI USB Adapter Based DMX Transmitter With Isolation
Add instructable to: