Shiny New Compiler

Coding and general discussion relating to the compiler

Moderators: David Barker, Jerry Messina

Doj
Posts: 362
Joined: Wed Apr 11, 2007 10:18 pm
Location: East Sussex

Shiny New Compiler

Post by Doj » Wed Apr 18, 2007 5:28 pm

My full version of the compiler arrived today and spured me on to finish my first project using Swordfish that I started last week with the SE.

I wanted to use the very cheap 128X64 COG available at RS for about £7 but they use the Samsung KS0713 driver and I could not find support for it so I decided to try it for my self and rather surprisingly(to me at least) I have made it work.

Now I dont know what to do with it(regarding publishing) as I have modified a locked file in the GLCD library and would expect it would concern some if they were to wish to test it but not change their defaults.
I have changed "GLCD.bas" and created "KS0713.bas"(which is actually a modified version of "S1D10605.bas")
Details of the changes to the original files and the specific display used for testing are contined in the code.

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 » Wed Apr 18, 2007 6:34 pm

It really encourages me when people take the time to work on a new module. Glad you have it working!

The place to publish your code is here:

http://www.sfcompiler.co.uk/wiki/

More specifically

http://www.sfcompiler.co.uk/wiki/pmwiki ... er.Modules

Just press the 'edit' link at the bottom of the page. I've added a user name and password (to stop spammers) which is given on the main wiki homepage (first link above). Editing the wiki is really easy - you can practice in the sandbox. If you are not sure about some of the formatting, just post the code and I or someone else will do it later.

TimB
Posts: 262
Joined: Wed Oct 04, 2006 7:25 am
Location: London UK

Post by TimB » Wed Apr 18, 2007 7:26 pm

Glad you have the KS0713 working apparently its very similar to the S1D10605 apart from of the set ups.

I for one would like to try it as I have a couple sitting on my shelf

Doj
Posts: 362
Joined: Wed Apr 11, 2007 10:18 pm
Location: East Sussex

Post by Doj » Wed Apr 18, 2007 7:34 pm

Ok David, I will have a go and see what happens, I would love someone else to try it on some real hardware and let me know when its on there.

These versions of 128X64 are so cheap(on RS at least) that they are almost half the price of the cheapest Farnell part, I think this is a first, I have never found any advantage in using RS in 20 years to date!.

One little note regarding the original S1D10605.bas, I believe(not 100% sure) that the text comments associated with a line in the "Sub Initialize()", namely "Command(cmdScanBottomTop) // scan top to bottom"
has the top and bottom swapped round, or have I changed it and not saved a copy of the original(hope not!)

Doj
Posts: 362
Joined: Wed Apr 11, 2007 10:18 pm
Location: East Sussex

Post by Doj » Wed Apr 18, 2007 7:44 pm

Hello Tim, Sorry about the double post, I had a debug error when posting and it seems to have placed it twice, I bet it was at the same time as you posted!

I will send the code to you on an email in a few minutes.
I did not know it was similar until I had written all the setup configuration and initialisation stuff, it was then(DOH!) that I thought I might look at the existing ones to see if I was making wheels all over again, well thats when I realised they were very similar.

What I have found is that the duty cycle and voltage "volume" are the defining components in the setup(between these two devices).
You still have to read the data sheet 20 times before figuring it out though!

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 » Wed Apr 18, 2007 7:48 pm

> I had a debug error when posting

That sometimes happens to me - don't know why. Just ignore, it seems it gets posted anyway...

> Ok David, I will have a go and see what happens, I would love
> someone else to try it on some real hardware and let me know
> when its on there.

Definitely post on the wiki - I would really like to take a look...

> Command(cmdScanBottomTop) // scan top to bottom

My comments are wrong...

Doj
Posts: 362
Joined: Wed Apr 11, 2007 10:18 pm
Location: East Sussex

Post by Doj » Thu Apr 19, 2007 9:40 am

Glad to see that the big cheese can make mistakes too!!!

I have not posted it yet as I found it needs a new command "FLIP_DISPLAY" to allow the screen to display properly when it is upside down (mounted the wrong way up), there is a part of the code that had an addition of 4 to the position and when upside down this needs removing(thanks to TIM for email encouragement here).
Its nothing clever but will be useful for me when its in product.

Doj
Posts: 362
Joined: Wed Apr 11, 2007 10:18 pm
Location: East Sussex

Post by Doj » Thu Apr 19, 2007 6:37 pm

David, I have looked at the Wiki site and I can make absolutely no sense of it, I do not know how to register(if that is needed) and can see no way of uploading anything(got used to the Proton forum you see and thats sooo easy)

