- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Sorry for again post but i think image zip file was not uploaded so i will explain via text.
I was wrote simple below code in main function.
LCD_Start();
LCD_ClearDisplay();
LCD_Position(0,0);
LCD_PrintString("ABCDEFGHIJKLMNPQRS");
and output in LCD is ABCDEFGHIJKLNPQRS
but when I wrote code in main function with adding 'O' character means
LCD_Start();
LCD_ClearDisplay();
LCD_Position(0,0);
LCD_PrintString("ABCDEFGHIJKLMNOPQRS");
then output was ABCDEFGHIJKLMNO . and my controller does not work any more
I don't know why O character enemy with me
Please any one can give a solution for that.
Solved! Go to Solution.
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The CharLCD component does not wrap at the endge of the display. Internally each line consists of more than just the 16 bytes needed for one line. The write function just writes one character after the other, but after the 16th they just will not be displayed. Only when you reach the limit of where the first line ends in memory, the characters are displayed again (in the second line then).
You need to handle that wrapping in your code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But i am using 20x4 Lcd not a 16x2 and Lcd part no is JHD 204A
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Even I wrote "Config. Mode", Output is "Config. Mo".
In that condition only 11 character but facing same problem and if I remove 'O' character and string is long not any issues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try using a for loop and write it character at a time with
LCD_PutChar() and LCD_Char_Position(). Terminate loop
when you detect NULL character, string termination.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was already test it but same issue.
I was identify more hint about this issue. Whenever I was write ‘o’ or ‘O’ character at & after 8 position of first LCD line this problem is create and next c code is not execute.
1) Input -> LCD_PrintString("ABCODEFGHIJKLMNPQRST");
Output-> ABCODEFGHIJKLMNPQRST
2) Input -> LCD_PrintString("ABCDEFOGHIJKLMNPQRST");
Output-> ABCDEFOGHIJKLMNPQRST
3) Input -> LCD_PrintString("ABCDEFGOHIJKLMNPQRST");
Output-> ABCDEFGO
4) Input -> LCD_PrintString("ABCDEFGHIJKLMNOPQRST");
Output-> ABCDEFGHIJKLMNO
I am changing just position of character 'O'
You can also check attached files. I was check this LCD with AT89C52 microcontroller and it's working fine. so i thing it's problem with PSoC LCD component.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How about print multiple short strings. ie print "ABCDEF", then print "GHIJKL" then print "MNOPQ". add a little bit of delay between each print string.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
same problem.
I was write code without LCD component just directly place Digital Output pin and it working ok. but the problem is how i can check busy flag from LCD beacuse i was use Digital Output pin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes you can, but you need to copy the source file and modify it yourself, you may also need to modify the I/O mode with software I did that for PSoC3 and Psoc5 but do not have the file on hand. Should be able to dig it out next week.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry my mistake, the modifiction is to read the RAM content back from the LCD memeory which is not supplied by Cypress.
For checking the status of the LCD, you can use LCD_IsReady(). you can check the source code from the generated file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For what its worth I fired a 2 x 16 up on the -030 board and it works
fine. The "O" does not affect any writes.
LCD_Start( );
LCD_Position( 0, 0 );
LCD_PrintString( " ABCDEFGHIJKLMOPQRST" );
Look in memory at your string. see if the ordinal value of "O" is
correct.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This looks like a hardware problem. Can you try the display with another controller (e.g. an Arduino)? Do the same with the connectors you use to connect it to the PSoC DevKit.
If you look at the discussion pavloven linked in, the behavior was the same, and the culprit was that the unused opins of the LCD were not connected to ground.
The LCD component is one of the most used ones I think, and so its probably nearly bug-free 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank to all
It's my hardware connection problem so sorry for that
It's work correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad you solve the problem, but you mentioned that it works if you drive it ditectly without using the LCD component, So what is the issue, so other people would check for that if they comes with the same problem as yours.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was simply place Digital Bidirection port for data(D7-D4) with resistive pullup & RS,R/W,E Digital Output with resistive pullup. I wrote the code using delay and it's wroking correctly. But when i was use BusyFlag of LCD Command register means not use delay function, LCD are not showing any thing in screen.
I was debug the code but every time lcd send BusyFlag=0. I know , I have set wrong port configuration but how to change dynamically port configuration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you still have the issue?