Geps
Joined: 05 Jul 2010 Posts: 129
|
SED1335 Driver Issues |
Posted: Thu Dec 16, 2010 6:02 am |
|
|
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. |
|