From: Nandish on 16 May 2010 01:10 Hello.. I am working on a project in which i suppose to show temperature value on LCD. I am using 8051 microcontroller and interfaced LCD with it. As the temperature value is numeric so i am using 'fwrite' to transmit data. But to test serial communication first i used to tranfer string with the help of 'fprintf' command. I want to transmit three character, so i used ex. ' fprintf (S,'Pal') ' , but when i am running it shows only first character i.e. 'P' only insted of 'Pal' on LCD. I checked 8051 coding and it is working well, when i am transmiting data to it using hyper terminal, it shows three character (or numeric) data on LCD. So where is the problem? Thank you.
From: Nandish on 17 May 2010 02:23 "Nandish " <nandishpatel.24(a)gmail.com> wrote in message <hsnund$6nv$1(a)fred.mathworks.com>... > Hello.. > > I am working on a project in which i suppose to show temperature value on LCD. I am using 8051 microcontroller and interfaced LCD with it. > > As the temperature value is numeric so i am using 'fwrite' to transmit data. But to test serial communication first i used to tranfer string with the help of 'fprintf' command. I want to transmit three character, so i used ex. ' fprintf (S,'Pal') ' , but when i am running it shows only first character i.e. 'P' only insted of 'Pal' on LCD. > > I checked 8051 coding and it is working well, when i am transmiting data to it using hyper terminal, it shows three character (or numeric) data on LCD. > > So where is the problem? > Thank you. Please let me know the answer...cant anyone?
From: Walter Roberson on 17 May 2010 10:24 Nandish wrote: > "Nandish " <nandishpatel.24(a)gmail.com> wrote in message > <hsnund$6nv$1(a)fred.mathworks.com>... >> Hello.. >> >> I am working on a project in which i suppose to show temperature >> value on LCD. I am using 8051 microcontroller and interfaced LCD with it. >> >> As the temperature value is numeric so i am using 'fwrite' to >> transmit data. But to test serial communication first i used to >> tranfer string with the help of 'fprintf' command. I want to transmit >> three character, so i used ex. ' fprintf (S,'Pal') ' , but when i am >> running it shows only first character i.e. 'P' only insted of 'Pal' on >> LCD. >> >> I checked 8051 coding and it is working well, when i am transmiting >> data to it using hyper terminal, it shows three character (or numeric) >> data on LCD. >> >> So where is the problem? >> Thank you. > > > Please let me know the answer...cant anyone? Sounds like it might possibly be a hardware flow control issue. Could you use a lower transmission rate?
From: Frank W. on 18 May 2010 02:21 Walter Roberson <roberson(a)hushmail.com> wrote in message <okcIn.17326$mi.8282(a)newsfe01.iad>... > Nandish wrote: > > "Nandish " <nandishpatel.24(a)gmail.com> wrote in message > > <hsnund$6nv$1(a)fred.mathworks.com>... > >> Hello.. > >> > >> I am working on a project in which i suppose to show temperature > >> value on LCD. I am using 8051 microcontroller and interfaced LCD with it. > >> > >> As the temperature value is numeric so i am using 'fwrite' to > >> transmit data. But to test serial communication first i used to > >> tranfer string with the help of 'fprintf' command. I want to transmit > >> three character, so i used ex. ' fprintf (S,'Pal') ' , but when i am > >> running it shows only first character i.e. 'P' only insted of 'Pal' on > >> LCD. > >> > >> I checked 8051 coding and it is working well, when i am transmiting > >> data to it using hyper terminal, it shows three character (or numeric) > >> data on LCD. > >> > >> So where is the problem? > >> Thank you. > > > > > > Please let me know the answer...cant anyone? > > Sounds like it might possibly be a hardware flow control issue. Could > you use a lower transmission rate? Hello, I'd also guess that the problem is transmission rate related. From ' I checked 8051 coding and it is working well...' I do not know if you are talking about the serial port (all characters are recieved by the 8051) or if you also mean displaying the characters on the LCD. Concerning write operations LCDs are quite slow. If you send characters by a terminal program and type as slow as I do there is plenty of time between two characters. So reception by the 8051, processing and writing to the LCD is done before the next character is received. When you use the fprint function it will send the whole string. I guess the LCD is still busy writing the first character when the next is arriving. I would try to send each character seperately from Matlab and wait between subsequent transmissions to find out if this is really the problem. If so you'd need to buffer the information for the LCD and send the characters from this buffer to the LCD at an appropiate rate. Regards Frank
From: Nandish on 19 May 2010 06:11 "Frank W." <yohansan(a)web.de> wrote in message <hstbkj$n73$1(a)fred.mathworks.com>... > Walter Roberson <roberson(a)hushmail.com> wrote in message <okcIn.17326$mi.8282(a)newsfe01.iad>... > > Nandish wrote: > > > "Nandish " <nandishpatel.24(a)gmail.com> wrote in message > > > <hsnund$6nv$1(a)fred.mathworks.com>... > > >> Hello.. > > >> > > >> I am working on a project in which i suppose to show temperature > > >> value on LCD. I am using 8051 microcontroller and interfaced LCD with it. > > >> > > >> As the temperature value is numeric so i am using 'fwrite' to > > >> transmit data. But to test serial communication first i used to > > >> tranfer string with the help of 'fprintf' command. I want to transmit > > >> three character, so i used ex. ' fprintf (S,'Pal') ' , but when i am > > >> running it shows only first character i.e. 'P' only insted of 'Pal' on > > >> LCD. > > >> > > >> I checked 8051 coding and it is working well, when i am transmiting > > >> data to it using hyper terminal, it shows three character (or numeric) > > >> data on LCD. > > >> > > >> So where is the problem? > > >> Thank you. > > > > > > > > > Please let me know the answer...cant anyone? > > > > Sounds like it might possibly be a hardware flow control issue. Could > > you use a lower transmission rate? > > Hello, > I'd also guess that the problem is transmission rate related. From ' I checked 8051 coding and it is working well...' I do not know if you are talking about the serial port (all characters are recieved by the 8051) or if you also mean displaying the characters on the LCD. Concerning write operations LCDs are quite slow. If you send characters by a terminal program and type as slow as I do there is plenty of time between two characters. So reception by the 8051, processing and writing to the LCD is done before the next character is received. When you use the fprint function it will send the whole string. I guess the LCD is still busy writing the first character when the next is arriving. I would try to send each character seperately from Matlab and wait between subsequent transmissions to find out if this is really the problem. If so you'd need to buffer the information for the LCD and > send the characters from this buffer to the LCD at an appropiate rate. > Regards > Frank I did it but i am in doubt, is this correct way.. As i describe the problem, for the solution of the same i am transmitting each character seperatly like... e.g.i want to transmit 'PAL' to LCD screen. S = Serial('COM1'); fopen(S); fprintf(S,'P') fclose(S); fopen(S); fprintf(S,'A') fclose(S); fopen(S); fprintf(S,'L') fclose(S); delete(S) instead of S = Serial('COM1'); fopen(S); fprintf(S,'PAL') fclose(S) delete(S)
|
Next
|
Last
Pages: 1 2 Prev: problem with num2str Next: neural network training on quad core machine |