CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

COG-LCD Display Issue

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
paclark



Joined: 02 Mar 2004
Posts: 4

View user's profile Send private message

COG-LCD Display Issue
PostPosted: Wed Jul 21, 2004 3:55 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Jul 21, 2004 4:37 pm     Reply with quote

What's the part number of the Varitronix LCD ?
paclark



Joined: 02 Mar 2004
Posts: 4

View user's profile Send private message

PostPosted: Wed Jul 21, 2004 4:56 pm     Reply with quote

The part number is as follows:
COGS-16265S-DP-RC-LV-G

Datasheet is here.
http://solomon.bond.okstate.edu/~paclark/16265S-06.pdf

Thank you,
Patrick
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Wed Jul 21, 2004 5:29 pm     Reply with quote

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

View user's profile Send private message Visit poster's website

PostPosted: Thu Jul 22, 2004 8:26 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group