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
评论0