PDA

View Full Version : Basic Parallel Bit Output



NowThisIsScary
06-07-2008, 07:19 PM
I've been using Brookshire VSA to control various dimmers, dmx and servo controller boards along with a few homemade Kit74 type controllers. I've now got a circuit that is basically SPI driven and I've written sequences in VSA to drive D0,D1 & D2 as Clock,Data & Latch and it works great but too slow. VSA has a minimum event time of 33ms and I would like to move it to Vixen and take advantage of it's faster/adjustable timing so I can further develop my device. So-far I've setup a Basic Parallel plugin with three channels exactly the same as I had in VSA on the same PC on the exact same port address. VSA works good, Vixen not at all. What do I have screwed up?
Any ideas would be helpful. I've tried the same on Vixen 1 and Vixen 2 same results.

Virtus
06-07-2008, 08:25 PM
You will need to add the Basic Parallel plugin three times. Configure each one differently, corresponding to the three unique port addresses of your hardware. That should do it.

NowThisIsScary
06-07-2008, 09:13 PM
You will need to add the Basic Parallel plugin three times. Configure each one differently, corresponding to the three unique port addresses of your hardware. That should do it.

I'm only using one port address (378) and only using LPT1 port, just using three data lines of the same port D0, D2 & D3 off of the parallel port.

Macrosill
06-07-2008, 09:32 PM
This is just a guess but are you sure you are utilizing the proper pins on the parallel port? Maybe the pins Vixen is sending data to are not the pins you are hooking up to.

Maybe try the 12 channel parallel plug in.

Just guessing here.

RavingLunatic
06-07-2008, 09:52 PM
I tried a test of the plug-ins and monitored on a oscilloscope and I have no problem getting data on channels 1-3 using the basic parallel plug-in.

You can also use the 12-Channel parallel, but you need to make sure you assign 12 channels to the plug-in or you'll get an error. I got data on channels 1-3 also with no problem.


Just to make sure we all are talking the same thing:

Channel 1 (D0) = pin 2
Channel 2 (D1) = pin 3
Channel 3 (D2) = pin 4

NowThisIsScary
06-07-2008, 10:20 PM
I tried a test of the plug-ins and monitored on a oscilloscope and I have no problem getting data on channels 1-3 using the basic parallel plug-in.

You can also use the 12-Channel parallel, but you need to make sure you assign 12 channels to the plug-in or you'll get an error. I got data on channels 1-3 also with no problem.


Just to make sure we all are talking the same thing:

Channel 1 (D0) = pin 2
Channel 2 (D1) = pin 3
Channel 3 (D2) = pin 4

Yes, that is my setup exactly (matches my VSA setup and wiring) I will try the 12 Channel plugin next and see if it flies. Thanks

NowThisIsScary
06-08-2008, 12:33 AM
I was able to get some data output from the 12 channel plugin but it does not seem to be as stable as the same bit pattern in VSA. When I set the pattern to loop, (basically a set of simple on/off events to toggle the data lines) it seems as though the data changes on each loop somehow. I even matched VSA's 33ms event time for the sequence. I've tried setting the port the both ECP and EEP modes (works fine either way in VSA) but makes no difference in Vixen. I'm trying to output a clocked 16 bit data stream MSB first followed by a single latch to set a shift register. No Luck yet.

RavingLunatic
06-08-2008, 01:30 AM
If I understand what you are trying to do, I should have it in the attached pic.

Channel 1 & 2 each have 16 events alternating on/off (Chan1 on when chan2 off) at 33msec intervals.

Channel 3 sets the latch at the end of the 16 events.

My total time was 561 msec and looped it.

Hopefully your requirements are not for very strict timing on the 33msec intervals because my experience with the Vixen output thru the parallel port has shown the timing to be a more or less ballpark (+/- 5-10% ) of what the interval is programmed for.

If the computer decides to do another operation/task while outputting the pulses, your timing may even vary greatly.


Hope this helps you with your project.

NowThisIsScary
06-08-2008, 01:46 AM
Yes, thats what I'm doing (or trying to do with Vixen)
The interval is not critical as long as the bits arrive in the proper sequence something like:
D0 - OFF - ON - OFF - ON - OFF - ON - OFF - ON - OFF - ON - OFF - ON < CLOCK
D1 - ON - OFF - ON - OFF - ON - OFF - ON - OFF - ON - OFF - OFF - OFF < DATA
D2 - OFF - OFF - OFF -OFF - OFF - OFF - OFF - OFF -OFF - OFF - OFF - ON < LATCH

This works fine in VSA but it seems that extraneous data is being inserted (or dropped). I cannot output a consistent data stream of the same values from Vixen no matter what the event interval is set at.

WakeFan
06-08-2008, 01:55 AM
Do you have an EPP mode? I saw where you tried ECP & EEP. I know my 595 worked with EPP. I don't know anythind about port settings, but just throwing that out there.

RavingLunatic
06-08-2008, 11:27 AM
This works fine in VSA but it seems that extraneous data is being inserted (or dropped). I cannot output a consistent data stream of the same values from Vixen no matter what the event interval is set at.

How are you determining this? Monitoring on oscilloscope or the reaction of your hardware?

NowThisIsScary
06-08-2008, 12:06 PM
I've tested three ways (scope and plain old LEDs and my circuit) its how I modeled my first attempts with VSA, for some reason the Vixen output is just not stable. VSA has rock solid +5 - off - +5 transitions using either ECP or EPP port modes, just trying to get there on Vixen. I'll try it on a few other PCs and see if the results are the same. It just does not make any sense.

RavingLunatic
06-08-2008, 01:28 PM
I'm at a loss for what your problem might be.

What OS are you using? I think some folks have had problems with the parallel port in Vista. I'm using WINXP.

NowThisIsScary
06-10-2008, 01:21 AM
I've tried it on two machines with identical results. One is an old Win98 SE machine and another XP Pro SP2. The data stream from VSA works perfectly and is repeatable albeit slow with 33ms events. Same routine from Vixen seems to work the first time but upon repeated attempts or loops the data is changing and I get unexpected results.

RavingLunatic
06-10-2008, 07:00 AM
Can you post the .vix file? I'll see if it does the same for me.

RavingLunatic
06-11-2008, 02:18 PM
If you can change which pins you can use, here is something else you can try:

Use the Olsen 595 plug-in
Pin 1 = Clock
Pin 2 = Data
Pin 14 = Latch/Strobe

Set it up for 16 channels, Vixen sends the data out channel 16 first
Each event interval would hold your 16 bit data word


This would allow you to update your data much quicker than the other method.

Macrosill
06-11-2008, 02:42 PM
Something just dawned on me about 5 minutes ago when thinking about this issue.

You want to use the Basic parallel plug in to control your circuits. You keep referring to data, clock and latch. As my understanding is of the Basic Parallel and 12 Channel Parallel plug in is there is no data, latch and clock. These plugins are designed to simply make a pin go high when a channel is to turn on. This is intended to hook up 12 ssr's directly to the parallel port.

As RL stated above, clock, latch and data signals are utilized in the 595 plugins.

A Marchini
06-13-2008, 01:04 PM
I've been using Brookshire VSA to control various dimmers, dmx and servo controller boards along with a few homemade Kit74 type controllers. I've now got a circuit that is basically SPI driven and I've written sequences in VSA to drive D0,D1 & D2 as Clock,Data & Latch and it works great but too slow. VSA has a minimum event time of 33ms and I would like to move it to Vixen and take advantage of it's faster/adjustable timing so I can further develop my device. So-far I've setup a Basic Parallel plugin with three channels exactly the same as I had in VSA on the same PC on the exact same port address. VSA works good, Vixen not at all. What do I have screwed up?
Any ideas would be helpful. I've tried the same on Vixen 1 and Vixen 2 same results.


Are you using true SPI?? I mean, are you sending some kind of address ? What exactly is your SPI circuit?
Tony M.

NowThisIsScary
06-16-2008, 11:09 AM
Are you using true SPI?? I mean, are you sending some kind of address ? What exactly is your SPI circuit?
Tony M.

