Ede 12-3-97 version 0.6á

a Disco running light project for the 16C84 microcontroller

This project uses a single 16C84 microcontroller and some additional hardware to make a complete programmable 8-channel light system. There are 16 predefined 8-stage light patterns and 4 free programmable banks with 16 positions each to store pattern sequences. The system has a 8 LED status display,also used as preview/ monitor display and a 2 digit 7-segment display for speed setting and programming purposes. The system is controlled with 8 micro buttons. Futher more there is a BassSync input to synchronize the lightshow with the music.

hardware

The 16C84 PORTB is used as a 8 bit data bus.there are 3 latched outputs:status/preview,2 digit 7-segment display and output.PORTA RA0,RA2 and RA1 are used for latch control, RA3 controls the 8 micro buttons(these are also connected to the data bus).RA4 is the bass sync input. An upcoming version will also provide a bass sync input filter and an in circuit programming facility.

software

The code is developed with the excellent Hi-Tech C compiler beta. The whole 1k program space of the 16c84 is used; you can't add code but you can change it if you like of course. To save RAM(register) memory BIT variables are used as much as possible. The array PAT[] holds the 16 predefined patterns,orginally I planned 32 patterns but there was not enough room for that. Most of the code will speak for it self I hope,if you have questions ,you can always e-mail me.

use

the system starts up with bank 1 active and speed at 15.

buttons status LEDS/Display
1 output on/off LED1 on/off
2 monitor preview on/off Leds status or Monitor/Preview
3 speed up 7-segment shows new speed
4 speed down 7-segment shows new speed
5 bank 1 Led 5 on/off or flash
6 bank 2 Led 6 on/off or flash
7 bank 3 Led 7 on/off or flash
8 bank 4 Led 8 on/off or flash
button 3 and 4 together BassSync on/off LED 2 on/off
button 3 and 5 together program bank 1 programming mode
button 3 and 6 together program bank 2 programming mode
button 3 and 7 together program bank 3 programming mode
button 3 and 8 together program bank 4 programming mode

you can set a bank(the LED goes on) or reset(the LED goes off), the last set bank is the active bank.the system will loop through all set banks.The active bank flashes.

programming mode:

buttons Leds/Display
1 auto change direction on/off Led 1 on/off
2 stop programming status mode
3 pattern nr. down 7-segment shows new pattern nr.
4 pattern nr. up 7-segment shows new pattern nr.
5 inverted on/off Led 4 on/off
6 nr. loops through pattern 4 times Led 5 on/off
7 nr. loops through pattern 2 times Led 6 on/off
8 save settings to EEPROM memory 7-segment shows memory position

With both Led 5 and 6 On ,the number of loops is 8 times, when both are off there is only one loop. After button 8 is activated the memory position number is shown for about half a second,after that the pattern nr. is shown again. you can stop programming at any point,but to program all positions you have to proceed through all 16.

bugs ,comments

Willem Kloosterhuis
e-mail waklos@bos.nl
website www.bos.nl/homes/waklos
a double sided PCB with in circuit programming facility and BassSync filter will be available shortly.

rev.history
0.5first release
0.6some changes and bugfixes
improved schematic diagram

Converted to HTML by Philippe Corbes (Email:philippe.corbes@laposte.net) 01/12/2002.