View previous topic :: View next topic |
Author |
Message |
paclark
Joined: 02 Mar 2004 Posts: 4
|
COG-LCD Display Issue |
Posted: Wed Jul 21, 2004 3:55 pm |
|
|
I'm using the basic 4-bit LCD write function and for some reason with a COG-LCD any chars after the 10th position are reversed. Anyone seen this? Probably simple but I can't figure it out. I can switch to two other 2x16 displays and they work fine. The LCD is from Varitronix and the controller is a Fuji FC2314AK (I assume HD44780 compliant).
Code: |
//******************************************************************************
void LCD_SetPosition ( unsigned int xVar )
{
LCD_SetData ( swap ( xVar ) | 0x08 );
LCD_PulseEnable();
LCD_SetData ( swap ( xVar ) );
LCD_PulseEnable();
}
//******************************************************************************
void LCD_PutChar ( unsigned int xVar )
{
output_high ( LCD_RS );
LCD_SetData ( swap ( xVar ) ); // send high bits
LCD_PulseEnable();
LCD_SetData ( swap ( xVar ) ); // send low bits
LCD_PulseEnable();
output_low ( LCD_RS );
}
//******************************************************************************
MAIN:
LCD_SetPosition ( LINE_1 + 0);
printf (LCD_PutChar, "1234567890abcdefghij");
LCD_SetPosition ( LINE_2 + 0);
printf (LCD_PutChar, "1234567890abcdefghij");
|
Displayed Result:
As you can see I have to enter more than 16 chars before wrap begins.
Any thoughts?
Regards,
Patrick Clark |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Jul 21, 2004 4:37 pm |
|
|
What's the part number of the Varitronix LCD ? |
|
|
paclark
Joined: 02 Mar 2004 Posts: 4
|
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Wed Jul 21, 2004 5:29 pm |
|
|
Looks like they wired the 2nd half of the display backwards!
I hope it was cheap LOL |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Thu Jul 22, 2004 8:26 am |
|
|
Send it back and see how they repond.
Maybe it was a one time mistake.
I know how risky this design stuff is.
I had to order $50 240x64 graphic LCD from hantroncs.
I only had 1 to play with. And our order on 100 had a 13 week lead time.
If anything was wrong,.. I would have been in big trouble. |
|
|
|