Can I have a "Wiki for idiots" explanation or just send someone the code to post and let me work Wiki out later?

Also on the Wiki home page under "Editing Content" the fifth word might want a little TLC.

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 Apr 19, 2007 6:45 pm

Just press the 'edit' link at the bottom of the page.

Name : user
Password : swordfish

try practising in the sandbox...

http://www.sfcompiler.co.uk/wiki/pmwiki ... ikiSandbox

It really is easy. The wiki is much more flexible than a forum, which does not support organised content very well.

Doj
Posts: 362
Joined: Wed Apr 11, 2007 10:18 pm
Location: East Sussex

Post by Doj » Sat Apr 21, 2007 12:10 pm

Hello David,
Not sure I agree that using Wiki is easy nor that a forum does not support organised content well, it depends on the users ability (relating to wiki being easy) and who is organising the forum and what package is used as the front end(php for example), of the four forums I use, 3 are php and one is VBulletin, I find VBulletin far easier and for me as a user(not administator), is by far the best.

In this case the user(me) is obviously missing the entire point regarding Wiki and its method of use, I am unable to create a new page in order to start doing any thing, I have read the information and tried to create a new page but I am getting nowhere.

I have zero experience in markup and never heard of Wiki previously and have little experience or interest in publishing information on the internet for the sake of it, in this case it would be to "add to the pool" so to speak and is, to me, valid.
Unfortunately the whole process seems foreign to me and as I do not understand it, it is far from easy.

I simply am unable to create a start page, once I do this I can work the rest out, I wonder if it can be explained by anyone in utter idiot language for me to get a grasp! Please HELP!

Obviously all opinions are my own and not expressed as absolute facts, so no need for anyone to get upset!(I would use a smilie here but I think they are silly!)

xor
Posts: 286
Joined: Sun Nov 05, 2006 1:15 pm
Location: NYC
Contact:

Post by xor » Sat Apr 21, 2007 12:55 pm

I would not be offended to see the code (within "code" brackets of course) posted in the forum, and then maybe someone can help you by moving the posted code over to the Wiki.....if you're nice about it.

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 » Sat Apr 21, 2007 1:03 pm

> I have zero experience in markup and never heard of Wiki previously

I good example of a wiki can be found here

http://en.wikipedia.org/wiki/Main_Page

Before I released Swordfish, I noticed on a number of other support forums that people wanted a way to publish articles, code snippets etc. An example of this is proton geeks

http://www.protongeeks.com/

which provides a really good resource for PDS users. I wanted something similar for Swordfish. The advantage of a wiki is that users control the content, rather than submitting a piece of code and having to wait for an administrator to upload.

Anyway - Let's say you wanted to publish your KS0713 code. Best to do it on the wiki module page, so...

http://www.sfcompiler.co.uk/wiki/pmwiki ... er.Modules

and press the 'edit' link at the botton of the page. To login, use

Name : user
Password : swordfish

OK, you will now see an edit box. At the botton, type

[[KS0713 | KS0713 Module]]

Then press save. You will now see 'KS0713 Module' with a question mark next to it (which means a page has not been created yet). Just click on the link to create a new page called 'KS0713'.

That's it - you are now ready to paste your code, comments etc.

If you want to make you code look 'pretty', just wrap it in the following
=code [=
code in here...
=]

There are loads of other formatting features, but that is entirely optional - someone else may do it for you! (I will if you like, once you get the code up there). Hope this helps, please let me know if you need more information or help...

TimB
Posts: 262
Joined: Wed Oct 04, 2006 7:25 am
Location: London UK

Post by TimB » Sat Apr 21, 2007 2:13 pm

I have used the wiki and I find it pretty simple. ProtonGeeks is OK but I think the Wiki is better in a lot of respects as it

The only trick is to edit an existing entry and cut'n'paste the controls etc from that into yours.

Anybody who does not fancy doing it them selves just has to mail it to me or post it on the forum and I will do for them.

Doj
Posts: 362
Joined: Wed Apr 11, 2007 10:18 pm
Location: East Sussex

Post by Doj » Sun Apr 22, 2007 7:49 pm

Ok David, thanks for the description, it is exactly what I did but when I got to the password part, the page just kept loading again and never showed the edit box as you describe I am going to try it again then if I can not sort it out I will send it to Tim and hope he can help(as usual!)

Thanks for all replys, much appreciated.

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

Post by Steven » Sun Apr 22, 2007 8:16 pm

I think that someone accidentally deleted all existing modules on the wiki, so I've restored them - appologies if I've made it difficult for someone else.

Steven

Post Reply