Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
LinkBack Thread Tools Display Modes
Old 9th June 2008, 06:37 PM   (permalink)
Default Computer Interface - Twelve switches

Hi, I need to turn on and off twelve little switches - or transistors from my pc. I would input either a list of states (12 ones and zeros) or tell the computer to try all combinations from one particular to another.

Interface:
Requiring all of the twelve transistors to change state (each according to program) once every 1.5 seconds or so isn't so intensive.
What would be the best interface for me to use? Parallel port? USB?

Software: This is an electronics forum, so i don't expect step by step help in coding this - and i enjoy problem solving. But is there a library or code example in c or python or similar showing how to change the state of say, one of the pins on a parallel port to make it hot? Using that i could string together a couple functions some nice variables and a little command line interface to let me guide it.
Is there a simpler, very straight forward way of doing this?

This is why, if you care:
I've got quite a couple PICs handy, but the reason i want to interface to a pc, is for more interaction, saving of sequences and determining the final or actual value, which is obtained in a brute force fashion. The computer would say change the combinations in a sequence, and if i tell it, "HEY! It just worked!" then my it would make a shortlist of the last couple ones tried. Trying those combinations again, i can determine what state each of the twelve need to be and save it for future reference.
__________________
Under the terms of the GPL - General Posting License
[Meaning mods may modify, delete and redistribute any of the posts herein contained, 'cause there's no stopping you]
Clyd3 is offline  
Old 9th June 2008, 06:43 PM   (permalink)
Default

Since you've got some PICs, just use RS232 and treat the PIC as a RS232 latch.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now  
Old 9th June 2008, 06:58 PM   (permalink)
Default

hi clyd.

Look at this zip.
Place the *.dll s in the windows\system folder.

It may give you an idea.

You will need the Visual Basic 5 runtime files from the web, free.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/

Last edited by ericgibbs; 7th July 2008 at 12:25 PM.
ericgibbs is offline  
Old 9th June 2008, 08:15 PM   (permalink)
Default

3 lines of Python code will send data to the parallel port.
pyParallel

Python also has support for serial interfacing.
pySerial
colin mac is offline  
Old 9th June 2008, 09:58 PM   (permalink)
Talking

Quote:
Originally Posted by ericgibbs View Post
hi clyd.

Look at this zip.
Place the *.dll s in the windows\system folder.

It may give you an idea.

You will need the Visual Basic 5 runtime files from the web, free.
Looks quite interesting that. So those pins, are they continuously on / or off as set by that app? (or is it sending some form of data?).
It seems too good to be true...

Quote:
Originally Posted by blueroomelectronics View Post
Since you've got some PICs, just use RS232 and treat the PIC as a RS232 latch.
Been looking at tutorials at microchip in c. Some good stuff there on this that i should look into, but if that little vb thing eric showed is as i hope, that'll seriously save some time...

Btw, python rocks the treehouse
__________________
Under the terms of the GPL - General Posting License
[Meaning mods may modify, delete and redistribute any of the posts herein contained, 'cause there's no stopping you]
Clyd3 is offline  
Old 9th June 2008, 10:25 PM   (permalink)
Default

Neil Fraser: Software: Parallel port monitors
This program can turn on off pins one at a time too as well as monitor the port.
colin mac is offline  
Old 10th June 2008, 07:41 AM   (permalink)
Default

hi clyd,

Quote:
Looks quite interesting that. So those pins, are they continuously on / or off as set by that app? (or is it sending some form of data?).
It seems too good to be true...
The select buttons on the VB5 module Set/Clear [ High/Low] the state of the PC's parallel port pins. The state of the pin is indicated by the Red/Green colour of the pin box shown on the module.

The read option scans the input pins about once/sec and displays the state of the pin on the module.

NOTE: some parallel port pins are 'inverted'.

The VB5 source code included in the zip can easy be modified to suit your application.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Old 10th June 2008, 08:13 AM   (permalink)
Default

Thank you very much. I think it's time to get started then. Shot!
__________________
Under the terms of the GPL - General Posting License
[Meaning mods may modify, delete and redistribute any of the posts herein contained, 'cause there's no stopping you]
Clyd3 is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
Digital Caliper to Computer Interface Plans 3v0 Micro Controllers 15 25th December 2008 05:21 PM
How can i interface a controlled toy car to a computer? andales General Electronics Chat 9 12th October 2007 08:06 AM
LCD Display/Computer USB Interface software. MrMikey83 General Electronics Chat 6 27th February 2006 07:33 AM
IR computer interface bogdanfirst General Electronics Chat 3 24th January 2004 10:03 PM
computer printer port interface bogdanfirst Electronic Projects Design/Ideas/Reviews 10 26th September 2003 08:27 AM



All times are GMT. The time now is 05:42 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

eXTReMe Tracker