Help me with GLCD S1D13700
Moderators: David Barker, Jerry Messina
Help me with GLCD S1D13700
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]
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.
Your display is wired in 8080 mode by default (see data sheet).
Therefore you have to include the following lines:
Make sure to adjust the ports correctly.
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
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
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
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]
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]
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
Is that mean i can not use the library even for 1Bpp mode?
Thanks a lot for any replay.
Regard,
yudi
Re: Help me with GLCD S1D13700
S1D13700