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

SED1335 Driver Issues

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



Joined: 05 Jul 2010
Posts: 129

View user's profile Send private message

SED1335 Driver Issues
PostPosted: Thu Dec 16, 2010 6:02 am     Reply with quote

Hi,

I've been working on this for over a day now and I just can't seem to work out where I'm going wrong.

PIC: 18F4520
Screen: ERM320240SBS-2T
Controller: SED1335 in 8080 mode (confirmed by measuring voltage on the mode select pins)
Compiler: 4.116

My main code:

Code:

#include <18F4520.h>
#fuses NOWDT, INTRC_IO, NOBROWNOUT, PUT, NOMCLR, NOLVP
#define SYSCLK   8000000
#use delay(clock=SYSCLK)
#include <SED1335.c>

void main() {   
   delay_ms(3);
   glcd_init(ON);
while(TRUE){
   glcd_fillScreen(ON);
   delay_ms(1000);
   glcd_fillScreen(OFF);
   delay_ms(1000);
   }
}


The pin definitions have remained the same as those defined by CCS in the driver:

Code:
#ifndef GLCD_WIDTH
#define GLCD_WIDTH         320
#endif

#ifndef GLCD_HEIGHT
#define GLCD_HEIGHT        240
#endif

#ifndef GLCD_CHAR_WIDTH
#define GLCD_CHAR_WIDTH    8
#endif

#ifndef GLCD_CHAR_HEIGHT
#define GLCD_CHAR_HEIGHT   8
#endif

#ifndef GLCD_RST
#define GLCD_RST           PIN_C3
#endif

#ifndef GLCD_RD
#define GLCD_RD            PIN_B5
#endif

#ifndef GLCD_WR
#define GLCD_WR            PIN_B1
#endif

#ifndef GLCD_CS
#define GLCD_CS            PIN_B2
#endif

#ifndef GLCD_A0
#define GLCD_A0            PIN_B4
#endif


Physical connections:
The screen is connected to the breadboard via a 100mm ribbon cable.
A 20k pot is used for contrast and I can vary it successfully. (Constrast set correctly)
The screen lights up when powered up (Pins wired correctly)
When the init code isn't called the screen displays random dots. At the moment however the screen is just blank and nothing happens.

Any ideas greatly appreciated,

EDIT: For those not familiar with the driver, the data pins are connected to port D.
Sergeant82d



Joined: 01 Nov 2009
Posts: 55
Location: Central Oklahoma

View user's profile Send private message

PostPosted: Sat Dec 18, 2010 1:21 pm     Reply with quote

I can't say for sure that this will correct your problem, but you may want to take a look at the following thread:

http://www.ccsinfo.com/forum/viewtopic.php?t=40867

HTH.
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