Discussion in "General help Guidance and Discussion" started by    har    Jan 21, 2008.
Mon Jan 21 2008, 02:45 PM
#1
can anyone help me in building an VB interface with coding and tutorials.
basically how does the communication between the PC and the microcontroller takes plce through VB interface.
Mon Jan 21 2008, 06:10 PM
#2
all you need to do is add a MSCOMM component in your project. this has been explained in forum many times i think. Please search it once. you might find it.. for sure..
if not we are all here
 har like this.
Tue Jan 22 2008, 04:35 PM
#3
thanks once again, im not yet clear because im not thorough with Visual Basic.i would like to explain my doubt once again by taking the example of the PC remote project:
even in this project there is a form. does this form takes part in the interaction between the microcontroller and PC.
in VOICE INTERACTIVE COLLEGE AUTOMATION SYSTEM PUBLISHED HERE project im intended to enquire attendance of students from phone. so what is the role of VB here.
please kindly help
Tue Jan 22 2008, 06:44 PM
#4
As i said you need to add MSCOMM component in your project..
In Visual Basic 6.0: right click the toolbox and select "Components". Check "Microsoft Comm Control 6.0" and click "OK". Place a MSComm control (it looks like a phone) on your form (it will be invisible at runtime). You can name the control if you like, the default name is MSComm1.

For setting up MSComm1 component..
    MSComm1.CommPort = COM1        'Define COM port available on PC
    MSComm1.Settings = "9600, N, 8, 1"      '9600 Baudrate, No Parity, 8 bits data, 1 Stopbit.
    MSComm1.InputLen = 1                    'Read 1 character/byte whenever Input property is used.
    MSComm1.InputMode = comInputModeBinary  'Input will retrieve data in array of bytes.
    MSComm1.PortOpen = True                 'Open Serial Port COM1.


To read from serial port...
If MSComm1.InBufferCount Then
read_value = MSComm1.Input 'read_value will have whatever is sent to serial port of PC


and to write to serial port..
MSComm1.Output = something_to_send


I hope many things are clear now
 harpdi33 like this.
Tags MSCOMM VB projectserial programming VBCOM port programming Visual Basic
Thu Jan 24 2008, 09:46 AM
#5

ok
if i want to read the com port only when there is a new data received
by using interrupt
so how can we do that
Thu Jan 24 2008, 11:19 AM
#6
Ritesh
for this u can make use of onComm event.
go to properties of mscomm , set RThreshold to 1.
then use code
Private Sub MSComm1_OnComm() 
   If (MSComm1.CommEvent = comEvReceive) Then  ' if something received
        Text3.Text = MSComm1.Input 'save it to text3
   End If
End Sub

whenever new data is arrived , onComm event will be generated(like interrupt) and that data will be saved to text3.
Fri Jan 25 2008, 07:33 AM
#7
THANKS
ANY NEW IDEA TO SAME
BUT FOR DOT NET 2005
Fri Jan 25 2008, 08:06 AM
#8
.net is tough.. never used it
Sat Jun 28 2008, 11:47 AM
#9
can i know where to download the visual basic?what is the programming language use in visual basic?
Sat Jun 28 2008, 01:40 PM
#10
hi cenadius,
visual basic itself is the programming language .
It can be installed as an integral part of Microsoft Visual studio or can be installed seperately. It does not have a freeware or shareware version so u have to buy it from microsoft.

Get Social

Information

Powered by e107 Forum System

Conversation

Wed Oct 21 2020, 07:05 PM
Stephania Layden
Want to CLONE an affiliate site that is making commissions RIGHT NOW?
Thu Jun 11 2020, 06:27 AM
anudee
sir could please send the code for I2C and wifi interfacing with 8051
scena
Tue May 19 2020, 10:29 PM
Does anyone have microcontroller programming software for STC15F104W (core 8051, 4 k, 128 byte, 6 I/O pin, UART ... DIL8), that works?
Sat May 02 2020, 07:38 PM
Tamu Gurung
Hi I am looking for a assembly language program for a digital decimal counter. Time counts max limit of 2 mins starting from 2.00 mins and ending at 0.00. time is to be displayed on 4 7-segment LED displays. Edsim51 simulator to be used. Thanks
Wed Mar 25 2020, 01:39 PM
Tajammul
Sir kindly send the code file i2c for 8051
ExperimenterUK
Fri Mar 13 2020, 10:36 PM
@ Rohitnani,ABEBE..which project ?
Fri Mar 13 2020, 12:55 PM
ABEBE
how can get hadwere of this project
Rohitnani
Sat Mar 07 2020, 05:11 PM
Sir, Could you please send me the zip file input password....
Wed Feb 26 2020, 04:58 PM
Peter Parker
Is it possible to send multiple messages using only 1 GSM module?
Sat Feb 01 2020, 10:12 AM
Pearl Olin
Hello,

Downloads

Comments

Mirza123
Thu Jun 25 2020, 03:46 PM
eunicelove124
Mon Jun 22 2020, 03:03 PM
cerouno
Tue Jun 16 2020, 05:10 PM
Marce
Sat Jun 13 2020, 09:43 PM
Davidthils
Thu May 21 2020, 12:44 PM
Jakeror
Thu May 21 2020, 01:28 AM
motorCar
Wed May 20 2020, 07:05 PM
Vordrync
Wed May 20 2020, 11:52 AM

Online

Guests: 103, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 38215
Newest member: Mirza123