-
February 16th, 2004, 02:08 PM
#41
http://www.electronickits.com/kit/complete/elec/ck1601.htm
I have built a relay and can control it with software i found here http://www.electronickits.com/kit/co...lec/ck1601.htm, but there driver wont work with xp, I use xp's printer port diver and it does work but it sets all pins high at the same time, for now thats ok with me I am only useing one relay
, does any one know of a driver for xp? I have also tryed the above script and it does turn on my relay but it wont shut it off, what can I do to make it shut it off???
-
February 16th, 2004, 02:12 PM
#42
ok, PORTIO_WriteBYTE( 888, 0) turns it off, now this is ok for 0ne relay how would I break it down to each pin for other relays?
-
February 22nd, 2004, 11:42 PM
#43
the Portiowritebyte writes the binary parallel data through the D0-D7 lines, a value of 0 to 255. So to control individual D0,D1,D2... lines you simply need to try numbers 1,2,4,8,16,32,64,128 decimal for each pin and then addition of each of these numbers to turn on multiple pins at once such as 1+2+4=7 have fun
I've already had a little fun with this
Might i suggest you read the port value then binary add or binary subtract the port you wish to turn off. then write to the port.
if you need a sample let me know
-
February 23rd, 2004, 06:59 PM
#44
Could you post some sample code for what you are talking about?
I built a parallel-relay system and use it control the buzzer panel in my brownstone from my cell phone. I've been using the command-line software that i found online, but I'd love to integrate it more fully into Girder.
Thanks!
-
February 24th, 2004, 11:00 PM
#45
PORTIO_WriteBYTE( 888, 0) is off
PORTIO_WriteBYTE( 888, 1) is on
-
February 29th, 2004, 11:30 PM
#46
Here is some sample code i found.
This section makes certain to write only a 0 to portIO location D0 without changeing other port lines
--this code turns only one port pin off or on
PortValue = PORTIO_ReadBYTE( 888 )
--THis code sets the port value to 0
NewPort= bxor(1,PortValue)
PortValue = band(NewPort,PortValue)
PORTIO_WriteBYTE( 888, PortValue)
This section Makes certain to write only a 1 to portio location D0 without changeing other point lines
--THis code sets the port value to 1
PortValue = (bor (1,PortValue))
print (PortValue)--simple debugging line
PORTIO_WriteBYTE( 888, PortValue)
Suppose you wish to toggle any one of the ports try this code
PortValue = PORTIO_ReadBYTE( 888 )
-- this line toggles the D# line
PortValue = bxor(pld1,PortValue)
PORTIO_WriteBYTE( 888, PortValue )
PortValue = PORTIO_ReadBYTE( 888 )
However pld1 must be a decimal number of 1,2,4,8,16,32,64,128 for each of the d0,d1,d2,d3,d4,d5,d6,d7 ports
I use the the menu osd to send the pld1 to the scripts.
-
March 1st, 2004, 12:06 AM
#47
i also found this link here for a simple device.
http://ourworld.compuserve.com/homep...wden/page6.htm
it shows several ways to hook a relay to the lpt port and i know if you power the 5V relay from a sacrificed USB cable you should not need to worry about spikes as much.
add a few filter caps into the design and it works.
P.S. i used figure c with 5V supply and didn't have to change anything other than a 5V relay.
-
March 2nd, 2004, 03:41 PM
#48
Hi
I have been using the RS232 Port to drive relays for some time
First with basic, then qbasic now Homeseer
Could anyone tell me the syntax to output from Girder please?
I am used to outputting something like CHR$(45) will this work in Girder
If anyone needs information on switching relays please ask
David
-
March 2nd, 2004, 04:22 PM
#49
What exactly are people using these relays for?
I already mentioned that I use mine to connect to the com-box for my brownstone, allowing me to unlock my front door with cell phone. Works great for when i forget my keys and wow-factor.
But my driver has 8 relays and I only use 3. What are some nifty things I can do with the other 5?
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules