CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

connect pic to vb

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
kalman



Joined: 19 Jan 2010
Posts: 4

View user's profile Send private message

connect pic to vb
PostPosted: Thu Mar 25, 2010 3:40 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Mar 25, 2010 6:29 pm     Reply with quote

A complete PIC application can be found here. You can search for VB code to talk to a serial port.

http://web.archive.org/web/20040603205840/www.geocities.com/hagtronics/pic_das/index.html

HTH - Steve H.
_________________
HTH - Steve H.
LostInSpace



Joined: 09 Mar 2010
Posts: 13

View user's profile Send private message

PostPosted: Thu Mar 25, 2010 6:33 pm     Reply with quote

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

View user's profile Send private message Send e-mail

reading data from serial port..
PostPosted: Fri Mar 26, 2010 5:45 am     Reply with quote

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


Cool Karthic
kalman



Joined: 19 Jan 2010
Posts: 4

View user's profile Send private message

PostPosted: Fri Mar 26, 2010 7:54 pm     Reply with quote

how about the pic part
karthickiw



Joined: 09 Aug 2007
Posts: 82
Location: TN, India

View user's profile Send private message Send e-mail

PostPosted: Fri Mar 26, 2010 10:25 pm     Reply with quote

just use printf statement.

example

Quote:
printf("Hello CCS Friends");


Cool Karthic
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group