Searching \ for 'VB6 Code - to - RS-232 - to - PIC' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=rs%2D232
Search entire site for: 'VB6 Code - to - RS-232 - to - PIC'.

Truncated match.
PICList Thread
'VB6 Code - to - RS-232 - to - PIC'
1999\04\24@102956 by David Covick

flavicon
face
I am new to Visual Basic and wondered if anyone would share the VB code to
communicate with a PIC.
I don't have a clue as to where to begin.  Possibly with the MScomm
statement?

If the code is too large it could be e-mailed directly to me.

Thanks in advance.

David
spam_OUTdacTakeThisOuTspamwest.net

1999\04\24@120009 by DAZLOGAN

picon face
In VB6, follow these steps:

Put a comm control on your form, call it say "mycomm"

In the form load event, open the comm port by doing the following:

sub form_load()
       mycomm.portopen=true
end sub

to send something via RS232 in VB type:

mycomm.output="whatever you want to send"


whatever the PIC sends to the PC port, VB automatically collects it and you
can view what has been selected by say debugging the contents of the port
thus:

debug.print mycomm.input

1999\04\24@124203 by g.daniel.invent.design

flavicon
face
David Covick wrote:
>
> I am new to Visual Basic and wondered if anyone would share the VB code to
> communicate with a PIC.
> I don't have a clue as to where to begin.  Possibly with the MScomm
> statement?
>
> If the code is too large it could be e-mailed directly to me.
>
> Thanks in advance.
>
> David
> .....dacKILLspamspam@spam@west.net

David, You are on the right track.
you can actually place multiple MSComm onto a form.

on the PIC end, the easy way is to use a MAX202 chip to generate the
correct levels.

Microchip have application notes for software asynchronous code(bit
banged), otherwise you can use a 'C63 or 'C73 or upwards processor with
inbuit hardware UART

As far as the VB6 goes, just open up some text windows onto your form
for debugging and you will be able to use various comm events to get it
going. Just type MSComm1.(dot) and scroll through the list to find out
the options.

Below are some starting code fragments:

With MSComm1
.InputMode = comInputModeText
.CommPort = 1
.Handshaking = comNone
.Settings = "56000,n,8,1"
.ParityReplace = "_"
.InBufferSize = 512
.InputLen = 40
.RThreshold = 80
.PortOpen = True
End With


Do While MSComm1.InBufferCount > 1
RawDataIn$ = RawDataIn$ + MSComm1.Input:            ' buffer data
Loop

With MSComm1
   Select Case .CommEvent
       Case comEventBreak
           Label2.Caption = "Break": EC = EC + 1: ErrorCount.Caption =
EC
       Case comEventFrame
           Label2.Caption = "Frame": EC = EC + 1: ErrorCount.Caption =
EC
       Case comEventOverrun
           Label2.Caption = "Overrun": EC = EC + 1: ErrorCount.Caption
= EC
       Case comEventRxOver
           Label2.Caption = "RxOver": EC = EC + 1: ErrorCount.Caption =
EC
       Case comEventRxParity
           Label15.Caption = "RxParity": EC = EC + 1:
ErrorCount.Caption = EC
       Case comEventTxFull
           Label2.Caption = "TxFull": EC = EC + 1: ErrorCount.Caption =
EC
       Case comEventDCB
           Label2.Caption = "DCB": EC = EC + 1: ErrorCount.Caption = EC
       Case Else
            Label2.Caption = .CommEvent: ErrorCount.Caption = EC
   End Select
End With

regards,
Graham Daniel.

--
Steam engines may be out of fashion, but when you consider that an
internal combustion engine would require recovery of waste heat by
transfer just before top dead centre then fashion becomes rather
redundant, USE STRATIFIED HEAT EXCHANGERS ! and external combustion.

You heard it first from: Graham Daniel, managing director of Electronic
Product Enhancements.
Phone NZ 04 387 4347, Fax NZ 04 3874348, Cellular NZ 021 954 196.

1999\04\25@105012 by David Covick

flavicon
face
Thanks Darren and Graham for your help on the code!
Look out, I'm dangerous now  :)

David

____________________________________

David Covick wrote:
{Quote hidden}

1999\04\26@120940 by WF AUTOMACAO

flavicon
face
David Covick wrote:
>
> I am new to Visual Basic and wondered if anyone would share the VB code to
> communicate with a PIC.
> I don't have a clue as to where to begin.  Possibly with the MScomm
> statement?
>
> If the code is too large it could be e-mailed directly to me.
>
> Thanks in advance.
>
> David
> .....dacKILLspamspam.....west.net

http://www.mashallsoft.com

U$80 for registered version,,,

Non registered version runs only 20 minutes :(

1999\04\26@200117 by Ricardo Barbosa

flavicon
face
Ola
Que bom encontrar alguem para escrever em nosso idioma.
Ha algum tempo existia o PICLIST que era uma unica mensagem e esta continha
v‡rios e-mails. Agora assinei este forum e recebo 100 mensagens por dia.
Sabe se Ž possivel configurar alguma coisa para receber uma mensagem
contendo todos os
e-mails.
Obrigado pela atencao
Ricardo
-----Mensagem original-----
De: WF AUTOMACAO <EraseMEwfspam_OUTspamTakeThisOuTAMBIENTE.COM.BR>
Para: PICLISTspamspam_OUTMITVMA.MIT.EDU <@spam@PICLISTKILLspamspamMITVMA.MIT.EDU>
Data: Segunda-feira, 26 de Abril de 1999 13:12
Assunto: Re: VB6 Code - to - RS-232 - to - PIC


>David Covick wrote:
>>
>> I am new to Visual Basic and wondered if anyone would share the VB code
to
{Quote hidden}

1999\04\27@011326 by Thierry V

flavicon
face
>
> http://www.mashallsoft.com
>
> U$80 for registered version,,,
>
> Non registered version runs only 20 minutes :(
>
Little typo,
URL is http://www.marshallsoft.com

1999\04\27@120606 by WF AUTOMACAO

flavicon
face
Thierry V wrote:
>
> >
> > http://www.mashallsoft.com
> >
> > U$80 for registered version,,,
> >
> > Non registered version runs only 20 minutes :(
> >
> Little typo,
> URL is http://www.marshallsoft.com

Ops! Sorry! ;(

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...