Using Visual Basic 6 for PC - microcontroller communication

Status
Not open for further replies.

greekrookie

Newbie level 1
Joined
Feb 20, 2007
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,288
Hello everybody!

I would like your advice on the following subject :

I have connected a PIC microcontroller to a PC through a 9-pin serial port RS-232, using a MAX-232 as a "bridge".

I want to send just one electric signal ( pulse ) from the PC to the microcontroller using the number 3 pin of the RS-232 ( TXD ) and receive again just one signal from the microcontroller through the number 2 pin of the RS-232 ( RXD ).

How can I do that using the MSComm1 control?

Any code samples? any links?

Thank you all in advance.
 

Re: Using Visual Basic 6 for PC - microcontroller communicat

I know only for control
DSR(DB9 pin 6) ,CTS(DB9 pin8)
Output such as DTR(DB9 pin 4) ,RTS(DB9 pin7)

Ex. VB code for off signal
MSComm1.DTREnable = False
MSComm1.RTSEnable = False
or On signal
MSComm1.DTREnable = True
MSComm1.RTSEnable = True

for input signal
Ex. VB code in check signal ,should be use condition .
' CTS(DB9 pin8)
If MSComm1.DSRHolding = True Then
............... your code
End If

DSR(DB9 pin 6)
If MSComm1.CTSHolding = True Then
................. your code
End If

-----------------------------------------------------------
My Favorite PC Interface
**broken link removed**
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…