Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 27th October 2005, 03:10 AM   (permalink)
Default Interface to PC using Visual Basic

I have tried to interface PC with Visual Basic. But I cant because i dont have basic knowlegde. Can you help me?
I'm a Vietnamese because I am bad in English.
__________________
lamducte
c828 is offline  
Reply With Quote
Old 27th October 2005, 11:34 AM   (permalink)
Default

u cannot access the h/w ports directly using vb .
i'll give u some refrences.
to communicate with parallel port have a look at
http://www.logix4u.net/inpout32.htm and
http://www.lvr.com/parport.htm

with com port .. u can use "microsoft comm control " select it from the components tab.. in vb.

replay how this helped u.
akg is offline  
Reply With Quote
Old 28th October 2005, 01:39 PM   (permalink)
Default

i don't interface with h/w. I want to interface with RS232
THanks much
I want you helping
__________________
lamducte
c828 is offline  
Reply With Quote
Old 28th October 2005, 01:54 PM   (permalink)
Default

Quote:
Originally Posted by c828
i don't interface with h/w. I want to interface with RS232
THanks much
I want you helping
Try his last line!.

Quote:
with com port .. u can use "microsoft comm control " select it from the components tab.. in vb.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Reply With Quote
Old 31st October 2005, 03:39 PM   (permalink)
Default

just don't forget to change RThreshold to one or anything bigger than 0...
panic mode is offline  
Reply With Quote
Old 1st November 2005, 01:34 PM   (permalink)
Default Re: Interface to PC using Visual Basic

Quote:
Originally Posted by c828
I have tried to interface PC with Visual Basic. But I cant because i dont have basic knowlegde. Can you help me?
I'm a Vietnamese because I am bad in English.
Visual basic can interface to any computers through winsock (PC = Personal Computer)

BUT, if you mean the PIC microcontroller, then forget using Visual Basic unless there is a special driver that acts as a middleman between Visual Basic and the computer port you are interfacing through.

Get a hold of Quick Basic and you can interface it to a port as follows:

out (port),(1-byte data).

In fact, you could use the same instruction in assembler.

So if you wanted to send character code 1 to LPT1, then in Quick Basic you use:

OUT &H378, 1

the &H means the numbers after it are hexadecimal.
The above also assumes LPT1 is at address 378h.
__________________
-=: The best low-priced components to troubleshoot with are the speaker and the LED :=-
mstechca is offline  
Reply With Quote
Old 2nd November 2005, 03:21 PM   (permalink)
Default

Use mscomm. that all u need. i'have done that. http://www.rentron.com/receiving_data.htm this is the best tutorial.

Regards
garg29 is offline  
Reply With Quote
Old 2nd November 2005, 04:56 PM   (permalink)
Default

mscomm is all you need - if the comm speed doesn't exceed 19200bps.
if you want connections of 38.4kbps or higher you will have to look for alternative driver...
panic mode is offline  
Reply With Quote
Old 2nd November 2005, 06:03 PM   (permalink)
Default

Why? I've used MSCOMM at higher speeds than 19.2K.

Mike
upand_at_them is offline  
Reply With Quote
Old 2nd November 2005, 07:32 PM   (permalink)
Default

if you want to use the latest software, microsoft's .NET 2.0 has had serial port support added back into it, in the System.IO.Ports namespace. so if you use the (currently free) VB.NET express edition (which is based on the upcoming .NET 2.0) you can use it... or you can wait for the new Visual Studio.NET 2005 to be released.

It's a lot more elegant interface than it was in many previous versions of VB, which usually was sort of "hacking" to get it to work. I interfaced a serial port to VB6 a couple years ago, but it was pretty confusing, and the program I ended up with didn't make much sense, although it worked.
__________________
EEgeek.net
evandude is offline  
Reply With Quote
Old 2nd November 2005, 08:31 PM   (permalink)
Default

Visual Studio 2005 was already released, (I use RTM already).
That serialport component is sweet, I use it a lot...
__________________
"I share, thus I am"
Jay.slovak
Read this!
ICD2 Clone
Best PIC/DsPIC Bootloader

Read my Inchworm ICD2 review!
Jay.slovak is offline  
Reply With Quote
Old 3rd November 2005, 12:39 AM   (permalink)
Default

Thank you very much!
I want to interface with AT89s52
Because I don't know PIC
I want your helping
__________________
lamducte
c828 is offline  
Reply With Quote
Old 3rd November 2005, 12:45 AM   (permalink)
Default

Thank you very much
You can help me again
I want a example code
If you have both GUI and source code that very fantastic
HELP ME
I have to hand in my teacher in next month
Thanks a lot
__________________
lamducte
c828 is offline  
Reply With Quote
Old 4th November 2005, 04:16 AM   (permalink)
Default

if u have vb on ur desktop..it's better to try urself.

create a form .. place a mscomm ctrl , assign the reqd port and corresponding baud,parity,stopbit settings..etc..call portopen method..
have a look at
http://msdn.microsoft.com/library/de.../vbobjcomm.asp

http://msdn.microsoft.com/library/de...vbobjcommx.asp
akg is offline  
Reply With Quote
Old 9th November 2005, 08:57 AM   (permalink)
Default

Try MSCOMM.You need to add it to your tool bar first.
I've built a lot of applictions in VB with it.It works well.
Alex_rcpilot is offline  
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




All times are GMT. The time now is 08:03 PM.


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