November 23, 2024, 01:06:50 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.


New to Prop-1 Need Assist with Programming

Started by machtoo, June 11, 2012, 12:41:31 PM

Previous topic - Next topic

machtoo

Thanks, I'll give these a try.  Are these versions intended to use the OUTx to trigger the TROLL or the PINx?  The last version I posted was based on some recommendations from Jon to try triggering directly from the PINs.

JonnyMac

At the risk of repeating myself... I never code for a new device in the middle of a program; I always work on the interface in isolation.  You've received suggestions from Jack, William, and me, and I'm not sure what the final mix is doing.

Here's a small test program that let's you test the two modes (you'll update the MODE constant to switch).  Try this and let me know which version works; from there I will update the program to match.

' =========================================================================
'
'   File......
'   Purpose...
'   Author....
'   E-mail....
'   Started...
'   Updated...
'
'   {$STAMP BS1}
'   {$PBASIC 1.0}
'
' =========================================================================


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


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


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

SYMBOL  Audio2          = PIN2
SYMBOL  Audio1          = PIN1


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

SYMBOL  IS_ON           = 1                     ' for active-high in/out
SYMBOL  IS_OFF          = 0

SYMBOL  MODE            = 0                     ' 0 = OUTx
                                                ' 1 = Px.W

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



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

Reset:
  DEBUG CLS
  BRANCH MODE, (Setup0, Setup1)

Setup0:
  LOW Audio1
  LOW Audio2
  GOTO Main

Setup1:
  INPUT Audio1                                  ' float to pull-up
  INPUT Audio2


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

Main:
  BRANCH MODE, (Use_OUTx, Use_Px)

Use_OUTx:
  DEBUG "Trigger Audio 1 -- OUTx", CR
  PULSOUT Audio1, 5000                          ' 50ms pulse
  GOTO The_End

Use_Px:
  DEBUG "Trigger Audio 1 -- Px", CR
  LOW Audio1
  PAUSE 50
  INPUT Audio1

The_End:
  DEBUG "Audio should be playing", CR

Hold:
  GOTO Hold


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


' -------------------------------------------------------------------------


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

machtoo

Hi Jon,

I ran your debug program with the following steps:

1.  Using the MODe constant as 0, I connected the grounds together and a wire from OUT1 to TG1 on the Audio Troll.
2. I loaded the program and left the interface cable connected.
3. I ran the program.  The debug window did appear with the message that audio should be playing (Track 1 on the Troll).
4. The audio track on the Audio Troll did not trigger.  The ambient track continued looping.


5. I changed the MODE constant to 1.
6. I removed the wire from OUT1 to TG1 and connected a wire from W1 to TG1 on the Audio Troll leaving the grounds connected.
7. I ran the propgram. The debug window did appear with the message that audio should be playing (Track 1 on the Troll).
8. The audio track on the Audio Troll did not trigger.  The ambient track continued looping.

Michaal Stragey from Hauntropolis (vendor for Audio Troll) has asked that I send him everything and he will attempt to get everything working.  My suspicion is this particular Audio Troll is not triggering properly for some reason.  The only thing I have been able to trigger it with is a piece of wire connected the trigger input to the ground momentarily.

JackMan

QuoteThe only thing I have been able to trigger it with is a piece of wire connected the trigger input to the ground momentarily.

This is exactly what happens with the trigger input connected to an OUTx. When the OUTx goes high, the trigger input from the audio player gets connected to GND.

bsnut

June 14, 2012, 05:40:21 PM #34 Last Edit: June 14, 2012, 08:04:48 PM by bsnut
I have to agree with Jack. If you are able to trigger the Audio Player with a piece of wire this tells me that Michaal Stragey's from Hauntropolis player is working. What you may have to do is increase the PAUSE command since touching trigger input with wire is longer than 25ms.

BTW, When we talk about the connections on the Prop-1 or the Prop-2 the OUTx is refer to the screw terminal connections. 
William Stefan
The Basic Stamp Nut

JonnyMac

Just to be clear and accurate, the output of the ULN is going to be a bit above ground because there is a drop across the EC junction of a transistor. According to the ULN spec sheet the Vce voltage is about 0.9v.  What we don't know about the device in question is the Vil rating.  If it's below 0.9 the ULN outputs won't work, but we could connect directly to the Px.W connection (well, indirectly through a 220-ohm resistor). The Vol output from the PIC16C56A (BS1 processor) is 0.6v.  Both of these values should be low enough to trigger a device that uses an open-collector input.
Jon McPhalen
EFX-TEK Hollywood Office

machtoo

Just an FYI, I tried various lengths of pauses/pulses from 10 msec to 1 sec and none would trigger the Audio Troll.  Even with a piece of wire, I could very briefly touch to ground and it would trigger.  If I held it too long it would not.  I sent the Prop-1 and the Audio Troll to Michael today per his request.  Should hopefully have some answers soon.