View previous topic :: View next topic |
Author |
Message |
kalman
Joined: 19 Jan 2010 Posts: 4
|
connect pic to vb |
Posted: Thu Mar 25, 2010 3:40 am |
|
|
Hi. I need to connect my pic to visual basic, VB.
I need them to send a value from my sensor through serial and display in VB application.
I'm using pic16f877a and PCWHD 4.084.
vb 6.0.
I need to know the connection and program both for PIC and VB.
I don't have experience to do this.
If anyone can give a reference please do. |
|
|
LostInSpace
Joined: 09 Mar 2010 Posts: 13
|
|
|
LostInSpace
Joined: 09 Mar 2010 Posts: 13
|
|
Posted: Thu Mar 25, 2010 6:33 pm |
|
|
OK I see that the webarchive did not archive the source code. I have that code- if you want it you can go to my website: analoghome dot com and hit the link to send me an email - I'll send it to you. _________________ HTH - Steve H. |
|
|
karthickiw
Joined: 09 Aug 2007 Posts: 82 Location: TN, India
|
reading data from serial port.. |
Posted: Fri Mar 26, 2010 5:45 am |
|
|
Hi,
use mscomm object to revived the data from serial port.
1) first set band rate and port number in mscomm1 properties window.
2) Put timer1 object in to a form1 and set timer interval is 100 in properties window.
3) Put text box object in a form1.
4) double click the timer1 object, its go to code window.
5) put following code in to a code window
Quote: | Private Sub Timer1_Timer()
text1.text = MSComm1.Input
End Sub |
Karthic |
|
|
kalman
Joined: 19 Jan 2010 Posts: 4
|
|
Posted: Fri Mar 26, 2010 7:54 pm |
|
|
how about the pic part |
|
|
karthickiw
Joined: 09 Aug 2007 Posts: 82 Location: TN, India
|
|
Posted: Fri Mar 26, 2010 10:25 pm |
|
|
just use printf statement.
example
Quote: | printf("Hello CCS Friends"); |
Karthic |
|
|
|