Home     Contact     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science     RSS     Terms of services     Privacy policy  
   
 Home     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science   

Author Topic: visual basic for pic  (Read 5562 times)

0 Members and 1 Guest are viewing this topic.

tpone

  • Guest
visual basic for pic
« on: March 02, 2008, 10:16:45 AM »
Hallo people!

This is my first post here. I really like your forum and your site. It grooves! 8) 8)

My question is maybe simple for you but i do not have any good experience in programming. I have a thermometer chip connected to a pic. I have test it with a 16X2 display and it works. Now i want to make a program using visual basic and have a small always in from window or resident in tray, that will display the temperature.

Is it something hard? How can these two comunicate? I searched and found the max232 but i do not know how to use the rs232 with visual basic.

Thanx

kostas

  • Guest
Re: visual basic for pic
« Reply #1 on: March 02, 2008, 13:34:08 PM »
I think you must use the control for RS232 of VB that is the MSComm control.

An example to transmit data
Code: [Select]
MSComm1.CommPort = 1
MSComm1.PortOpen = True
A$ = "9600,N,8,1"
MSComm1.Settings = A$
MSComm1.InputLen = 0
A$=Chr("A")
MSComm1.Output = A$


an example to receive data
Code: [Select]
MSComm1.CommPort = 1
MSComm1.PortOpen = True
A$ = "9600,N,8,1"
MSComm1.Settings = A$
MSComm1.InputLen = 10
A$ = MSComm1.InBufferCount
If A$ > 0 Then
   A$ = MSComm1.Input
   Msgbox A$
End If

tpone

  • Guest
Re: visual basic for pic
« Reply #2 on: March 02, 2008, 16:34:43 PM »
Stupid question.
How can i transmit data with max to serial. Is someone here familiar with this? I need some help!

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
Re: visual basic for pic
« Reply #3 on: March 02, 2008, 23:01:12 PM »
Basically, you could also search for some UARTS. This would help you as i think that you have never interface rs232

Using the MAX232 you must send for example 10 bits (if using 8n1), one start bit, 8 data bits and one end bit but this is not something that can so easily be covered,

Search first for UARTs and if does not really fot you then we discuss it further/.


Alex

  • Guest
Re: visual basic for pic
« Reply #4 on: March 02, 2008, 23:11:53 PM »
use a PIC with uart embeded. It will make your life easier.

ScubaCap

  • Guest
Re: visual basic for pic
« Reply #5 on: March 03, 2008, 01:11:55 AM »
communication with rs cannot be easier than using a uart. UART is made for this.

tpone

  • Guest
Re: visual basic for pic
« Reply #6 on: March 04, 2008, 16:26:53 PM »
I took a google around and found that UARTS have 8bit I/O and this does not fit to me. I want serial I/O. Please if someone has something that it works, please! Brainstormmmmmmmmmm  :o :o :o :o :o