November 23, 2024, 02:15:01 AM

News:

Got VSA?  Want to use your Prop-SX?  Now you can!  See the VSA section of the Library forum for Prop-SX code that works with VSA.


prop1 rc4 boards

Started by jeffh, September 04, 2008, 06:00:27 PM

Previous topic - Next topic

jeffh

prop1 rc4 boards

I have the program attached that we ran 6 - 12 vdc relays to make two
candles. Each candle has three loops of lights (AC) that flicker. Low
amperage.

With a prop1 using 6 homemade relays with a receptacle  tied to each.


outputs  0 - 5
trigger    6, I hard wired the trigger so it would loop all night.


I would like a program for the prop1 using two rc-4 boards. Should I use a
prop2? I will use 6 relays in two rc-4 boards. How do I set the jumpers on
the rc-4 boards to select 1 through 6 relays. For Halloween we are going to
trigger it for 20 to 40 seconds For Christmas we will run all night.

BTW: This basic program come from you and I have  modified it for two years setting up 30 plus props.



All help is appreciated.


' =========================================================================
'
'   File...... ClaytonFearFarm_Prop-1_Sound.BS1
'   Purpose...
'   Author.... Jon Williams, EFX-TEK (www.efx-tek.com)
'   E-mail.... jwilliams@efx-tek.com
'   Started... xmas candel ver2
'   Updated... 17 Nov 2007, Jeff Hamilton
'
'   {$STAMP BS1}
'   {$PBASIC 1.0}
'
' =========================================================================


' -----[ Program Description ]---------------------------------------------
'
' Triggered, table-drive sequencer capable of driving six control outputs.
' P6 is used as the trigger input.
'
' Note: Replace ULN2803 with ULN2003 to allow serial comms with AP-8
' (on P7).


' -----[ Revision History ]------------------------------------------------


' -----[ I/O Definitions ]-------------------------------------------------

SYMBOL  Sio             = 7                     ' SETUP = out; no ULN
SYMBOL  Trigger         = PIN6                  ' SETUP = DN


' -----[ Constants ]-------------------------------------------------------

SYMBOL  IsOn            = 1                     ' for active-high input
SYMBOL  IsOff           = 0

SYMBOL  TicTiming       = 100                   ' 0.1 sec per step


' -----[ Variables ]-------------------------------------------------------

SYMBOL  showBits        = B0
SYMBOL  playAudio       = BIT6
SYMBOL  endOfShow       = BIT7

SYMBOL  pntr            = B2                    ' step pointer
SYMBOL  tix             = B3


' -----[ Initialization ]--------------------------------------------------

Reset:
  PINS = %00000000                              ' clear pins
  DIRS = %00111111                              ' P0..P5 are outputs

  SEROUT Sio, OT2400, ("!!!!!!!AP8", %00, "X")  ' kill sound if reset
  pntr = 0                                      ' point to start of show


' -----[ Program Code ]----------------------------------------------------

Main:
  IF Trigger = IsOff THEN Main                  ' wait for trigger

Play_Show:
  READ pntr, showBits                           ' get step

Check_Sound:
  IF playAudio = IsOff THEN Engine
    SEROUT Sio, OT2400, ("!AP8", %00, "P", 0)   ' start the sound

Engine:
  PINS = showBits & %00111111                   '   update outputs
  pntr = pntr + 1                               '   point to timing
  READ pntr, tix                                '   read it
  GOSUB Timer                                   '   run the timer
  pntr = pntr + 1                               '   point to next step

  IF endofShow = IsOn THEN Reset                '   done?
    GOTO Play_Show


' -----[ Subroutines ]-----------------------------------------------------

Timer:
  IF tix = 0 THEN Timer_Done                    ' timer expired?
    PAUSE TicTiming                             ' no, time on "tic"
    tix = tix - 1                               ' decrement timer
    GOTO Timer                                  ' check again

Timer_Done:
  RETURN

' -----[ EEPROM Data ]-----------------------------------------------------

