November 21, 2024, 12:24:30 PM

News:

You can now use Vixen to program your Prop-1 and Prop-2 controllers!  Get started quickly and easily, without having to learn PBASIC.  Details in the Library forum.


Prop2 I/O

Started by time2dive, June 29, 2011, 03:25:22 AM

Previous topic - Next topic

time2dive

I know how Out 0-15 work, how does P0-P15 work?  I am trying to run a MDFLY Audio board.  It takes 5vdc to run.  As soon as it gets power it starts playing the track that I have on the memory stick.  I thought (and I may be very well mistaken) that P0-P15 were inputs or outputs.  I thought that W was a switched 5vdc high, R was 5vdc and B ground.  Am I mistaken?  I could run an external 12vdc relay off of one of the outputs if this is not the case.  I was trying to eliminate a 5vdc power supply.

This is my set up code:

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

Sio             PIN     15                      ' no ULN / SETUP = UP
Trigger         PIN     6                       ' no ULN / SETUP = DN
TX              PIN     13                      ' no ULN / SETUP = UP
RX              PIN     12                      ' no ULN / SETUP = UP


'
'
'
' Note: The P1T button is used to simulate the PIR sensor in this demo.



Audio           PIN     14                   ' Audio Board
Pir             PIN     6                    ' PIR sensor
doors           PIN     0                    ' doors is connected to P5 to simulate pneumatic solenoid
outside         PIN     4                    ' lights are connected to P4
inside          PIN     9                    ' output to a relay to control the inside lights
fog             PIN     8                    ' output to a relay to control a fog machine
' -----[ Constants ]-------------------------------------------------------

IsOn            CON     1
IsOff           CON     0
t9600    CON  84
open     CON  $8000
baud     CON  open + t9600

JonnyMac

I found a few boards on their site; which one are you using?
Jon McPhalen
EFX-TEK Hollywood Office

time2dive

I am using an older board that is no longer on their site.  This is the hookup diagram for it.  It does work when I apply power.

http://www.firediving.com/MVPLY3Ehookup.pdf

Tim

JackMan

I have one of these audio players but not very happy with the performance. You should be able to power it from a Prop-1, Prop-2 by simply connecting the POS lead to any R pin and a common GND between the two boards, this will provide 5vdc to the player. An OUTx to pin 5 of the player should start the audio, another OUTx to pin 4 should play the next track.

bsnut

June 29, 2011, 10:13:07 PM #4 Last Edit: June 30, 2011, 02:16:39 AM by bsnut
Just remember that you have 5v @ 1 amp available from the Prop2 to power what you want. I don't think that the player you are planning to use will use over 200 ma this should be fine for the Prop2
William Stefan
The Basic Stamp Nut

time2dive

Problem mostly solved.  I ran my power form one of  the R pins and I am using OUT1 to turn on the audio board.  Since I only have one audio track on the memory stick it starts playing the audio track as soon as power is applied......either that or my board has a glitch.....either way as of now it works.

bsnut

June 30, 2011, 03:50:32 PM #6 Last Edit: June 30, 2011, 07:02:35 PM by bsnut
It's good to hear that you have it working. The way you solve your other problem is with a short pulse on the OUTx (pin 5 on the player). It needs done like this.

HIGH 0
PAUSE 500
LOW 0

Make sure that the "0" that I am showing here is changed to match your OUTx.
William Stefan
The Basic Stamp Nut

JonnyMac

July 01, 2011, 12:03:39 AM #7 Last Edit: July 01, 2011, 12:05:36 AM by JonnyMac
Do NOT use HIGH!!!

The inputs are active-low and probably have pull-ups on the board.  To "press" a button do this:

Play_Pause:
 LOW PP_PIN
 PAUSE 50
 INPUT PP_PIN
 RETURN


Use INPUT at the end of the sequence to release the pin to the onboard pull-up.  Note, too, that the ULN input circuitry is a pull-down so you need to cut any ULN channels that correspond to the pins you're using.  Or.... you could try to use the OUTx terminals instead of the TTL terminals; the OUTx terminals are open-collector which is what your audio player wants, anyway.
Jon McPhalen
EFX-TEK Hollywood Office