• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

USB controller interface ?????

Status
Not open for further replies.

salem01

New Member
how can i mak a controller by usb port to control any electronic diveces ON and OFF using visual basic ??????



thanks alot
 

Styx

Active Member
you dont, use RS232.

USB is extreamly complex!!!! if all you want to do is send an ON/OFF signal RS232 is so much easier.

For starters you have to instanciate USB, Enumerate the host and then search and verify the client.

Then there is dealing with all the data that needs to be send and recieved.

Trust me USB is far to complex for just an ON/OFF signal
 

salem01

New Member
thanks for all .......

i have some projects work with LPT port but the problem when the PC starting in boot the hole pins in the parallel port is ON and that means the devices will be also ON until the windows start ,

i think to put an IC or something like that to keep devices OFF until windows start after that my program will connect with my circuit by DLL file which means a driver for the IC ..... :cry:

now i think there's one solution for that IC or some small circuit to keep devices off until connected by DLL file which doesnt work until the program start and that all what i exactly want ......
:?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?:
 

akg

New Member
Re: thanks for all .......

salem01 said:
i have some projects work with LPT port but the problem when the PC starting in boot the hole pins in the parallel port is ON and that means the devices will be also ON until the windows start ,

i think to put an IC or something like that to keep devices OFF until windows start after that my program will connect with my circuit by DLL file which means a driver for the IC ..... :cry:

now i think there's one solution for that IC or some small circuit to keep devices off until connected by DLL file which doesnt work until the program start and that all what i exactly want ......
:?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?:
do u use all the o/ps of LPT to control the device, if u have 2 o/p pins free , then i think this soln can be applied.
the thing is the bios will make all pins high ie 11 , and win: will make all low ie 00.
so the dll shld first make that 01/10, only after that, the on/off ckt shld acept any i/p from lpt
 

salem01

New Member
ok how can i use the PIC

please tell me how can i use PIC and which nimber i can buy




and some one told me i have to use Buffer IC ??????

is that correct and how ?


please i am so sad if i cant do that

:( :( :( :( :( :?: :?: :?: :?: :?: :?:
 

salem01

New Member
Thank you Mr.akg very much for assistance

but how can i connect that PIC to serial port wich pins i have to choose

and do you use it before ? :?: :!:

how many devises can I switch ON or OFF through computer ? :?: :!:

which language you used VB or C++ or other ? :?: :!:



Thank you again for assistance

your friend

====================================

Salem
Saudi Arabia
 

Nigel Goodwin

Super Moderator
Most Helpful Member
Re: Thank you Mr.akg very much for assistance

salem01 said:
but how can i connect that PIC to serial port wich pins i have to choose

and do you use it before ? :?: :!:

how many devises can I switch ON or OFF through computer ? :?: :!:

which language you used VB or C++ or other ? :?: :!:
As 'akg' suggested, trt mu PIC tutorials, I used Hyperterminal on the PC to connect to the PIC in the tutorials, but embedding your own serial routines in a PC program is quite simple, check the mscomm components.
 

akg

New Member
Re: Thank you Mr.akg very much for assistance

salem01 said:
but how can i connect that PIC to serial port wich pins i have to choose
pls look at the link i provided

how many devises can I switch ON or OFF through computer ? :?: :!:
depends on the no:eek:f I/O of the PIC
which language you used VB or C++ or other ? :?: :!:
u can use both
 

justDIY

Active Member
just to throw another option out there

you could use the serial port (or parallel port) and bitbang a string of 74HC595 shift registers ... each chip gets you eight outputs, and you can daisy chain up to 15 more chips.

if you are using an NT based OS, you will need a library that provides simulated direct hardware access, I think there are freebies out there for both C++ and Basic
 

Styx

Active Member
PYTHON!!!! soo easy to code for serial believe me!!! and it takes care of the nasty OS-interface
 

salem01

New Member
Ok

Thanks for all members who replay... you are realy made me shy :oops: :oops: :oops: :oops: :oops: :oops: :oops: :oops:


but so sorry because i am so biginner to use pic and is that pic ready to connect or need to program it ?

and please if any one do it before OR know how ? can give me the solution

which code i have to use through MSCOMM to connect to PIC

and all requirements of circuit



PLEASE I WANT THAT TO MAKE SOME THING VERY IMPORTANT TO ME
 

justDIY

Active Member

salem01

New Member
OK

thank you 4 all

but i am still wondering why i cant get the right easy way to make

Mr.Styx do you used PIC with rs232 or know how to make

please i almost cray if i dont make my project
 

justDIY

Active Member
it's not really a matter of an easy way or a hard way ... terms like that are defined by the skill level of the person working on the project, and how complicated they want to make something :wink:

an easy solution for me would involve taking a pic with built in USB (pic18f12xx or 24xx), and adding some latch drivers to it ... using serial load latch drivers, I could have a huge number of outputs... think 15x octal latches off each of the PIC's 18 or so IO ports... that's 270 outputs!

I would communicate with the pic using rs232 emulation (performed by a windows driver, supplied free from Microchip). A simple visual basic application, using the MSCOMM control would send commands to the PIC, telling it to turn on or turn off different outputs.

Then comes the hard part ... how complex do I want to make the interface between the PC and the PIC? I could have the PC do everything, and just send the pic 8, 16 or 32 bit values, representing the on/off condition of all the outputs. On the other extreme, I could have the PIC emulate some sort of text based menu system, a user inteface if you want to call it that. The status of each pin could be controlled using plain text english commands like "turn on output16". This is all software programming - the hardware is easy in comparison.

Without knowing more about your application, no one can really help you come up with a good solution.
 

salem01

New Member
Oh Thanks alot Mr. justDIY

ok i got alot of information from you about controlling


and i know some information about vb6 and little with MSComm OK


but please i didnt study any electronic or programming before that why i want you to help me


all i need control 8 output or 16 output using a PIC

pleeeeeeeeease if you have a diagram of connect the pic to rs232

and any example in VB6

TRY TO GIVE ME THEM

I know i made you little angry by my bother questions :roll:

=========================================

I know today some , tomorrow some , ....... one year more and more
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top