Show_Data:
'          +------------ end of show bit
'          |+----------- start audio player, not used
'          ||+---------- 6 candle
'          |||+--------- 5 candle
'          ||||+-------- 4 candle
'          |||||+------- 3 candle
'          ||||||+------ 2 candle
'          |||||||+----- 1 candle
'          ||||||||
'          ||||||||  +-- timing (1 to 255)

  EEPROM (%00000000, 0)                         ' start audio

  EEPROM (%00001001, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)

  EEPROM (%00100100, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)

  EEPROM (%00001001, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00101101, 1)

  EEPROM (%00111111, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)

  EEPROM (%00001001, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)

  EEPROM (%00101101, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)

  EEPROM (%00001001, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)

  EEPROM (%00111111, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)







  EEPROM (%00000000, 000)                       ' inter-show delay

  EEPROM (%10000000, 0)                         ' show done




JonnyMac

September 04, 2008, 06:57:06 PM #1 Last Edit: September 04, 2008, 07:42:05 PM by JonnyMac
So you're saying you want the outputs to be on the RC-4s instead of the local outputs from the Prop-1?  Here's a program that will do that.  Note, though, that if you just want random outputs for the six channels on the RC-4s there is a simpler way to do it.

For the first four channels remove all jumpers (Baud, A1, and A0) from the RC-4.  For the last two channels remove the Baud and A1 jumpers, but put the A0 jumper in.  If you are in fact using an AP-8 with the project you need insert the RC-4s between the Prop-1 and AP-8 as the RC-4s get their power from the Prop-1.

' =========================================================================
'
'   File...... ClaytonFearFarm_Prop-1_Sound_RC4.BS1
'   Purpose...
'   Author.... Jon Williams, EFX-TEK (www.efx-tek.com)
'   E-mail.... jwilliams@efx-tek.com
'   Started... xmas candel ver2
'   Updated... 04 SEP 2008
'
'   {$STAMP BS1}
'   {$PBASIC 1.0}
'
' =========================================================================


' -----[ Program Description ]---------------------------------------------
'
' Triggered, table-drive sequencer capable of driving six control outputs
' on RC-4 relay boards.  Outputs 0-3 go to RC-4 %00, outputs 4-5 go to
' RC-4 %01.
'
' P6 is used as the trigger input.
'
' Note: Replace ULN2803 with ULN2003 to allow serial comms with AP-8
' (on P7).  The RC-4s must be placed between the Prop-1 and the AP-8.
'
' [Prop-1]--->[RC-4 %00]--->[RC-4 %01]--->[AP-8]


' -----[ Revision History ]------------------------------------------------


' -----[ I/O Definitions ]-------------------------------------------------

SYMBOL  Sio             = 7                     ' SETUP = out; no ULN
SYMBOL  Trigger         = PIN6                  ' SETUP = DN


' -----[ Constants ]-------------------------------------------------------

SYMBOL  IsOn            = 1                     ' for active-high input
SYMBOL  IsOff           = 0

SYMBOL  TicTiming       = 40                    ' 0.1 sec per step


' -----[ Variables ]-------------------------------------------------------

SYMBOL  showBits        = B0
SYMBOL   playAudio      =  BIT6
SYMBOL   endOfShow      =  BIT7

SYMBOL  relays          = B1                    ' RC-4 relay data
SYMBOL   K1a            =  BIT0                 ' RC-4 %00 K1
SYMBOL   K2a            =  BIT1                 ' RC-4 %00 K2
SYMBOL   K3a            =  BIT2                 ' RC-4 %00 K3
SYMBOL   K4a            =  BIT3                 ' RC-4 %00 K4
SYMBOL   K1b            =  BIT4                 ' RC-4 %01 K1
SYMBOL   K2b            =  BIT5                 ' RC-4 %01 K2

SYMBOL  pntr            = B2                    ' step pointer
SYMBOL  tix             = B3


' -----[ Initialization ]--------------------------------------------------

Reset:
  PINS = %00000000                              ' clear pins
  DIRS = %00000000                              ' no local outputs

  SEROUT Sio, OT2400, ("!!!!!!!AP8", %00, "X")  ' kill sound if reset
  SEROUT Sio, OT2400, ("!RC4", %00, "X")        ' kill RC-4s
  SEROUT Sio, OT2400, ("!RC4", %01, "X")
  pntr = 0                                      ' point to start of show


