****************************************************************
ColorSynth firmware release v2010-12-30
(c) 2010 Eric Bateman
www.colorsynth.com
http://colorsynth.sourceforge.net/
Please see README.TXT for important information on the implementation
of the hardware and firmware.
Released under gplv3 license, for more info please visit:
http://www.gnu.org/licenses/gpl.html
or read LICENSE.TXT, which should be included with the source code
****************************************************************
************************************
Introduction and thanks
************************************
I first came up with the idea for ColorSynths back in 2007. The v2010-12-30 release is the third firmware release, which includes many exciting new features:
-Hardware PWM diming of LEDs resulting in much faster code, and more beautiful colors
-RGB oscillator controlled by CC9. This really adds another dimension to the "trip toy" factor, especially at the highest settings
-Clean code that can actually be read by a human being
-Hardware control via three potentiometers and a push-switch, effectively making the ColorSynth a MIDI controller.
-Transmission of knob/button controls via MIDI, one ColorSynth can control a whole string of them
-Convinient Red/Green/Blue startup sequence to let you know you've actually turned the ColorSynth on (more important than you'd think!)
This firmware was implemented into all ColorSynths developed and built after May 1st, 2010 (pending any further updates).
V2010-12-30 is designed to run on a PIC 16F1827 microcontroller, manufactured by Microchip Technology Inc. This is a huge departure from previous firmware releases as the pinout has changed. ColorSynths using V1.0 PCBs will need these pin connections to be modified with wire by hand (sorry but that's the only way to get hardware PWM, new PCBs are available).
The assembly and include files are optimized for use with MPLAB, available as a free download at http://www.microchip.com/.
******************************************************
Important note about previous firmware releases
******************************************************
Release v2010-03-10 turned out to be a conceptual release and was never loaded onto any ColorSynths that I shipped to customers. The readme for that release mentions a 20MHz oscillator, that was abandoned and all ColorSynths produced by me should use a 12MHz oscillator.
Release V2009-08-01 was the original firmware that ran on a PIC 16F88 at 12MHz. I learned PIC assembly by developing this original firmware and there are many first-timer mistakes. It doesn't use interrupts, it does all the PWM LED dimming in the middle of the main routine/loop, and it doesn't use include files so it's one long wall of code that is very hard to navigate. They say the first time is never perfect, and they're right.
***********
HARDWARE
***********
For conversion of MIDI into something usable by the PIC UART, please see visit http://www.midi.org/techspecs/electrispec.php. I followed this spec to the letter when designing the ColorSynth circuit.
The implementation of the 16F1827 pins is:
; RA0 = digital input, J5 pin 1, outside switch for user control
; RA1 = ANALOG input, J5 pin 2, outside knob 3 (AN1)
; RA2 = digital input, DS1 (MIDI CH)
; RA3 = PWM output CCP3, RED, SET the pin to disable output driver for PWM
; RA4 = PWM output CCP4, GREEN, SET the pin to disable output driver for PWM
; RA5 = digital input, DS2 (MIDI CH)
; RA6 = output, oscillator out pin 1
; RA7 = output, oscillator in pin 2
; 16f1827
movlw b'00111111'
movwf TRISA
; RB0 = digital input, DS3 (MIDI CH)
; RB1 = digital input, DS4 (MIDI CH)
; RB2 = UART input, Midi RX
; RB3 = PWM output CCP1, BLUE, SET the pin to disable output driver for PWM
; RB4 = digital input, DS5 (Standalone on/off)
; RB5 = UART output, Midi TX
; RB6 = ANALOG input, J5 pin 3, outside knob 2 (AN5)
; RB7 = ANALOG input, J5 pin 4, outside knob 1 (AN6)
***********
MIDI
***********
For details on how MIDI is implemented, please see ColorSynth_Manual_v1.1.pdf which should have been included with the source code.
***********
THE FUTURE
***********
This release is very solid as far as features and stability are concerned. All flickering and timing issues in the v2010-03-10 release were solved, MIDI transmission works great, and RGB oscillation is stunning. Future releases are certainly a possibility but as of now I'm very satisfied with the current status of the firmware.