Help me with GLCD S1D13700

General discussion relating to the library modules supplied with the compiler

Moderators: David Barker, Jerry Messina

Post Reply
yudi
Posts: 10
Joined: Sat May 23, 2009 3:02 am
Location: Indonesia

Help me with GLCD S1D13700

Post by yudi » Mon Jun 29, 2009 10:59 pm

Dear All,
Can anyone help me with GLCD S1D13700 for LM320240.
I can not write full pixel of the GLCD, because i lost many pixels.

WriteAt(50,50,"1234567890") result "12" and also
WriteAt(55,70,"ABCDEFGHI") result "A".


Hereis the code:
-----------------------------------------------------------------
device = 18F452 // choose your device
clock = 10 // choose your clock

// configure GLCD...
#option GLCD_MODEL = S1D13700 // set model
#option GLCD_A0 = PORTB.2 // A0 pin
#option GLCD_WR = PORTB.1 // WR pin
#option GLCD_RD = PORTB.0 // RD pin
#option GLCD_DATA = PORTD // data port
#option GLCD_CS = PORTB.3 // chip select
#option GLCD_RES = PORTB.5 // reset pin

// import modules...
include "glcd.bas"
include "arial.bas"
include "graphics.bas"

// 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
WriteAt(50,50,"1234567890")
WriteAt(55,70,"ABCDEFGHI")
-----------------------------------------------------------------------

The GLCD has internal clock 10Mhz, I have tried to use
clock 5Mhz, 8Mhz and 10Mhz in my board, but i got the same result.

Link to the manual is:
[http://www.topwaydisplay.com/Pub/Drawin ... 20Dwg).pdf]

I really need help how to solve this problem.
Thanks a lot


[/list]
Last edited by yudi on Mon Sep 14, 2009 10:28 am, edited 1 time in total.

yudi
Posts: 10
Joined: Sat May 23, 2009 3:02 am
Location: Indonesia

Post by yudi » Fri Jul 03, 2009 1:53 pm

Dear All,

I have tried others GLCD with the same type, also with others PIC (18F425 & 18F458). But i still get the same result.

Any help for this problem?

Thanks a lot.

Regard,
Yudi

MattH
Registered User
Registered User
Posts: 51
Joined: Mon Jan 01, 2007 8:03 pm
Location: Allentown, PA

Post by MattH » Sun Jul 05, 2009 1:31 am

Your display is wired in 8080 mode by default (see data sheet).
Therefore you have to include the following lines:

Code: Select all

#option GLCD_MODE = 8080         // GLCD interface mode - 6800 or 8080
#option GLCD_DATA = PORTH        // data port
#option GLCD_RD = PORTJ.1        // EN pin - 8080 mode
#option GLCD_WR = PORTJ.2        // RW pin - 8080 mode
Make sure to adjust the ports correctly.

yudi
Posts: 10
Joined: Sat May 23, 2009 3:02 am
Location: Indonesia

Post by yudi » Sun Jul 05, 2009 4:17 am

Thanks Matt for your advice.

I have include #option GLCD_MODE = 8080 in my code. But because 18F452 & 18F458 do not have PORTH and PORTJ, i maintained this code:

#option GLCD_DATA = PORTD
#option GLCD_WR = PORTB.1
#option GLCD_RD = PORTB.0

I found nothing difference on the display.

There is a post from MSprut on"S1D13700 grayscale troubles"
http://www.sfcompiler.co.uk/forum/viewt ... , Yudi

yudi
Posts: 10
Joined: Sat May 23, 2009 3:02 am
Location: Indonesia

Post by yudi » Sun Jul 05, 2009 4:34 am

Thanks Matt for your advice.
I have include #option GLCD_MODE = 8080 in my code. But because 18F452 & 18F458 do not have PORTH & PORTJ, i still maintained this code:

#option GLCD_WR = PORTB.1 // WR pin
#option GLCD_RD = PORTB.0 // RD pin
#option GLCD_DATA = PORTD // data port

I found nothing difference on the screen

There is a post from MSprut about "S1D13700 grayscale troubles"
[url]http://www.sfcompiler.co.uk/forum/viewt ... highlight=

I think it almost similar with my problem. Have it something to do with grayscale issue or bpp setting?. And how to configure SYSTEM_SET for this?

Thanks a lot.
Regard
Yudi[/url]

MattH
Registered User
Registered User
Posts: 51
Joined: Mon Jan 01, 2007 8:03 pm
Location: Allentown, PA

Post by MattH » Sun Jul 05, 2009 12:19 pm

yudi, the driver does not support gray scale, so don't worry about it.
Are you using an development board or how is the display connected to the PIC?
Your display requires 3.3V as operation voltage. Are you using level shifters between the PIC and the LCD? That could be a problem too.

yudi
Posts: 10
Joined: Sat May 23, 2009 3:02 am
Location: Indonesia

Post by yudi » Sun Jul 05, 2009 1:15 pm

Matt, you are correct. That is because the driver does not support grayscale. Of course, it is a problem to me.

Thanks a lot for your response.

yudi
Posts: 10
Joined: Sat May 23, 2009 3:02 am
Location: Indonesia

Post by yudi » Mon Jul 06, 2009 9:19 am

I have tried to configure SYSTEM_SET exactly the same as initialization setting example as in data sheet. Nothing difference on the screen. Area in Y position is ok, but not for X position. I have only 1/4 of the total screen area.

Is that mean i can not use the library even for 1Bpp mode?

Thanks a lot for any replay.

Regard,
yudi

yudi
Posts: 10
Joined: Sat May 23, 2009 3:02 am
Location: Indonesia

Re: Help me with GLCD S1D13700

Post by yudi » Mon Sep 14, 2009 10:26 am

S1D13700

Post Reply