' -----[ Program Code ]----------------------------------------------------

Main:
  IF Trigger = IsOff THEN Main                  ' wait for trigger

Play_Show:
  READ pntr, showBits                           ' get step

Check_Sound:
  IF playAudio = IsOff THEN Engine
    SEROUT Sio, OT2400, ("!AP8", %00, "P", 0)   ' start the sound

Engine:
  relays = showBits & %00111111                 '   update outputs
  SEROUT Sio, OT2400, ("!RC4", %00, "S", relays)
  relays = relays / 16
  SEROUT Sio, OT2400, ("!RC4", %01, "S", relays)
  pntr = pntr + 1                               '   point to timing
  READ pntr, tix                                '   read it
  GOSUB Run_Timer                               '   run the timer
  pntr = pntr + 1                               '   point to next step

  IF endofShow = IsOn THEN Reset                '   done?
    GOTO Play_Show


' -----[ Subroutines ]-----------------------------------------------------

Run_Timer:
  IF tix = 0 THEN Timer_Done                    ' timer expired?
    PAUSE TicTiming                             ' no, time on "tic"
    tix = tix - 1                               ' decrement timer
    GOTO Run_Timer                              ' check again

Timer_Done:
  RETURN

' -----[ EEPROM Data ]-----------------------------------------------------

Show_Data:
'          +------------ end of show bit
'          |+----------- start audio player, not used
'          ||+---------- 6 candle
'          |||+--------- 5 candle
'          ||||+-------- 4 candle
'          |||||+------- 3 candle
'          ||||||+------ 2 candle
'          |||||||+----- 1 candle
'          ||||||||
'          ||||||||  +-- timing (1 to 255)

  EEPROM (%00000000, 0)                         ' start audio
  EEPROM (%00001001, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00001001, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00101101, 1)
  EEPROM (%00111111, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00001001, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00101101, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00001001, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00111111, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00000000, 0)                         ' inter-show delay
  EEPROM (%10000000, 0)                         ' show done
Jon McPhalen
EFX-TEK Hollywood Office

JonnyMac

September 05, 2008, 05:56:15 PM #2 Last Edit: September 05, 2008, 06:01:09 PM by JonnyMac
If you're just looking to do random, candle-like flickering, this program will probably be nicer looking as it uses random patterns and timing -- it won't look like it's programmed.

' =========================================================================
'
'   File...... Random_RC4s.BS1
'   Purpose...
'   Author.... Jon Williams, EFX-TEK
'              Copyright (c) 2008 EFX-TEK
'              Some Rights Reserved
'              -- see http://creativecommons.org/licenses/by/3.0/
'   E-mail.... jwilliams@efx-tek.com
'   Started...
'   Updated...
'
'   {$STAMP BS1}
'   {$PBASIC 1.0}
'
' =========================================================================


' -----[ Program Description ]---------------------------------------------


' -----[ Revision History ]------------------------------------------------


' -----[ I/O Definitions ]-------------------------------------------------

SYMBOL  Sio             = 7                     ' SETUP = out; no ULN


' -----[ Constants ]-------------------------------------------------------

SYMBOL  IsOn            = 1                     ' for active-high in/out
SYMBOL  IsOff           = 0

SYMBOL  Baud            = OT2400


' -----[ Variables ]-------------------------------------------------------

SYMBOL  idx             = B2
SYMBOL  timer           = B3
SYMBOL  relays          = B4
SYMBOL  lottery         = W5


' -----[ Initialization ]--------------------------------------------------

Reset:
  PINS = %00000000                              ' clear all outputs
  DIRS = %00000000                              ' make P0-P5 outputs


' -----[ Program Code ]----------------------------------------------------

Main:
  FOR idx = 1 TO 3
    RANDOM lottery                              ' really shake it up
  NEXT

  timer = lottery // 41                         ' random, 0 to 40
  PAUSE timer

  RANDOM lottery
  relays = lottery & $000F
  SEROUT Sio, OT2400, ("!RC4", %00, "S", relays)
  relays = lottery / 16 & $0003
  SEROUT Sio, OT2400, ("!RC4", %01, "S", relays)

  GOTO Main


