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 support@ccsinfo.com

Working driver for Sed1520

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



Joined: 21 Feb 2008
Posts: 31

View user's profile Send private message

Working driver for Sed1520
PostPosted: Thu Feb 21, 2008 2:53 pm     Reply with quote

Could anyone share a working driver for SED1520 LCD which works with a glcd.c from ccs library? The one posted a year or so ago does not seem to be working.
thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Feb 21, 2008 3:10 pm     Reply with quote

It's not working because it was posted with HTML enabled, and the
code is all screwed up. Example:
Quote:
if (x<61>8)y-=((Data-184)*8);


However, I think the correct code is posted on another website:
http://www.picmodules.com/acatalog/Free_Downloads.html
Look for the place where it says you can download this code:
Quote:
CCS Example Code
SED1520 Graphical LCD Example



Edited to add:

I will email Darren with instructions on how to disable HTML by
default for all users. There is an option to do it in the phpbb
"User and Forum basic settings" panel:
http://www.phpbb.com/support/documentation/2.0/#section3_2_2_4


Last edited by PCM programmer on Thu Feb 21, 2008 6:37 pm; edited 1 time in total
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

PostPosted: Thu Feb 21, 2008 3:20 pm     Reply with quote

This is a very simple interface so you should not be having any issues.
Some graphic LCD's have dual SED1520's and there can be quirks as to column addressing left side controller right side controller etc. Provide more info as to the LCD you have and whether you have downloaded and read the SED1520 data sheet.
Below is the cmd and data calls to a dual SED1520 122x32 LCD

Code:
write_cmd(int8 cmd,int8 sed_mode)
{

   output_low(PIN_cmd_data); // A0=0 cmd
   if (sed_mode==BOTH || sed_mode==LEFT) output_low(PIN_SED_clk1);
   if (sed_mode==BOTH || sed_mode==RIGHT) output_low(PIN_SED_clk2);
   write_port(cmd);



   delay_us(2);
   if (sed_mode==BOTH || sed_mode==LEFT) output_high(PIN_SED_clk1); // clkin data d0..d7
   if (sed_mode==BOTH || sed_mode==RIGHT)output_high(PIN_SED_clk2);
   delay_us(2);
   if (sed_mode==BOTH || sed_mode==LEFT)output_low(PIN_SED_clk1);
   if (sed_mode==BOTH || sed_mode==RIGHT)output_low(PIN_SED_clk2);

}


write_data(int8 page,int8 col,int8 data)
{
int8 seg,side;

   // seg is basically the same as col
   /// page is the 8 bit high line on screen line 0 1 2 3
   side=LEFT;
   seg=60-col;
   if (col>60) {
                side=RIGHT;
                seg=121-col;
   }


   page=0b10111000+page; // page command now calculated
   //// send the page address command
   output_low(PIN_cmd_data); // A0=0 cmd
   if (side==LEFT) output_low(PIN_SED_clk1);
   if (side==RIGHT) output_low(PIN_SED_clk2);
   write_port(page);
   delay_us(2);
   if (side==LEFT)output_high(PIN_SED_clk1);  //clk in page
   if (side==RIGHT)output_high(PIN_SED_clk2);
   delay_us(2);
   /// send the segment address command
   if (side==LEFT) output_low(PIN_SED_clk1);
   if (side==RIGHT) output_low(PIN_SED_clk2);
   write_port(seg & 0x7F);
   delay_us(2);
   if (side==LEFT) output_high(PIN_SED_clk1); // clkin seg
   if (side==RIGHT)output_high(PIN_SED_clk2);
   delay_us(2);

   if (side==LEFT)output_low(PIN_SED_clk1);
   if (side==RIGHT)output_low(PIN_SED_clk2);
   //// post the data to RAM address pg,seg

   output_high(PIN_cmd_data); //A0=1 data
   write_port(data);
   delay_us(2);
   if (side==LEFT) output_high(PIN_SED_clk1); // clkin seg
   if (side==RIGHT)output_high(PIN_SED_clk2);
   delay_us(2);
   if (side==LEFT)output_low(PIN_SED_clk1);
   if (side==RIGHT)output_low(PIN_SED_clk2);
}
Synthex



Joined: 07 Oct 2009
Posts: 5

View user's profile Send private message

122x32 (SED1520 or NJU6450A) GLCD Driver
PostPosted: Wed Oct 07, 2009 2:36 am     Reply with quote

Hello,

Could anyone share a working driver for 122x32 SED1520 or NJU6450A GLCD ?
Thanks a lot !
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