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.

RS 232 Serial Communication

Status
Not open for further replies.

cwt

Member level 5
Member level 5
Joined
May 26, 2004
Messages
80
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
918
Hi..i currently working on a final semester project known as Programmable LED Dot Matrix Display System. I am going to use serial communication to interface with my circuitry. My choice is to use RS 232.

How am i going to communicate with the serial port behind my computer??i prefer to use 9-pin serial port.

Please help... :(
 

The windows API have all the functions you need to control the serial port. It will be helpfull to tell us which kind of programming language you use. Because it exist a lot of components, to access the serial port more easily.
But the first step will be the windows API!
 

Window API? How to find that? I am sorry. This is the first time i do the interfacing stuffs. :lol:

I would like to use visual basic 6.0 to communicate with the port. So is there any better programming language to be suggested?
 

I think you can use activeX object: MSCOMM to tranceiver with RS232
 

I have found that the easiest way to debug a serial port application is to use HyperTerminal. You can check out the basic communication with your microcontroller before moving on to higher level sw like visual basic. HyperTerminal comes for free with every wondows computer 8O
 

Hi,

The best source for those who want to learn RS232 communication and serial port interfacing is beyondlogic.org.

www.beyondlogic.org/serial/serial.htm

you can find solution of your problem there.
 

Wow..so many sources of information!Thanks guyz!

Any of you have a sample program that test the 9pin serial port?

By the way, how you know whether the serial port sent out the correct bits? How can i troubleshoot that issue?
 

For a simple gui program, with not to much data throughput and processing or critical timing Visual Basic is fine! For a beginner it's easier to work with!

Antharax
 

Thanks Antharax for the advice...
Now i feel so motivated to do the project..
Thanks alot!!!
 

If you search for Serial Port Visual Basic on the internet, you can find allot of examples

eg: https://www.ontrak.net/visual.htm

And use duncan94022 's advice about using hyperterminal for debugging!

Antharax
 

Hai,

u can use mscomm in vb r VC++

in msdn cd u got the example file.

its very easy.
 

Pls ref this book "serial port complete",you also download this book from edonkey.
 

About mscomm...i did heard before of that.
Actually what is it?Is it part of the VB?So...if i use VB to program my serial port..will i be using mscomm??
Oh my goodness..i need to complete the interfacing stuff on next week..hope i can get more help from here...
Thankx you all!!
 

Just browsing this forum, I found this topic on RS232 and Visual Basic.

Here goes a small software I did to interfase a DSP through the serial port. Check the subroutines and you will find how to communicate, send and receive characters.

You can try this easily: Get a computer with two serial ports (almost all new computers have two). Use a crossed serial cable (Rxd and Txd pins crossed) or just use wire wrap and connect the pins manually. Use your VB interfase connected to one port, and Hyperterminal connected to the second. Whatever you send in both, you should receive in the other one.

Hope it helps,
Mariano
 

Erm...erm...erm...
You mean...i'll transmit data out and receive data in from the same port? This is to check whether am i sending the correct bits, right?
What is hyperterminal?
Thanks you all!!
 

Serial ports come in two flavors DTE and DCE which stand for Data Terminal Equipment and Data Communications Equipmen. To connect a DTE to a DCE you need a normal cable. To connect a DTE to a DTE you need a crossover cable. A PC is a DTE so in order to connect it to another PC (or another port on the same PC) you need to make a special cable as described above.

Hyperterminal is just a 'terminal' program which lets you transmit characters from and to the serial port on the PC.
 

I use this one to peek what PC and target device talking, very useful tool.

h**p://www.hhdsoftware.com/sermon.html
 

If i purchase a normal cable and i interconnect the TxD and RxD pin to test the sending and receiving of bits, will this work even it is not between two comps?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top