' -----[ Subroutines ]-----------------------------------------------------


' -----[ User Data ]-------------------------------------------------------
Jon McPhalen
EFX-TEK Hollywood Office

JonnyMac

Sorry, Jeff, I did not understand that you wanted the program to loop five times.  Here's a version that does that.

' =========================================================================
'
'   File...... ClaytonFearFarm_Prop-1_Sound_RC4.BS1
'   Purpose...
'   Author.... Jon Williams, EFX-TEK (www.efx-tek.com)
'   E-mail.... jwilliams@efx-tek.com
'   Started... xmas candel ver2
'   Updated... 04 SEP 2008
'
'   {$STAMP BS1}
'   {$PBASIC 1.0}
'
' =========================================================================


' -----[ Program Description ]---------------------------------------------
'
' Triggered, table-drive sequencer capable of driving six control outputs
' on RC-4 relay boards.  Outputs 0-3 go to RC-4 %00, outputs 4-5 go to
' RC-4 %01.
'
' P6 is used as the trigger input.
'
' Note: Replace ULN2803 with ULN2003 to allow serial comms with AP-8
' (on P7).  The RC-4s must be placed between the Prop-1 and the AP-8.
'
' [Prop-1]--->[RC-4 %00]--->[RC-4 %01]--->[AP-8]


' -----[ Revision History ]------------------------------------------------


' -----[ I/O Definitions ]-------------------------------------------------

SYMBOL  Sio             = 7                     ' SETUP = out; no ULN
SYMBOL  Trigger         = PIN6                  ' SETUP = DN


' -----[ Constants ]-------------------------------------------------------

SYMBOL  IsOn            = 1                     ' for active-high input
SYMBOL  IsOff           = 0

SYMBOL  TicTiming       = 40                    ' 0.1 sec per step


' -----[ Variables ]-------------------------------------------------------

SYMBOL  showBits        = B0
SYMBOL   playAudio      =  BIT6
SYMBOL   endOfShow      =  BIT7

SYMBOL  relays          = B1                    ' RC-4 relay data
SYMBOL   K1a            =  BIT0                 ' RC-4 %00 K1
SYMBOL   K2a            =  BIT1                 ' RC-4 %00 K2
SYMBOL   K3a            =  BIT2                 ' RC-4 %00 K3
SYMBOL   K4a            =  BIT3                 ' RC-4 %00 K4
SYMBOL   K1b            =  BIT4                 ' RC-4 %01 K1
SYMBOL   K2b            =  BIT5                 ' RC-4 %01 K2

SYMBOL  timer           = B2
SYMBOL  pntr            = B3                    ' step pointer
SYMBOL  tix             = B4
SYMBOL  repeats         = B5


' -----[ Initialization ]--------------------------------------------------

Reset:
  PINS = %00000000                              ' clear pins
  DIRS = %00000000                              ' no local outputs

  SEROUT Sio, OT2400, ("!!!!!!!AP8", %00, "X")  ' kill sound if reset
  SEROUT Sio, OT2400, ("!RC4", %00, "X")        ' kill RC-4s
  SEROUT Sio, OT2400, ("!RC4", %01, "X")


' -----[ Program Code ]----------------------------------------------------

Main:
  timer = 0

Check_Trigger:
  PAUSE 5
  timer = timer + 5 * Trigger
  IF timer < 100 THEN Check_Trigger             ' debounce trigger input

  pntr = 0                                      ' point to start of show
  repeats = 5                                   ' set show repeats

Play_Show:
  READ pntr, showBits                           ' get step

Check_Sound:
  IF playAudio = IsOff THEN Engine
    SEROUT Sio, OT2400, ("!AP8", %00, "P", 0)   ' start the sound

