Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

vb based relay control using usb port....

Status
Not open for further replies.

jit_singh_tara

Full Member level 6
Full Member level 6
Joined
Dec 22, 2006
Messages
325
Helped
9
Reputation
18
Reaction score
4
Trophy points
1,298
Location
Delhi , India
Activity points
4,292
Dear friends ,
I am new to pc side programming , I need to design something like this:

An application in vb which uses usb port of pc ,to connect to a hardware consisting of pic microcontroller (with usb support) to control 4 relays .

Please suggest me how to begin , what all i need to do on both:

1.PC side vb application
2.Microcontroller side usb interface, if i plan to use a usb controller of pic , then do i need to implement usb framework on it using microchip library.

Please sugggest..
thanks and regards.....
 

bassa

Super Moderator
Staff member
Advanced Member level 5
Joined
Jul 15, 2007
Messages
1,814
Helped
191
Reputation
402
Reaction score
156
Trophy points
1,353
Location
Sri Lanka
Activity points
10,985

nikhildascl

Full Member level 3
Full Member level 3
Joined
Apr 15, 2012
Messages
150
Helped
15
Reputation
30
Reaction score
14
Trophy points
1,318
Location
Kerala, India
Activity points
2,115
Instead of USB. use the RS232 interface. So, you can connect it using a USB-RS232 converter to Laptop or directly to PC via RS232 cable. Because of RS232 interface it is very easy to design the PC side application in VB:)
 

enob

Newbie level 5
Newbie level 5
Joined
May 31, 2012
Messages
9
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,317
I did something similar to this a long time ago. I created a module "porting.vb"

Code:
Module porting
    Public Declare Sub Out Lib "inpout32.dll" _
       Alias "Out32" (ByVal PortAddress As Integer, ByVal Value As Integer)
End Module

Then you can just make simple calls to it:
Code:
 porting.Out(888, 0)

This was for serial though, but it might help.
 

Kuzito

Newbie level 6
Newbie level 6
Joined
Nov 5, 2006
Messages
14
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,459
Hi,

Here is simple VB NET software for control USB Relay incl. source code

**broken link removed**

**broken link removed**

Source code:
**broken link removed**
 

behnam9856

Member level 3
Member level 3
Joined
Jan 12, 2010
Messages
63
Helped
11
Reputation
22
Reaction score
10
Trophy points
1,288
Activity points
1,627
libusb is good and works very well...

also u can use FT232 (usb to rs232 converter) if u wanna design it easily!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top