![]() |
![]() |
![]() |
|
|
|||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
|
|
Thread Tools | Display Modes |
|
|
(permalink) |
|
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 |
|
|
|
|
|
|
(permalink) |
|
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. |
|
|
|
|
|
|
(permalink) |
|
i don't interface with h/w. I want to interface with RS232
THanks much I want you helping
__________________
lamducte |
|
|
|
|
|
|
(permalink) | ||
|
Quote:
Quote:
|
|||
|
|
|
|
|
(permalink) |
|
just don't forget to change RThreshold to one or anything bigger than 0...
|
|
|
|
|
|
|
(permalink) | |
|
Quote:
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 :=- |
||
|
|
|
|
|
(permalink) |
|
Use mscomm. that all u need. i'have done that. http://www.rentron.com/receiving_data.htm this is the best tutorial.
Regards |
|
|
|
|
|
|
(permalink) |
|
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... |
|
|
|
|
|
|
(permalink) |
|
Why? I've used MSCOMM at higher speeds than 19.2K.
Mike |
|
|
|
|
|
|
(permalink) |
|
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 |
|
|
|
|
|
|
(permalink) |
|
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! |
|
|
|
|
|
|
(permalink) |
|
Thank you very much!
I want to interface with AT89s52 Because I don't know PIC I want your helping
__________________
lamducte |
|
|
|
|
|
|
(permalink) |
|
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 |
|
|
|
|
|
|
(permalink) |
|
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 |
|
|
|
|
|
|
(permalink) |
|
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. |
|
|
|
|