Engine:
  relays = showBits & %00111111                 '   update outputs
  SEROUT Sio, OT2400, ("!RC4", %00, "S", relays)
  relays = relays / 16
  SEROUT Sio, OT2400, ("!RC4", %01, "S", relays)
  pntr = pntr + 1                               '   point to timing
  READ pntr, tix                                '   read it
  GOSUB Run_Timer                               '   run the timer
  pntr = pntr + 1                               '   point to next step

  IF endofShow = IsOn THEN Check_Repeats        '   done?
    GOTO Play_Show

Check_Repeats:
  IF repeats = 0 THEN Reset                     ' all done?
    repeats = repeats - 1                       ' no, decrement repeats
    pntr = 0                                    ' reset show
    GOTO Play_Show                              '  and run it


' -----[ Subroutines ]-----------------------------------------------------

Run_Timer:
  IF tix = 0 THEN Timer_Done                    ' timer expired?
    PAUSE TicTiming                             ' no, time on "tic"
    tix = tix - 1                               ' decrement timer
    GOTO Run_Timer                              ' check again

Timer_Done:
  RETURN

' -----[ EEPROM Data ]-----------------------------------------------------

Show_Data:
'          +------------ end of show bit
'          |+----------- start audio player, not used
'          ||+---------- 6 candle
'          |||+--------- 5 candle
'          ||||+-------- 4 candle
'          |||||+------- 3 candle
'          ||||||+------ 2 candle
'          |||||||+----- 1 candle
'          ||||||||
'          ||||||||  +-- timing (1 to 255)

  EEPROM (%00000000, 0)                         ' start audio
  EEPROM (%00001001, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00001001, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00101101, 1)
  EEPROM (%00111111, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00001001, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00101101, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00001001, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00111111, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00000000, 0)                         ' inter-show delay
  EEPROM (%10000000, 0)                         ' show done
Jon McPhalen
EFX-TEK Hollywood Office

jeffh

i have a small problem with the rc4 board that i may need to ask the parallex people.
the program works fine when i trigger it.
the lights connected to the rc4 board are very dim when you power on the board and after a cycle.
in other words the lights are always on very dim. they are bright when you run the code.

these light are C7 LED screw in bulbs. could the palarity of one strand be feeding back

i don't think this happened with the regular lamps in my original testing.

thanks


JonnyMac

The RC-4 is our product, so don't ask Parallax (even if it is one of the original boards that say Parallax EFX on it).  That is odd, and what I suspect is that your load is not high enough for the solid state relays.  SSRs are funky this way.  I'll bet that if you add a regular 40w bulb in parallel with each string  this problem will go away.
Jon McPhalen
EFX-TEK Hollywood Office

JonnyMac

November 15, 2008, 10:43:38 PM #6 Last Edit: November 15, 2008, 10:53:30 PM by JonnyMac
Give this a try -- I think it does what you want and it easy to modify.  Don't be worried that the "post show delay" comes at the top of the program; sometimes we start in the middle!

' =========================================================================
'
'   File...... ClaytonFearFarm_Prop-1_Sound_RC4.BS1
'   Purpose...
'   Author.... Jon Williams, EFX-TEK (www.efx-tek.com)
'   E-mail.... jwilliams@efx-tek.com
'   Started... xmas candle ver2
'   Updated... 15 NOV 2008
'
'   {$STAMP BS1}
'   {$PBASIC 1.0}
'
' =========================================================================


' -----[ Program Description ]---------------------------------------------
'
' Triggered, table-drive sequencer capable of driving six control outputs
' on RC-4 relay boards.  Outputs 0-3 go to RC-4 %00, outputs 4-5 go to
' RC-4 %01.
'
' P6 is used as the trigger input.
'
' Note: Replace ULN2803 with ULN2003 to allow serial comms with AP-8
' (on P7).  The RC-4s must be placed between the Prop-1 and the AP-8.
'
' [Prop-1]--->[RC-4 %00]--->[RC-4 %01]--->[AP-8]


' -----[ Revision History ]------------------------------------------------


' -----[ I/O Definitions ]-------------------------------------------------

SYMBOL  Sio             = 7                     ' SETUP = out; no ULN
SYMBOL  Trigger         = PIN6                  ' SETUP = DN


' -----[ Constants ]-------------------------------------------------------

