November 22, 2024, 07:50:18 PM

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.


RC-4 Boards & Vixen

Started by rawille, June 24, 2008, 12:46:30 PM

Previous topic - Next topic

rawille

Ok, I was able to modify one of Jon's PBasic programs and control 4 RC-4 boards using the Prop-2 controller (boards daisy chained together off P15). I was also able to use Vixen to create a display and use the serial inverter to control the same 4 RC-4 boards.
I also used Vixen to create a display and the Prop-2 sequencer to generate a PBasic program that downloaded into the Prop-2 controller that controls the leds on the Prop1 trainer.
Enough about what I can do, this what I want to do and can't figure it out.
I want to use Vixen to create a display and a PBasic program that I can download into the Prop-2 controller that will control 4 RC-4 boards and 4 FC-4 boards which daisy chained together and connected to P15. I don't need any triggers or audio at this time but may want to add audio in the future.
All the PBasic programs that I currently generate using Vixen and the Prop-2 sequencer have triggers and appear to control outputs on P0 to P13 with P14 as trigger input and P15 as the audio start.
Any assistance would be appreciated. (Up here in the great white north our brains are still frozen).

JonnyMac

June 24, 2008, 01:52:52 PM #1 Last Edit: June 24, 2008, 01:57:37 PM by JonnyMac
To be candid, it's going to be a two-step process.  Create the sequence in Vixen, output a file, then copy your output engine into that program.  To create a new Vixen driver requires C# programming -- I don't even do that; and it would be hard to justify having the Vixen creator do that for us a this is the only request for such a driver thus far.

I'm not sure what you've done, but here's how I would update the run-time engine (at Play_Show) for RC-4s (do not use K3 or K4 on RC-4, addr %11):

Main:
  record = 0                                    ' point to start of show
  IF (Trigger = IsNotActive) THEN Main          ' wait for trigger

Start_Audio:
  SEROUT AudioStart, Baud, ["!AP8", %00, "P", 0]

Play_Show:
  READ (record * 3), Word showBits, tix         ' get outputs & timing
  SEROUT AudioStart, Baud, ["!RC4", %00, "S", showBits.NIB0,
                            "!RC4", %01, "S", showBits.NIB1,
                            "!RC4", %10, "S", showBits.NIB2,
                            "!RC4", %11, "S", showBits.NIB3]
Timer:
  IF tix = 0 THEN Next_Step                     ' timer expired?
    PAUSE (EventDelay - 7)                      ' no, time one "tic"
    tix = tix - 1                               ' decrement timer
    GOTO Timer                                  ' check again

Next_Step:
  IF (endofShow = IsOn) THEN Reset              ' done?
    record = record + 1                         ' no, point to next
    GOTO Play_Show                              ' and keep going


Note that all the serial commands for the RC-4s take about 7 milliseconds at 38,400 baud, hence the PAUSE instruction in the Timer section has been modified.
Jon McPhalen
EFX-TEK Hollywood Office

rawille

Ok, Thanks Jon. That's kinda what I was doing and I should have mentioned it. I just thought there might be an easier way that I missed.