Swordfish SED1520 Module

Coding and general discussion relating to user created compiler modules

Moderators: David Barker, Jerry Messina

Post Reply
CS
Posts: 127
Joined: Thu Nov 02, 2006 9:14 am

Swordfish SED1520 Module

Post by CS » Thu Nov 02, 2006 9:18 am

Hi,

I'm interessted in your compiler. I've tested alot of basic compilers but when I asked ffor supprt for the SED 1520 I was ingnored.

Is it possible, to get a SED 1520 Driver for Swordfish?

Best reguards from Germany

CS

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Thu Nov 02, 2006 9:56 am

There currently isn't a library supplied with Swordfish for this device. However, I don't think it would be too difficult at all to write one.

There are some useful resources on the internet which would make extremely good starting points for a Swordfish conversion. The first one is PBP based, written by Ranjit Diol (http://www.compsys1.com/workbench). You can download the code from here

http://www.compsys1.com/support/PBP_Files/sed1520/

The next implementation is C based, from http://www.picmodules.com. You can download the source from here

http://www.picmodules.com/acatalog/sed1520_p.zip

The second C implementation is much simpler than the PBP version. I think this would probably make the best starting point. It has all the right building blocks. Basically, if you have a working Init() routine, WriteData(), WriteCommand() you have pretty much cracked most driver implementations. The code above appears to have these functions, with a pixel routine which you can use to test your code and also generate your characters.

Converting from C to Swordfish is generally very easy - if you get stuck with the conversion I'm sure help could be provided. Remember though that unless someone actually has a SED1520 based controller on their workbench it would be impossible to test!

CS
Posts: 127
Joined: Thu Nov 02, 2006 9:14 am

Post by CS » Thu Nov 02, 2006 12:35 pm

Hi David Barker,

thanks for the very fast reply. I'll have a look after my work. Hopefully I'll get itto run because in Germany Display with a SED1520 are very cheap.

Reguards

CS

CS
Posts: 127
Joined: Thu Nov 02, 2006 9:14 am

Post by CS » Thu Nov 02, 2006 7:00 pm

Hi David Barker,

I have to admit, that conversion from C to Swordfish Basic isn't as easy as I expected but it is possible. I think that the conversion is one side but understanding is the other. My knowledge about C is not enough to convert everything. Also I don't know enough about Swordfish because most of the samples won't compile or will compile with a lot of mistakes, so I can't test/learn anything.

I thing at this time I should wait and follow the evolution!

Thanks

CS

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Thu Nov 02, 2006 7:09 pm

> because most of the samples won't compile or
> will compile with a lot of mistakes, so I can't test/learn anything.

Did you download the latest version of the compiler? Did it work OK?

CS
Posts: 127
Joined: Thu Nov 02, 2006 9:14 am

Post by CS » Thu Nov 02, 2006 7:33 pm

Hi David Barker,

Yes, in an other Thread you told me that I have to download the newest version. After that the compiler works. Thanks.

CS

User avatar
Steven
BETA Tester
Posts: 406
Joined: Tue Oct 03, 2006 8:32 pm
Location: Cumbria, UK

Post by Steven » Thu Nov 02, 2006 8:00 pm

CS,

I've just ordered a SED1520 based display to have a look at. As David says, the C code should be fairly straight forward to convert to Swordfish. When the display is delivered and I get chance to look at it, I'll post my findings.

I hope that this helps.

Regards,

Steven :D

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Thu Nov 02, 2006 8:02 pm

That's really generous Steve. If I can help out, let me know...

CS
Posts: 127
Joined: Thu Nov 02, 2006 9:14 am

Post by CS » Fri Nov 03, 2006 2:15 pm

Hi Steven,

at this time I'm busy enough to rewrite my older projects to Swordfish to see, how it works! But of couse it is nice to hear about the support to build a module for the SED1520.

The only thing I can say/write at this time is THANKS!

I can promise you that I will bug you as long as I give up or all my projects are running perfect! :lol:

Best reguards

Cs

User avatar
Steven
BETA Tester
Posts: 406
Joined: Tue Oct 03, 2006 8:32 pm
Location: Cumbria, UK

Post by Steven » Tue Nov 07, 2006 10:27 pm

I have now completed a first draft of a driver for the SED1520 and wired up my display. The first tests are promising, but there are just a few things to sort out still. I should be able to post a new library module within a few days.

Regards,

Steven

CS
Posts: 127
Joined: Thu Nov 02, 2006 9:14 am

Post by CS » Thu Nov 09, 2006 3:48 pm

Hi Steven,

thanks for the fast work!!! I'll try it today in the nighshift. :)

THX

CS

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Thu Nov 09, 2006 3:57 pm

It's released - just download from here

http://www.sfcompiler.co.uk/swordfish/d ... index.html

For registered users, just run the online update utility...

All in all, an excellent piece of work from Steven. With his SED1520 GLCD driver you can can draw circles, lines, boxes and bitmaps. It also supports variable width fonts (for example, verdana, arial etc).

I'll leave it for Steven to add more and post the link...

User avatar
Steven
BETA Tester
Posts: 406
Joined: Tue Oct 03, 2006 8:32 pm
Location: Cumbria, UK

SED1520 Driver

Post by Steven » Thu Nov 09, 2006 4:33 pm

As David has said, the driver is now available for the SED1520. I am interested to know if it works successfully for other people. Please let me know if not - the KS0108 displays have several variants and if SED1520 displays are similar, I may need to add further #options to allow for this.

It is a useful exercise to compare the driver library to that of the KS0108. It is very similar and shows how easy it is to extend the library support with Swordfish. Having an open library architecture really does open up this kind of work to anyone.

The Wiki contains further info, images and sample code - see http://www.sfcompiler.co.uk/wiki/pmwiki ... er.SED1520.

Please read, however, David's note above - you should download the new SE addition or run an online update to gain the new library, since the standard GLCD library also needs updating.

I hope that this helps,

Regards,

Steven

Post Reply