my first time with GLCD+s1d13700

Coding and general discussion relating to user created compiler modules

Moderators: David Barker, Jerry Messina

Post Reply
Abo3li
Posts: 6
Joined: Fri Apr 23, 2010 12:36 am
Location: Cairo-Egypt

my first time with GLCD+s1d13700

Post by Abo3li » Fri Apr 23, 2010 12:48 am

hi all,

I wish if you could help me.
this is my first time with any GLCD my one is "Topway LM2088" 320x240 with built-in driver S1D13700, and I was amazed when I know about your compiler and the library for "S1D13700"-it was just today-

Now, I want any main to display any thing on it, and elect the most suitable PIC for my case:
PIC18F252
PIC18F255
PIC18F452
PIC18F455
PIC18F458
Thanks in advance for your time.

rmteo
Posts: 237
Joined: Fri Feb 29, 2008 7:02 pm
Location: Colorado, USA

Post by rmteo » Fri Apr 23, 2010 1:00 am

If you have not already got your PIC, then I suggest using one of the newer 4 digit devices such as the PIC18F4620.

Abo3li
Posts: 6
Joined: Fri Apr 23, 2010 12:36 am
Location: Cairo-Egypt

Post by Abo3li » Fri Apr 23, 2010 1:11 am

thanks for your reply, but could you kindly choose from what I wrote as this is the available to me.


Also I want to know the sequence to built a new project -including PIC type,clock,...-and get the .HEX file

thanks again...

rmteo
Posts: 237
Joined: Fri Feb 29, 2008 7:02 pm
Location: Colorado, USA

Post by rmteo » Fri Apr 23, 2010 1:33 am

I would go with the PIC18F452. Download the SF Manual here http://www.sfcompiler.co.uk/swordfish/d ... umentation
Play with some of the canned examples to get an idea of how to set up your project.

Abo3li
Posts: 6
Joined: Fri Apr 23, 2010 12:36 am
Location: Cairo-Egypt

Post by Abo3li » Fri Apr 23, 2010 2:41 am

I want you to correct me if I am wrong
I get a new file from file -> new

then
module identifier
[device = devicename]
[clock = frequency]
{modules}
{declarations}
{statements}
[end]

finally save and compile...

rmteo
Posts: 237
Joined: Fri Feb 29, 2008 7:02 pm
Location: Colorado, USA

Post by rmteo » Fri Apr 23, 2010 3:13 am

You don't need the module identifier or [end].

Code: Select all

[device = devicename]
[clock = frequency]
[config = ]
[include = ]
{modules}
{declarations}
{statements} 

Abo3li
Posts: 6
Joined: Fri Apr 23, 2010 12:36 am
Location: Cairo-Egypt

Post by Abo3li » Tue Apr 27, 2010 12:37 am

I wrote a small code to make sure that every thing is going well

Code: Select all

Device = 18F452
Clock = 10

Include"S1D13700.bas"

S1D13700.Initialize()
S1D13700.Fill(0, 0, 200, 100)
but this error appeared
Identifier not declared :: initialize

please help ...

Raistlin
Registered User
Registered User
Posts: 69
Joined: Tue Apr 01, 2008 1:13 pm

Post by Raistlin » Tue Apr 27, 2010 6:49 am

the initialize sub is called at the end of the library ,, i dont think you need to call it in the main program.

I took it out and it compiled fine
If you can read this you are too close

Raistlin
Registered User
Registered User
Posts: 69
Joined: Tue Apr 01, 2008 1:13 pm

Post by Raistlin » Tue Apr 27, 2010 7:54 am

took another look and yes i can confirm it is called from the end of the library so need not be called in the code .
Infact you cant because it is not declared in the library as a public function
Hence the error
If you can read this you are too close

Abo3li
Posts: 6
Joined: Fri Apr 23, 2010 12:36 am
Location: Cairo-Egypt

Post by Abo3li » Tue Apr 27, 2010 4:55 pm

thanks, I will try this and till you the results

Abo3li
Posts: 6
Joined: Fri Apr 23, 2010 12:36 am
Location: Cairo-Egypt

Post by Abo3li » Tue Apr 27, 2010 10:22 pm

nothing appeared, if any one can help me
I will tell you what I did

1-PIC 18f452 connections:
pin1,11 ---> 5 volt
pin 12 --->0 volt

2-GLCD connections:
pin2,19 --->5volt
pin1,20 ---> 0 volt

3-
GLCD data pins(9-to-16) ----> port D
GLCD write pin --->B-1
GLCD read pin --->B-0
GLCD CS pin --->B-3
GLCD A0 pin --->B-2
GLCD RES pin ---> B-5

pins 3&18 at the GLCD are connected to pot.

Code: Select all

Device = 18F452
Clock = 10
Include"S1D13700.bas"
S1D13700.Fill(0, 0, 200, 100)
finally I have 2 questions:
-why the WAIT signal did not be mentioned at the library?
-I conect pin 20 @ the GLCD to the ground cause of what written at the data sheet page 5, was this right?

note: I used 10M clock as I noticed that there is one at the driver with this value

GLCD data sheet may be helpful
http://www.2shared.com/file/12771888/d5 ... Rev03.html

Post Reply