Home     Contact     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science     RSS     Terms of services     Privacy policy  
   
 Home     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science   

Author Topic: Scriptale x-mas light effects  (Read 6656 times)

0 Members and 1 Guest are viewing this topic.

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
Scriptale x-mas light effects
« on: September 21, 2008, 13:49:40 PM »
This project that I start may delay a little bit the other project, the hybrid cooling system, but I consider this project in higher priority as Christmas comes, and also, it is winter and there are not such high temperatures to disturb my CPU.

So, I will continue the idea of my friend Supernova about scripting. The project will carry an extra eeprom that will hold the scripts. This eeprom will be programmed by computer. The structure will be:

FROM 00x0000h TO 00x0080h : Script starting position.
This will be something like the FAT area of a HDD. The device will hold up to 64 (00x0040h) scripts and each one will have a starting position in eeprom. This starting position is indicated by 2 bytes in this eeprom position. The script will end at the point that the other start. So every time someone knows the start and position  of each script.

FROM 00x0081h TO 00X0140 : Script configuration
Each script will have 3 bytes for configuration. These bytes are:

B1[0]: Script loop. If it is 0, then the script will not loop. If it is 1, then it will loop infinitely until broken.
B1[3:1]: Data byte length. This indicates the byte length of the outputs. Each byte will be 8bit length. If fir example the output of this script is 2 bytes length, it means that it will capable of controlling 16 outputs simultaneously.
B1[4]: Not used
B1[7:5]: Time base of script scrolling. These bits will determine the scrolling rate of the script according to the following board:
000b: 100 mSec
001b: 250 mSec
010b: 500 mSec
011b: 750 mSec
100b: 1000 mSec
101b: 1500 mSec
110b: 2000 mSec
111b: 3000 mSec

B2[7:0]: Trigger. This byte will carry the trigger input for this script. The MSB (B2[7]) will carry the trigger state of the input. The rest of the bits (B2[6:0]) will carry the trigger input number. For example,  10000010b means that the script will start running when input 2 goes HIGH. There can only one script that is triggered for a specific input state. This means that each time, only one script may run. There can be for example two scripts that will be triggered from the same input, but one will be triggered when this input is 1 and the other when this input is 0.

B3[7:0]: Break. This byte will carry the break input for this script. The MSB (B3[7]) will carry the break state of the input. The rest of the bits (B3[6:0]) will carry the break input number. For example,  00000010b means that the script will stop running when input 2 goes LOW.

The rest of the memory will be dedicated for the scripts data. According to the  Data byte length of each script (B1[3:1]), they will be arranged in rows. For example, a 1 data byte length script may be like:
00000001
00000010
00000100
00001000
00010000
00100000
01000000
10000000

This will scroll outputs 0 to 7 (from byte 1) in series.

00000000
11111111

This script will flash all 8 outputs continuously.

The above data are only for information on the structure of the memory. The programming will be made using an appropriate software.

« Last Edit: September 21, 2008, 13:52:26 PM by kam »

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
Re: Scriptale x-mas light effects - I/O Modules
« Reply #1 on: September 26, 2008, 21:25:40 PM »
The I/O Modules

In order to make it a little bit more flexible and cascadable, i decided not to supply a number of inputs and outputs, but to allow the user to select how many I/Os would he like. Thus, it will be able to get up to 128 inputs and 128 outputs in modules of 8, each one cascaded with the previous one using a classical RJ45 connector. The idea is to use the 74166 PISO shift register for inputs and the 4094 SIPO shift register for the outputs. These two chips can be very easily cascaded. The software on the PIC will do the rest.

In the attached files you may see the schematic diagram of the cascaded PISO and SIPO shift registers. It is understood that the PIC will have to know how many modules (8 inputs or outputs) you have cascade in order to transmit or receive the appropriate bits. For this there will be two registers, but we will discuss of the software later on.

Of course it will not be possible to cascade as many as you want directly. Between each number of modules (i will calculate this later) there must be a signal amplification module.




spic0m

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 841
Re: Scriptale x-mas light effects
« Reply #2 on: September 26, 2008, 23:21:59 PM »
Nice schematics, even if i understand litlle they look "clean". What prog you use to make them?

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
Re: Scriptale x-mas light effects
« Reply #3 on: September 27, 2008, 20:31:03 PM »
eaglepcb

spic0m

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 841
Re: Scriptale x-mas light effects
« Reply #4 on: September 27, 2008, 20:44:28 PM »
Nice!

Supernova

  • Full Member
  • ***
  • Posts: 149
Re: Scriptale x-mas light effects
« Reply #5 on: October 01, 2008, 23:22:55 PM »

Mercury

  • Guest
Re: Scriptale x-mas light effects
« Reply #6 on: October 02, 2008, 08:33:46 AM »
I Like your idea  ;)

But there are also those so called "dvm" or something.

spic0m

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 841
Re: Scriptale x-mas light effects
« Reply #7 on: October 02, 2008, 23:50:49 PM »
They are called DMX and their cost is way out of my budget. Also if you buy one it's a pity not to connect it with some music controller which is also out of my plans. (and my budget since you need to buy the software)

Mercury

  • Guest
Re: Scriptale x-mas light effects
« Reply #8 on: October 07, 2008, 23:19:45 PM »
Yes DMX you are right. But there may be some cheap ones. Did you search?