Step 9Firmware
Finally finished the firmware and software for the full featured program, ColorMotion. The user can create and upload various types of color patterns. Also, enhanced the ability to control the RGB LEDs from a computer(PC, Linux or Mac).
A PIC programmed with the full version of the ColorMotion Compatible firmware can be purchased in The Store or try the demo version.(below)
Project 2 Firmware: ColorMotion Compatible - 18f4550-ColorMotion-Demo-v1.hex
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 2: Processing Application - RGB Demo 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. 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.
Project 1 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:
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
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|
















































