GLCD S1D13700 Is not displaying anything.

General discussion relating to the library modules supplied with the compiler

Moderators: David Barker, Jerry Messina

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

Post by MattH » Mon May 17, 2010 3:05 pm

It works !!! Thanks a lot man!!
Good job! :D
Next time if I visit my home town (Hamm-Westfalen) you can buy me a beer :lol:

mgrondstra
Posts: 11
Joined: Mon May 10, 2010 12:02 pm
Location: Netherlands, Enschede

Post by mgrondstra » Mon May 17, 2010 3:07 pm

MattH wrote:
It works !!! Thanks a lot man!!
Good job! :D
Next time if I visit my home town (Hamm-Westfalen) you can buy me a beer :lol:
That won't be a problem :P

For reference:

The code used:

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_MODE = 8080          //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 = PORTB.4          // RD pin - 8080 mode 
//#option GLCD_RW = PORTB.3          // RW pin - 6800 mode 
#option GLCD_WR = PORTB.3          // 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
Brush.Color = 1 

// display some text... 
WriteAt(0,0,"Hello World") 
WriteAt(50,50,"Hello World")

//fil screen
//Fill(0, 0, 200, 100)
Problem was in the 8080 mode...

modus83
Posts: 9
Joined: Mon May 31, 2010 9:19 pm

Post by modus83 » Tue Jun 01, 2010 9:19 am

Hi!

I have the same problem! My Displaytech 240320G don´t shows anything!!
I have this code:

Code: Select all

device = 18F2550 // choose your device 
clock = 20      // choose your clock 

// configure GLCD... 
#option GLCD_MODEL = S1D13700    // set model
#option GLCD_MODE = 8080             //8080 mode
#option GLCD_A0 = PORTA.0        // A0 pin 
#option GLCD_WR = PORTA.1        // WR pin 
#option GLCD_RD = PORTA.2       // RD pin 
#option GLCD_DATA = PORTB        // data port 
#option GLCD_CS = PORTA.3        // chip select 
#option GLCD_RES = PORTC.0       // 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 

// display some text... 
WriteAt(50,50,"Hello World") 
The display don´t shows anything...
I have changed the CNF jumper to 8080 mode and nothing...
I have place a pot between Vo and Vee (10k) to adjust the contrast and nothing...(I think that the current is very low 0,7 mA...)

Please someone helps me!!
If someone could post a hex file to download and check would be wonderful!!

This is the datasheet of th screen:
http://www.displaytech.com.hk/upload/pr ... es-v21.pdf

Thanks!!

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

Post by MattH » Tue Jun 01, 2010 1:24 pm

Are you using a 20MHz crystal/resonator? If yes, you have to add after clock

Code: Select all

config FOSC = HS
Also add before Cls(1)

Code: Select all

SetAllDigital()
; requires to include "Utils.bas"

Regarding the backlight, see my comment here on first page.

Matt

modus83
Posts: 9
Joined: Mon May 31, 2010 9:19 pm

Post by modus83 » Tue Jun 01, 2010 1:46 pm

Thanks for the reply...

I'm going to test your pot connection....
The problem is I'm new with Swordfish Compiler. I know very well CCS, and in my Career Project, I'm using CCS language.
The problem is that it doesn't works!
Searching in the web I have found this web with people who has troubles with my GLCD or similar, a S1D13700 library, and very helpfully comments!
But when I try to compile the code with SE versión it says:
"Invalid Module or Program" "glcd.bas"
My steps:
New
Paste the code
F9 (Compile)
With your corrections also error...
Please, can you tell me how can I compile the example "Hello World" with the S1D13700 library, or can you send me and hex file to check if its a hardware or software problem ?
I'm really desperate for running this glcd ....

Thaks, Modus (Sorry for the english....I'm spanish)

:lol: :lol: :lol: :lol: :lol: :lol:

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

Post by MattH » Tue Jun 01, 2010 2:09 pm

The SE version compiles your program w/out any problems. I just tried it myself.
What OS are you running? I would suggest to remove SF and re-install it.
It should install in to "Program Files/Mecanique/SwordfishSE".

modus83
Posts: 9
Joined: Mon May 31, 2010 9:19 pm

Post by modus83 » Tue Jun 01, 2010 2:25 pm

MattH wrote:The SE version compiles your program w/out any problems. I just tried it myself.
What OS are you running? I would suggest to remove SF and re-install it.
It should install in to "Program Files/Mecanique/SwordfishSE".
I have re-installed the program and now compiles ok...
I'm going to test it...

I check it and tell you...

Thanks for your answer

modus83
Posts: 9
Joined: Mon May 31, 2010 9:19 pm

Post by modus83 » Tue Jun 01, 2010 3:33 pm

Nothing....
I have use the example "Hello, World" and nothing...
Your pot connection is different to my screen....
Vo = Vout = 28 V OUT
Vee = VLCD = 26 V IN
So, the pot should be:

Vout
|
|
|
10k---------Vee
|
|
|
5 V

I turn all the pot to the both sides and nothing changes....
The screen is always white (LEDs backlight)....
I have few questions....

1) If you put on your GLCD without PIC (Init routines) and turns the pot, does the contrast anything? Or has to be initialized....
2)There are external elements like resistors, capacitators or something that have to be connected to lcd or PIC?