SYMBOL  IsOn            = 1                     ' for active-high input
SYMBOL  IsOff           = 0

SYMBOL  TicTiming       = 40                    ' 0.1 sec per step


' -----[ Variables ]-------------------------------------------------------

SYMBOL  showBits        = B0
SYMBOL   playAudio      =  BIT6
SYMBOL   endOfShow      =  BIT7

SYMBOL  relays          = B1                    ' RC-4 relay data
SYMBOL   K1a            =  BIT0                 ' RC-4 %00 K1
SYMBOL   K2a            =  BIT1                 ' RC-4 %00 K2
SYMBOL   K3a            =  BIT2                 ' RC-4 %00 K3
SYMBOL   K4a            =  BIT3                 ' RC-4 %00 K4
SYMBOL   K1b            =  BIT4                 ' RC-4 %01 K1
SYMBOL   K2b            =  BIT5                 ' RC-4 %01 K2

SYMBOL  timer           = B2
SYMBOL  cycles          = B3
SYMBOL  pntr            = B4                    ' step pointer
SYMBOL  tix             = B5


' -----[ Initialization ]--------------------------------------------------

Reset:
  PINS = %00000000                              ' clear pins
  DIRS = %00000000                              ' no local outputs

  SEROUT Sio, OT2400, ("!!!!!AP8", %00, "X")    ' kill sound if reset
  SEROUT Sio, OT2400, ("!RC4", %00, "X")        ' kill RC-4s
  SEROUT Sio, OT2400, ("!RC4", %01, "X")

  PAUSE 10000                                   ' post show delay


' -----[ Program Code ]----------------------------------------------------

Main:
  timer = 0                                     ' reset timer

Check_Trigger:
  PAUSE 5                                       ' loop pad
  timer = timer + 5 * Trigger                   ' update timer
  IF timer < 100 THEN Check_Trigger             ' wait for 0.1 sec input

  PAUSE 4000                                    ' pre show delay
  cycles = 3

Start_Show:
  pntr = 0

Play_Show:
  READ pntr, showBits                           ' get step

Check_Sound:
  IF playAudio = IsOff THEN Engine
    SEROUT Sio, OT2400, ("!AP8", %00, "P", 0)   ' start the sound

Engine:
  relays = showBits & %00111111                 '   update outputs
  SEROUT Sio, OT2400, ("!RC4", %00, "S", relays)
  relays = relays / 16
  SEROUT Sio, OT2400, ("!RC4", %01, "S", relays)
  pntr = pntr + 1                               '   point to timing
  READ pntr, tix                                '   read it
  GOSUB Run_Timer                               '   run the timer
  pntr = pntr + 1                               '   point to next step

  IF endofShow = IsOn THEN Check_Cycles         '   done?
    GOTO Play_Show

Check_Cycles:
  IF cycles = 0 THEN Reset
    cycles = cycles - 1
    GOTO Start_Show


' -----[ Subroutines ]-----------------------------------------------------

Run_Timer:
  IF tix = 0 THEN Timer_Done                    ' timer expired?
    PAUSE TicTiming                             ' no, time on "tic"
    tix = tix - 1                               ' decrement timer
    GOTO Run_Timer                              ' check again

Timer_Done:
  RETURN

' -----[ EEPROM Data ]-----------------------------------------------------

Show_Data:
'          +------------ end of show bit
'          |+----------- start audio player, not used
'          ||+---------- 6 candle
'          |||+--------- 5 candle
'          ||||+-------- 4 candle
'          |||||+------- 3 candle
'          ||||||+------ 2 candle
'          |||||||+----- 1 candle
'          ||||||||
'          ||||||||  +-- timing (1 to 255)

  EEPROM (%00000000, 0)                         ' start audio
  EEPROM (%00001001, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00001001, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00101101, 1)
  EEPROM (%00111111, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00001001, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00101101, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00001001, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00111111, 1)
  EEPROM (%00010010, 1)
  EEPROM (%00100100, 1)
  EEPROM (%00000000, 0)                         ' inter-show delay
  EEPROM (%10000000, 0)                         ' show done
Jon McPhalen
EFX-TEK Hollywood Office