I was attempting to use the Basic Parallel to do a simple bit-bang interface. Creating the clock data and latch by transitioning the pins high/low in a sequence. This works fine in VSA with it's basic parallel mode for driving a relay board off the parallel port (like a Kit74)
I am sending a 16 bit data stream that is clocked on the trailing edge of each data bit then latched on the trailing edge of the last bit. I've been doing testing with several of the Allegro type chips.


http://www.doityourselfchristmas.com/forums/attachment.php?attachmentid=1505&stc=1&d=1213628864
Latest.JPG

RavingLunatic
06-16-2008, 08:59 PM
Thanks to your pic, I have figured out your problem (hopefully ;))

Don't ask me the why but here is the fix:

Setup your sequence for 8 channels and the plug-in also for 8 channels. You only need to use the first 3, the rest you can leave blank. I couldn't get any good data with only 3 channels (or less than 8 for that matter) assigned.

Also I think your data loading will work better if you move the latch to the next event interval after the last clock.

A Marchini
06-16-2008, 10:05 PM
I was attempting to use the Basic Parallel to do a simple bit-bang interface. Creating the clock data and latch by transitioning the pins high/low in a sequence. This works fine in VSA with it's basic parallel mode for driving a relay board off the parallel port (like a Kit74)
I am sending a 16 bit data stream that is clocked on the trailing edge of each data bit then latched on the trailing edge of the last bit. I've been doing testing with several of the Allegro type chips.


http://www.doityourselfchristmas.com/forums/attachment.php?attachmentid=1505&stc=1&d=1213628864
Latest.JPG

I am curious what kind of data is the 16 bits?? If it is not too complex, the 595 driver could be manipulated fairly easily to do the job.
Of course, then you have to fill in 16 parallel bits(channels) to make it work.
The standard cell value is 255 levels... perhaps it is valuable to just use the upper 16 bits??

Tony M. (where is Tony E when you need him?)

NowThisIsScary
06-17-2008, 12:34 PM
I am curious what kind of data is the 16 bits?? If it is not too complex, the 595 driver could be manipulated fairly easily to do the job.
Of course, then you have to fill in 16 parallel bits(channels) to make it work.
The standard cell value is 255 levels... perhaps it is valuable to just use the upper 16 bits??


The 16 bit data stream is comprised of two 8 bit words in MSB first format.
This is the information I used from the Allegro data sheet to get it working with VSA:


http://www.doityourselfchristmas.com/forums/attachment.php?attachmentid=1508&stc=1&d=1213720099
data.jpg

Just loading a 16 bit shift register bit by bit and latching just after the last bit is received.

RavingLunatic
06-17-2008, 02:37 PM
Did the suggested fix do anything for you?


I guess one of the things that you need to consider is how often do you want to make updates to your data.

Using the "bit banging" method you are trying to use will only allow updates at a little over 1 sec intervals. If you are needing to do faster updates you might want to consider the Olsen 595 plug-in as suggested earlier.

NowThisIsScary
06-17-2008, 03:09 PM
Did the suggested fix do anything for you?


I guess one of the things that you need to consider is how often do you want to make updates to your data.

Using the "bit banging" method you are trying to use will only allow updates at a little over 1 sec intervals. If you are needing to do faster updates you might want to consider the Olsen 595 plug-in as suggested earlier.

I just saw your fix (using all eight channels of the Basic Parallel) don't know how I missed it before. I will give that a try first. If that works I will try to set the event duration shorter (less than 30ms) and see if it holds up. I'd be happy with a 10ms interval.

I will also work with the 595 driver on another PC to see what luck I have with 16 bit word output.

Thanks for all the help.

NowThisIsScary
06-19-2008, 10:31 AM
I think I found the problem. Using either the Basic or 12 Channel parallel drivers I was able to get stable output only when I kept the event duration above 75ms. My goal was to get the shortest duration < 10ms. This could also be a limitation of the parallel port hardware on the two PCs I've tested with.

I'll start working on the 595 driver next.

NowThisIsScary
06-21-2008, 02:05 AM
Ok, got it working fine with the Olsen 595 plug-in now.
Thanks for all the help guys.