Thank you so much for your help

Edit: I have measure the current on the RESET pin of the uC...0,0 mA.
My multimeter doesn't display anything. However, it shows 5 V of voltage...
Maybe the current is so low that the GLCD doesn't reset never??

Francis
Registered User
Registered User
Posts: 314
Joined: Sun Mar 25, 2007 9:40 am
Location: Devon

Post by Francis » Tue Jun 01, 2010 5:28 pm

I've never used exactly the same GLCD as you have, but certainly with other types the 'contrast' control should give enough range to make a visible change to the display, even with nothing in the display.

Have you checked the Vout value on your display with a voltmeter?

modus83
Posts: 9
Joined: Mon May 31, 2010 9:19 pm

Post by modus83 » Tue Jun 01, 2010 5:38 pm

Francis wrote:I've never used exactly the same GLCD as you have, but certainly with other types the 'contrast' control should give enough range to make a visible change to the display, even with nothing in the display.

Have you checked the Vout value on your display with a voltmeter?
Yes, the datasheet's value is 28 V and the pin gives 27.5 V. With the potenciometer (10k) I get the Vee typical value (26V), but nothing happens...
The current with 27,5 V is 0,7 mA. I don´t know if it's a right value...
If I connect directly Vo-Vee the current is also 0,7 mA and nothing shows.
I have seen other people in this forum with the same problem...
If anyone could give me some answer....

Thaks for your answer

Regards

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

Post by MattH » Tue Jun 01, 2010 10:48 pm

With your pot connection, you should be able to change the voltage at Vee between +5V and -27.5V. You can verify that by using a multimeter.
If the voltage is not changing at all then your display is shot :oops:

Your PIC should have at least some 100nF caps over the PS pins and a 10k pull-up resistor on MCLR.
I have seen other people in this forum with the same problem...
That's true but if you keep reading, 99% of the problems turned out to be related to hardware.

modus83
Posts: 9
Joined: Mon May 31, 2010 9:19 pm

Post by modus83 » Wed Jun 02, 2010 8:05 am

Thanks for your answer,

I have checked many times the voltage at Vee: It's between +27,5V and +5V and nothing changes in the screen...
The cap between Vdd-Vss is already in.
I don´t have MCLR pin enabled...(I guest is not important....) :shock:
What are PS pins?? (Power-Gnd pins??)
I'm going to check the connections in the oscilloscope.
Maybe the 26V doesn't arrive to the GLCD...
I can't believe that the screen is broken.... :cry: :cry: :cry:

Then, what's the fastest way to check if it's broken?

thanks

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

Post by MattH » Wed Jun 02, 2010 2:26 pm

modus83 wrote:Thanks for your answer,

I have checked many times the voltage at Vee: It's between +27,5V and +5V and nothing changes in the screen...
The cap between Vdd-Vss is already in.
I don´t have MCLR pin enabled...(I guest is not important....) :shock:
What are PS pins?? (Power-Gnd pins??)
I'm going to check the connections in the oscilloscope.
Maybe the 26V doesn't arrive to the GLCD...
I can't believe that the screen is broken.... :cry: :cry: :cry:

Then, what's the fastest way to check if it's broken?

thanks
I still believe that your pot is not connected correctly. Vee and Vo should be swapped. All of my displays using the same pot connection and there all working.
Then, what's the fastest way to check if it's broken?
No idea... :cry:

modus83
Posts: 9
Joined: Mon May 31, 2010 9:19 pm

Post by modus83 » Wed Jun 02, 2010 2:46 pm

Hi,

Thank you for your answer again!
I still believe that your pot is not connected correctly. Vee and Vo should be swapped. All of my displays using the same pot connection and there all working.
I'm going to connect it as you tell.
Then, I don´t understand this page of the datasheet:

Image

Vo is not a constant value out??
Vee is not an variable IN?

In a pot, the both sides are constant and the middle pin has variables values, depending of the res value... or not?

I check it and tell you
Anyway, thank you so much for your help, you are the best!!
:lol:

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

Post by MattH » Wed Jun 02, 2010 3:14 pm

Vo is not a constant value out??
Vee is not an variable IN?
May be your data sheet is incorrect? Vee is always an output, which you can measure w/out connecting anything. It should be a negative (!) voltage of approx. -25 to -28V.
Vo should show 0V with no connection. On my displays, the average Vo voltage for best contrast is somewhere around -18V, which gives me approx. 23V for Vlcd (VO >> Vdd)

Post Reply