karim Posted June 11, 2007 Report Share Posted June 11, 2007 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) Quote Link to comment
Rolf Kalbermatter Posted June 12, 2007 Report Share Posted June 12, 2007 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 Quote Link to comment
Eugen Graf Posted June 12, 2007 Report Share Posted June 12, 2007 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 Quote Link to comment
Sherif Posted June 18, 2007 Report Share Posted June 18, 2007 QUOTE(karim @ Jun 11 2007, 12:53 AM) 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) 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(",) Quote Link to comment
karim Posted June 24, 2007 Author Report Share Posted June 24, 2007 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 Quote Link to comment
Sherif Posted June 24, 2007 Report Share Posted June 24, 2007 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 (",) Quote Link to comment
Sherif Posted June 24, 2007 Report Share Posted June 24, 2007 To illustrate More see the attached JPG file ... also if you can't find the blocks tell me to send it to you Regards sherif farouk (",) Quote Link to comment
karim Posted June 26, 2007 Author Report Share Posted June 26, 2007 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 Quote Link to comment
Eugen Graf Posted June 26, 2007 Report Share Posted June 26, 2007 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 Quote Link to comment
Sherif Posted June 27, 2007 Report Share Posted June 27, 2007 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 (",) ----------------- Quote Link to comment
Sherif Posted June 27, 2007 Report Share Posted June 27, 2007 AA Karim Attached to this Reply the Modified code you want ... Regards, Sherif Farouk (",) " Help someone when he is in trouble and he will remember you when he is in trouble again" => Best wishes Quote Link to comment
Rolf Kalbermatter Posted June 28, 2007 Report Share Posted June 28, 2007 QUOTE(Sherif @ Jun 26 2007, 10:05 AM) Sherif Farouk (",)" Help someone when he is in trouble and he will remember you when he is in trouble again" Well that is so true for some people! :-) Rolf Kalbermatter Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.