I recently purchased an 320x240 glcd with an S1D13700 controller.
I've been trying for some time now to get it working, but with no succes.
I've tried some of the examples from this forum but stil do not get anything on screen.
Some help would be apreciated.
Datasheet GLCD:
http://www.egochina.net.cn/e-shop/ebay/ ... JHD639.pdf
I used the CN1 pin to connect it to my PIC18F4550 on ports B and D
I'm sure i connected everything right. Altough the contrast one is a bit difficult to understand. As now i have connected VO to an 10k and an 10K variable resistor wich is connected to the lcd supllied VEE.
The program used is:
Code: Select all
Device = 18F4550
Clock = 48
Config
PLLDIV = 5,
CPUDIV = OSC1_PLL2,
USBDIV = 2,
FOSC = HSPLL_HS,
VREGEN = ON
//====user settings to override default module options ====
#option GLCD_MODEL = S1D13700 //Controller mounted on display
#option GLCD_MODEL = 6800 //hardware default M6800 Indirect CNF<3:2>
#option GLCD_DATA = PORTD // Data port - only 8 bit port
#option GLCD_RES = PORTB.5 // reset pin
#option GLCD_EN = PORTB.4 // EN pin - 6800 mode
//#option GLCD_RD = PORTD.5 // RD pin - 8080 mode
#option GLCD_RW = PORTB.3 // RW pin - 6800 mode
//#option GLCD_WR = PORTD.6 // WR pin - 8080 mode
#option GLCD_A0 = PORTB.2 // A0 pin
#option GLCD_CS = PORTB.0 // chip select
#option GLCD_TCR = $2C // TC/R setting to fix flicker problem on display override system instruction ($48)
#option GLCD_ASPECT_RATIO = 100 // aspect ratio, smaller number will squeeze y For GLCD circles And Boxes
#option GLCD_INIT_DELAY = 100 // initialisation delay (ms)
Include "glcd.bas"
Include "arial.bas"
Include "graphics.bas"
Include "utils.bas"
Dim cindex As Byte
//================Main Program ===================
//OSCCON.6 = 1 // Set Internal OSC to 8Mhz
//OSCCON.5 = 1 // "
//OSCCON.4 = 1 // "
OSCTUNE.6 = 0 // Turn off/on PLL
SetAllDigital
// temp - LED 5 flashes before writting to screen
High(PORTA.0)
For cindex=1 To 5
Toggle(PORTA.0)
DelayMS(100)
Toggle(PORTA.0)
DelayMS(100)
Next
// clear screen and set font - driver defaults
// to layer 1 at startup - according to S1D13700 help
// file, bsClear provides fastest font rendering...
Cls(1)
SetFont(Arial)
Brush.Style = bsClear
// display some text...
WriteAt(0,0,"Hello World")
WriteAt(50,50,"Hello World")
I hope you guys can help me out!