Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

MSComm Control for RS-232

Status
Not open for further replies.

gg

Junior Member level 3
Junior Member level 3
Joined
Jun 12, 2004
Messages
31
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
349
mscomm1 download

Hi,

I'm using MSComm Control to program my RS-232 serial cable. I want the computer to receive the data from other devices. Hence, i written my code,but there's no data appear on my computer. Can anyone help me with this? My code is like this:

Private Sub Form_Load()
MSComm1.RThreshold = 1
MSComm1.InputLen = 1
MSComm1.CommPort = 3
MSComm1.Settings = "9600,N,8,1"
MSComm1.PortOpen = True
End Sub

Private Sub MSComm1_OnComm()
Dim value As String
If MSComm1.CommEvent = 2 Then
value = MSComm1.Input
Picture1.Print value
End If
End Sub

Private Sub Form_Unload(cancel As Integer)
MSComm1.PortOpen = False
End Sub
 

mscomm control

Hello!

Do you have COM3? Did you test if your COM port is working with any terminal program?

Regards!
 

mscomm rs232

COM1 and COM2 appear to be error. Only COM3 can be used, maybe it's because im using laptop i guess.

I have debug my program with VB. The program won't work. I only used the RD pin to receive data from my power source. And i give around +3.5V to get a binary data 1 in my interface. It turn out no output at my interface. Do i have to use other pin too? Or maybe there's something wrong with my code?

PLEASE HELP ME!!! Thanks!!!
 

mscomm serial port

Hi, for the com port on PC's goto a good html page.
@+
 

mscomm control rs232

Hello!

The best way would be if you have any osciloscope.

First try to transmit something on output and than you will see if there is anything hapening.

Other thing is to check Rx and Tx with conection of pin 2 and 3 on DB9 conector. With that you make loop test and on input you will recive same things wich you will send on output. Try to do that with some kind of terminal program.

Best regards!
 

comunicazione seriale mscomm

Hi,
tjalps said:
Do you have COM3? Did you test if your COM port is working with any terminal program?

You should first verify the above points.. verify if you are receiving any data on hyperterminal or any other serial terminal then go for vb program.

There are few good guidlines I have red some-where , which should be followed when working on serial communications..

:idea: Always build your project in steps.
Start with small, manageable pieces of code, (that deal with serial communication) and test them, one individually.
Add more and more small pieces, testing them each time, as you go.
Never write a large portion of code that works with serial communication without testing its smallest workable pieces first.

:idea: Pay attention to wiring.
Take extra time to study and verify serial communication wiring diagrams. A mistake in wiring can cause strange problems in communication, or no communication at all. Make sure to connect the ground pins (Vss) between the devices that are communicating serially.

:idea:Verify port setting on the PC .
Unmatched settings on the sender and receiver side will cause garbled data transfers or no data transfers.
If the serial data received is unreadable, it is most likely caused by a baud rate setting error, or a polarity error.
 

mscomm source code

A lot of informations, examples about MSCom you can find
at

https://www.epemag.com

article Interface and VB examples from zero ground up 8)
 

download mscomm1

Firstly, I think you should find the funny thing. Is your cable right? Checking it first!

Second, checking your Serial port in PC. By use a cable connect COM1 and COM2. Then use HyperTermial to test tranfer.

Then, the best way you should use Osiloscope to see the signal from device and PC.

Good luck! :D
 

rs232 mscomm

Mgajo, could you pls upload some articles because I couldn't find anything at the EPE site. Or post a direct link.

Regards
Mozfet
 

download mscomm

go to www.epemag.com website,then you can find epe ftp link,that have code for their project.
 

mscomm code

Hi

In **broken link removed** you can get the files used in projects...
 

mscomm control pin 3

did you checked the cable
the RX and TX should be vis versa with respect to the PC
and if you are using a male female cable you should take care how you make your connections
 

vb mscomm receiving problem

hello,

I know the Visual Basic have source code to download(MSCOMM for RS232). But i fail to find it. Can show me the link?
 

rs232 vb code mscomm control

Hi,
MSCOMM componenent has a property MSCOMM.RT... You must set (assign by 1) to PC generating an event when it receive data from COM port. If the property is clear, the Oncomm event does not work.
:arrow: According to my experience, all property should be assigned in design time. I only used 2 method "Input" and "Output" to receive and send data from/to COM port.
Good luck to you.
 

rs-232 pin control from pc

Try to set a breakpoint on the OnCommEvent and check if the event is generated and if its code corresponds to the EvReceive (you can at least remove the event number control)

Hope it can helps, bye wn.
 

mscomm test

Start with polling using a timer-routine by testing the property 'InBufferCount' to see if characters are received. Read with 'Input'. - I had problems with the Comm-event.
 

mscomm, on evreceive

the way I always use is using the hyperterminal program to test the COM port first. make sure the COM is work property

benri22
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top