Show Posts
Pages: [1] 2 3 ... 12
1  Forum 2005-2010 (read only) / Forum / Re: Forum Style Sheet on: February 19, 2010, 02:04:02 am
Second that. Looks quite ugly to me. Besides that, my old TFT has lost some contrast over the years (no, it's not a matter of settings...), so all ths grey is really unpleasing to me.
2  Forum 2005-2010 (read only) / Development / Re: Library for SED1520 GLCD Controller v0.1 on: February 15, 2010, 01:35:05 am
The library is again uploaded on rapidshare at:

http://rapidshare.de/files/49151883/ks0108_SED1520.zip.html

Works with my SED1520 based display (122x32), for others display you have to modify the header files a bit.
3  Forum 2005-2010 (read only) / Development / Re: Library for SED1520 GLCD Controller v0.1 on: June 26, 2009, 10:50:56 am
Works fine with the SED1520 too. Congratulations, another point for your compatibility list.
I'm gonna read a bit into the LiquidCrystal Library, so we can perhaps look into redoing this whole GLCD class thingy.
4  Forum 2005-2010 (read only) / Development / Re: Library for SED1520 GLCD Controller v0.1 on: June 26, 2009, 09:38:24 am
More than strange things happening here... something got screwed up when I tried to follow your suggestion, but then I found out that I could comment out nearly everything I had added to your DoReadData() function. Everything but one:

Code:
#ifdef SED1520
    if(first == 0){
        this->GotoXY(this->Coord.x, this->Coord.y);
    }
#else
    this->GotoXY(this->Coord.x, this->Coord.y);
#endif

This prevents the GotoXY from being executed after the dummy read, as that seems to confuse the controller. Everything else I added must have had some strange effect on it (right now I'm not willing to think about what it was exactly).
If I comment my parts out so the GoToXY is performed after the dummy read as well, I get the strange garbage from the very beginning.

So that's all that needs to be changed I guess (and the reset thing of course). I couldn't find something about the reset time in the datasheet, but it works fine, so I think the 120 ns are long enough.
Everything works now with EN_DELAY_VALUE defined as 1 and gives me a framerate of 14.

New code up (basically only lost some ballast...):

http://rapidshare.de/files/47667981/ks0108_working_with_sed1520.zip.html

Problem with tying the RES pin up to the Arduino's reset is, that the RES pin determines which mode the SED1520 starts in. You can either tie it high, so a low level causes a reset, or you can tie it low, then a high level causes a reset.
I had no luck with connecting it to the Arduino reset.
5  Forum 2005-2010 (read only) / Development / Re: Library for SED1520 GLCD Controller v0.1 on: June 26, 2009, 06:40:22 am
I think that would have some advantages over modifying specific code to match another chipset and make it even more complicated by that...

I'm about done with getting everything together with your code, but I have a question:
In the DoreadData funtion you have this if-structure:
Code:
if(first){
    if(this->Coord.x % CHIP_WIDTH == 0 && chip > 0){            // todo , ignore address 0???
        this->GotoXY(this->Coord.x, this->Coord.y);
        //this->WriteCommand(LCD_SET_ADD, chip);       
        this->WaitReady(chip);
    }
}

is it supposed to be like that? Because for me it only worked when changing the curly brackets to:

Code:
if(first){
    if(this->Coord.x % CHIP_WIDTH == 0 && chip > 0){}            // todo , ignore address 0???
    this->GotoXY(this->Coord.x, this->Coord.y);
    //this->WriteCommand(LCD_SET_ADD, chip);       
    this->WaitReady(chip);
}

so that when it does the dummy read, it goes to x, y.

Could you further explain your idea of a "base class" (btw, what do you mean by virtual functions?). I'd really like to take part in doing something like that, sounds like a great painsaver for other people like me (or everybody who gets some new kind of displaycontroller into his hands)


Edit: btw, there is a new video now: http://www.flickr.com/photos/37666650@N08/3661794969/ Works fine even with EN_DELAY set to zero.


Edit 2: I've upped a version for you that "should" behave normal, but if you uncomment the (new) #define SED1520 in ks0108.h it works with the SED1520. As I have no ks0108 flying around, could you check if it still wrks on one? It works fine for me with beforementioned #define uncommented.
I've also included my example sketch.
Link: http://rapidshare.de/files/47666594/ks0108.zip.html
6  Forum 2005-2010 (read only) / Development / Re: Library for SED1520 GLCD Controller v0.1 on: June 26, 2009, 05:34:17 am
Seems like I got it. Must be a difference in how the column adress counter in the display ram is increased. I'm gonna tidy everything up and put a copy up.

Great!
7  Forum 2005-2010 (read only) / Development / Re: Library for SED1520 GLCD Controller v0.1 on: June 26, 2009, 01:57:25 am
they are from a german onlineshop: http://www.pollin.de/shop/shop.php

It's something like a surplus store, but as they did a breakout board for the display, they seem to have some left...

Edit: Oh, seems as if they don't have an english homepage, but you can find all those displays at
 --> Bauelemente -->Aktiv --> Displays
if you're interested.
8  Forum 2005-2010 (read only) / Development / Re: Library for SED1520 GLCD Controller v0.1 on: June 25, 2009, 05:15:31 pm
Hmm, things got only worse. I'm gonna try and port some of my code tomorrow and put them together to see where things go wrong, so I can then check back with your code and do the necessary changes.
Would be great to see some success, as those displays only cost 2,95€ (equals 4,11$ or 2,52 GBP) so you can put them everywhere...okay, EL-backlighting sucks, but I don't need backlighting everywhere...

Back tomorrow with more news,
Otacon2k
9  Forum 2005-2010 (read only) / Development / Re: Library for SED1520 GLCD Controller v0.1 on: June 25, 2009, 03:45:18 pm
Well, I tried with i = 90000 (had to make it a long...) and uncommented everything from the sketch that's not needed. Could be a bit hard to see though:

http://www.flickr.com/photos/37666650@N08/3661086826/
10  Forum 2005-2010 (read only) / Development / Re: Library for SED1520 GLCD Controller v0.1 on: June 25, 2009, 02:47:25 pm
Oh sorry, I didn't see this thread was on page 2 already...
The chip problem seems to be gone since I put the reset into the code (see edit 2 of my last post).

I had to heavily modify the example sketch of course. That's what the Intro screen looks like:



In the following screen there's a problem: Where horizontal lines are the pages get filled up with garbage (though the garbage has some kind of pattern to it, looks like always smaller circles inside each other). You see: on the left from 0,0 there should be a normal rectangle, on the upper right there should be an rounded rectangle, and in the lower left part I added a horizontal line to show the problem better. The line's y coordinate is 28 (so 3 pixels from the bottom) and only the pixels above it, which belong to page 4, get filled with garbage. Vertical lines seem to work fine:



Must have something to do with the fillRect() funtion I think, but i couldn't find the problem yet.

I did a video of it with debug mode on:

http://www.flickr.com/photos/37666650@N08/3660949842/
11  Forum 2005-2010 (read only) / Development / Re: Library for SED1520 GLCD Controller v0.1 on: June 25, 2009, 11:59:15 am
Good news, the screen now shows something. I uploaded the example sketch (canging all y parameters to stay inside the 32 pixel bounds). In the Intro stuff, i can see the countdown and some of the characters of the font. After that I can see the spinner. Everything looks a bit messed up though.
Problem is: only one chip seems to be used. While there is something on the left half of the screen, the right side remains blank. If i swap the CSEL definitions around, I can see something else in the Intro and the FPS displayed, again only on the left half, while the right remains blank.

What I changed:

in ks0108.h:
-#define LCD_ON                        0xAF
-#define LCD_OFF                        0xAE
-#define LCD_SET_ADD                  0x00
(those are the commands for the SED1520)

in ks0108_Arduino.h:

-#define CSEL1                        15            
-#define CSEL2                        14            
(and other way round)

ks0108_Panel.h:
-#define DISPLAY_WIDTH 122
-#define DISPLAY_HEIGHT 32
-#define CHIP_WIDTH     61  // pixels per chip

Perhaps you've got an idea? I'm gonna play around and tell you if I found something, but seeing something at all is quite satisfying for the moment...
So I guess the problems in the old version came from not waiting for the busy flag to disappear.

By the way: The code looks great, much more readable now compared to 1.0b. Thanks!

Edit: Changing #define EN_DELAY_VALUE changed nothing, tried up to #define EN_DELAY_VALUE 50 now.

Edit 2: Gets better and better, I think I found the problem: seems like the SED1520 always has to be reset at initialization, so i added:

#define RES 19     to ks0108_Arduino.h

and

pinMode(RES, OUTPUT), fastwriteLow(RES) and fastWriteHIGH(RES)      to the Init() funtion in ks0108.cpp

In my code I used to have the reset pin connected to pin 19 as well, in your old version that didn't do anything, but here it seems to work. Yippie!
12  Forum 2005-2010 (read only) / Development / Re: Library for SED1520 GLCD Controller v0.1 on: June 25, 2009, 10:43:25 am
D'oh...
I used the one from the playground, seems to be 1.0b. Where is the newer release?

Perhaps that's the problem at last.


Edit: Nevermind, I found it (would be nice to see it up on the playground to prevent such situations...). I'm gonna have a look if it works now (as I use WaitForStatus functions as well, it could be the "missing link")

Edit 2: Nevermind the edit, I wrote it as you posted...
13  Forum 2005-2010 (read only) / Development / Re: Library for SED1520 GLCD Controller v0.1 on: June 25, 2009, 09:36:45 am
What do you mean by status functions? Didn't notice any... the enable function shouldn't need any changes, it works very similar to my manual setting of the enable-pin. I tried increasing the delay in there, but it didn't help.
14  Forum 2005-2010 (read only) / Development / Re: Library for SED1520 GLCD Controller v0.1 on: June 25, 2009, 06:34:30 am
Hi mem!
For the LCD to be filled with text it takes 151ms. I tried many many many (and I mean many) things to get your code running with my controller, but had no success yet.
Commands seem to work fine sometimes, though I dont't really know why, as dataout doesn't work (well, one time it semi-worked, I could manage to write some "0xFF, 0x55, 0xAA, 0xFF, 0x00" to the screen (which I always use for debugging as it's easily recognized), but it only worked for the first page and still looked partly messed up.

Strange thing is, that even if i totally substitute your DataWrite() functions by my slow ones it doesn't really work (of course having changed all #defines in the .h as well to match my display).

Until a new idea pops into my mind, I'm gonna use my lib for a while (as I don't need that much speed anyways).
But I would be glad to see if we could somehow get this whole stuff together.

- Otacon2k
15  Forum 2005-2010 (read only) / Development / Re: Library for SED1520 GLCD Controller v0.1 on: June 21, 2009, 03:32:49 am
Thanks for your suggestion, mem, I will have a further look into that!
When I first tried to get the LCD running, I tried the ks0108 library, but I must admit I put no effort into changing it to my LCD when I found it not working.
The Library I translated also has Graphics and Text functions which are now translated and working, so all in all, I'm done.
I read through the .h and.cpp of your library though. Heavy stuff, have to print it out once and get all the #ifndef #define and all the other structures into my brain (I'm just mentally moving from normal Arduino sketching to doing such stuff).

I've got a question that's really interesting me as I couldn't really understand it: How did you manage your font to be stored in PROGMEM? I've tried all possible combinations of where to put the different statements needed to do so, but the compiler in the end always throws a warning ("only initialized variables can be stored in program memory" or something). Nevertheless, the text functions work fine, although they use pgm_read_byte.
Pages: [1] 2 3 ... 12