Jump to content

help in serial port


karim

Recommended Posts

QUOTE(karim @ Jun 10 2007, 04:53 PM)

i want to use example for read from serial port ,

but i need known what is the condition for correct reading(from 8051 serial port comm)

I would say the existence of a serial port is one of the most important "conditions". Not really something that is always there nowadays in modern computers.

Honestly, be a bit more specific about what you want to know. What do you want to do? What doesn't work if any and what have you tried so far?

Rolf Kalbermatter

Link to comment

QUOTE(karim @ Jun 10 2007, 11:53 PM)

i want to use example for read from serial port ,

but i need known what is the condition for correct reading(from 8051 serial port comm)

You have to make the same configurations like baud rate, start and stop bits on BOTH sides for right communications over serial ports.

Eugen

Link to comment

QUOTE(karim @ Jun 11 2007, 12:53 AM)

sorry for being late ya Kimo i didn't see your topic

Well Kimo Let me help you in using serial Port

To have a correct reading from your 8051 Serial port you have to do the following

1- read carefully the pin-configuration file of your serial Port to know which pins are used for Transmission and which for receiption

also to know the flow control and other features in the example you want to Use.

2- serial Port is an asynchronous Transmission this mean's that there's no clock thus you have to Specify the start Bit and stop bit

to ensure synchronizm between Transmitter and receiver. you have to adjust the rate of transmission (which is called Baud rate)

in both transmitter and receiver -- two sides connected to the serial Cable --

3- during transmission error may be introduced in digital data transmitted through the Channel. and that's why we use the parity

to detect One bit error.

4- Connect the serial port to your device. If no device is available, perform a loopback test by doing one of the following. Short

pins 2 and 3 on a RS-232 cable or short pin 4 to pin 8 and pin 5 to pin 9 on a RS-485/422 cable. ...

OR---> Generally loopback test is to Short the transmission Pin with Receiption Pin whatever the serial Port you are using.

to perform loopback test Check this link http://www.pjrc.com/tech/8051/board5/loopback.html''>http://www.pjrc.com/tech/8051/board5/loopback.html' target="_blank">http://www.pjrc.com/tech/8051/board5/loopback.html

Hope i could help you ... if you have any problem feel free to ask ...

El masreyeen Ahomaa ;)

Best Regards

Sherif Farouk(",)

Link to comment

QUOTE(karim @ Jun 23 2007, 06:15 PM)

i will use simple example for basic serial port read and write but i want to show the data that read from serial port i need help to show this data as analog signal

So Kimo You mean you want to convert the received signal which is a string read into analog signal right ...??

Here You are what you should do :

1-Use string to Byte array .Vi converter form String Palette

2-then the output of this Vi is connected binary to Digital Waveform.Vi

3-then to to DAC you will find it in the waveform Palette

4-then use analog indicator to display the signal in analog or use it inside your system

That's all... hope it's clear now

for any clearifications send me

Ta7yaa masr ;)

Regards

Sherif Farouk (",)

Link to comment

Dear Shref..

Really thanks alot for your reply..

I want to ask another help from you .I know i'm gonna be heavy but i'm working on a graduation project & my deadline is 1-7,I tried to make your steps but i had some difficulities i didn't work on this program before,I'm sending to you the code i should modify.May you add the part you sent to me to this code.

Kind Regards

Karim

Link to comment

QUOTE(karim @ Jun 25 2007, 11:32 PM)

Dear Shref..

Really thanks alot for your reply..

I want to ask another help from you .I know i'm gonna be heavy but i'm working on a graduation project & my deadline is 1-7,I tried to make your steps but i had some difficulities i didn't work on this program before,I'm sending to you the code i should modify.May you add the part you sent to me to this code.

Kind Regards

Karim

I saw it in LV Example Finder. Sorry, but I think you have to take some time to understand how serial interface in LV works. What is Config, Open, Read and Write VISA and how to get numbers (values) from string or stream.

Eugen

Link to comment

QUOTE(karim @ Jun 26 2007, 12:32 AM)

Dear Shref..

Really thanks alot for your reply..

I want to ask another help from you .I know i'm gonna be heavy but i'm working on a graduation project & my deadline is 1-7,I tried to make your steps but i had some difficulities i didn't work on this program before,I'm sending to you the code i should modify.May you add the part you sent to me to this code.

Kind Regards

Karim

Well Kimo i don't know what to say, me too i have to deleiver my Project in 1-7 but in which college you are in .... ?? !!

I don't think LABVIEW is difficult You can simply search on the Name of the blocks you want especially if you know their Palettes and they are included in my reply, [bas el zaher Enak Mesh Taye2 el LABVIEW aslan]

Anyway i'll do it for you but i think you should at least Understand How the serial Port interfaces with LABVIEW. OK KIMO

Promise to read [3ashan Masla7tak walahi ana mesh far2aa ma3ayaa ana aslan el Code 3andi mesh moushkela]

Don't forget to tell me your college ....

Regards

Sherif Farouk (",)

-----------------

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.