Help to create a gLCD_KS0108 variant
Moderator: Benj
- Crenwick
- Posts: 127
- Joined: Sun Aug 07, 2011 1:40 pm
- Location: Belgium
- Has thanked: 7 times
- Been thanked: 21 times
- Contact:
Help to create a gLCD_KS0108 variant
Hello all,
I'm trying to create a new component for an LCD display I have. It's a KS0108 but with 192x64 dots so it haves three KS0108 chips onboard and n extra CS3 pin input.
I was trying to first make a clone of the existing KS0108 component but unfortunately the exported component doesn't have any connections.
Can you give me a brief description of how to make an exact clone of an existing component ? So I think then to modify the parameters, connections and the code to let my display works
I attached the resulting fcpx file.
Bernard
I'm trying to create a new component for an LCD display I have. It's a KS0108 but with 192x64 dots so it haves three KS0108 chips onboard and n extra CS3 pin input.
I was trying to first make a clone of the existing KS0108 component but unfortunately the exported component doesn't have any connections.
Can you give me a brief description of how to make an exact clone of an existing component ? So I think then to modify the parameters, connections and the code to let my display works
I attached the resulting fcpx file.
Bernard
- Attachments
-
- gLCD_G19264B.fcpx
- (1.2 KiB) Downloaded 361 times
Bernard
Flowcode 6 / EB006-V9
Flowcode 6 / EB006-V9
- JonnyW
- Posts: 1230
- Joined: Fri Oct 29, 2010 9:13 am
- Location: Matrix Multimedia Ltd
- Has thanked: 63 times
- Been thanked: 290 times
- Contact:
Re: Help to create a gLCD_KS0108 variant
Hi there.
You may have inherited the macros from the KS0108, but you do not inherit its properties.
Properties are like variables, and you can not use another components properties as though they are your own (there is also the issue of where to put them in your property list). I may see if something can be put in to sort that in future, but there is always with any variable the issue of who 'owns' the variable, and gets notifications when it changes.
To do this, right click the 'Properties' and select 'Copy From...' to make a list of the properties. The next bit is a bit more complicated as whenever your property changes you have to copy the value down to the target. You do this whenever your property changes, in the Component.Property event: You need to use the Component.Property.CopyValue() call for each property. I have recently added a call that will copy all properties in one go, but unfortunately this is the only way for now (CopyTree is available in the next patch). Once you do this, any time your property changes, the base components property also changes.
I hope this works for you, keep us posted on how you go and any thoughts you have. As I say, in the next release you will be able to copy every value in one go, but unfortunately not just yet.
Jonny
You may have inherited the macros from the KS0108, but you do not inherit its properties.
Properties are like variables, and you can not use another components properties as though they are your own (there is also the issue of where to put them in your property list). I may see if something can be put in to sort that in future, but there is always with any variable the issue of who 'owns' the variable, and gets notifications when it changes.
To do this, right click the 'Properties' and select 'Copy From...' to make a list of the properties. The next bit is a bit more complicated as whenever your property changes you have to copy the value down to the target. You do this whenever your property changes, in the Component.Property event: You need to use the Component.Property.CopyValue() call for each property. I have recently added a call that will copy all properties in one go, but unfortunately this is the only way for now (CopyTree is available in the next patch). Once you do this, any time your property changes, the base components property also changes.
I hope this works for you, keep us posted on how you go and any thoughts you have. As I say, in the next release you will be able to copy every value in one go, but unfortunately not just yet.
Jonny
- Crenwick
- Posts: 127
- Joined: Sun Aug 07, 2011 1:40 pm
- Location: Belgium
- Has thanked: 7 times
- Been thanked: 21 times
- Contact:
Re: Help to create a gLCD_KS0108 variant
Hi,
Thanks for the explanation, I thougt that it was possible to create a new component (base component) and edit the code to add the extra CS3 pin and off course add some lines to integrate the extra KS0108 chip.
But it seems not possible I presume ?
Best regards,
Bernard
Thanks for the explanation, I thougt that it was possible to create a new component (base component) and edit the code to add the extra CS3 pin and off course add some lines to integrate the extra KS0108 chip.
But it seems not possible I presume ?
Best regards,
Bernard
Bernard
Flowcode 6 / EB006-V9
Flowcode 6 / EB006-V9
- JonnyW
- Posts: 1230
- Joined: Fri Oct 29, 2010 9:13 am
- Location: Matrix Multimedia Ltd
- Has thanked: 63 times
- Been thanked: 290 times
- Contact:
Re: Help to create a gLCD_KS0108 variant
Hi. It will be possible - the steps in the above post will let you create an exact working copy of the KS0108 component.
What you can not do in Flowcode v6 is take someone elses component and change their flowchart. This is so that when the marketplace for components is up and running someone can not just take an existing component, copy the flowcharts and pass it off as their own product.
Unfortunately I do not know much about the gLCD mods you need to make to know what needs to be done. Do your changes need to amend the beginning, middle or end of a component routine?
Jonny
What you can not do in Flowcode v6 is take someone elses component and change their flowchart. This is so that when the marketplace for components is up and running someone can not just take an existing component, copy the flowcharts and pass it off as their own product.
Unfortunately I do not know much about the gLCD mods you need to make to know what needs to be done. Do your changes need to amend the beginning, middle or end of a component routine?
Jonny
- Crenwick
- Posts: 127
- Joined: Sun Aug 07, 2011 1:40 pm
- Location: Belgium
- Has thanked: 7 times
- Been thanked: 21 times
- Contact:
Re: Help to create a gLCD_KS0108 variant
Hi, well the mod is just adapt the gLCD display from 128x64 to 192x64. The design of the display is just a third KS0108 chip added on the board and one extra control line as input (CS3).
So when you have to draw something >128 you need to use the CS3 control. Maybe should be an idee to your team to adapt the component so that you can chose witch display you use (128x64 /192x64) ?
Regards,
So when you have to draw something >128 you need to use the CS3 control. Maybe should be an idee to your team to adapt the component so that you can chose witch display you use (128x64 /192x64) ?
Regards,
Bernard
Flowcode 6 / EB006-V9
Flowcode 6 / EB006-V9
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Help to create a gLCD_KS0108 variant
Hello,
I have added this in now to the base KS0108 component (probably the easiest way without going around the houses to override functions etc), would you mind testing the functionality out for me just to make sure I've got everything right.
Just pop the file into your Flowcode v6/Components directory before starting Flowcode and the changes should be loaded.
I have added this in now to the base KS0108 component (probably the easiest way without going around the houses to override functions etc), would you mind testing the functionality out for me just to make sure I've got everything right.
Just pop the file into your Flowcode v6/Components directory before starting Flowcode and the changes should be loaded.
- Attachments
-
- gLCD_KS0108.fcpx
- (33.05 KiB) Downloaded 359 times
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Crenwick
- Posts: 127
- Joined: Sun Aug 07, 2011 1:40 pm
- Location: Belgium
- Has thanked: 7 times
- Been thanked: 21 times
- Contact:
Re: Help to create a gLCD_KS0108 variant
Hi Ben,
Sorry for my late reply but I was not at home ...
I just tried to compile a test program on my devboard but unfortunately I receive two syntax errors in code
/*========================================================================*\
Use :led_base1
:Macro implementations
\*========================================================================*/
/*=----------------------------------------------------------------------=*\
Use :Turn the LED off.
\*=----------------------------------------------------------------------=*/
void FCD_061_led_base1__TurnOn()
{
/* Error: Syntax error */;
}
/*=----------------------------------------------------------------------=*\
Use :Turn the LED on.
\*=----------------------------------------------------------------------=*/
void FCD_061_led_base1__TurnOff()
{
/* Error: Syntax error */;
}
I attached the test program also
Kind regards,
Sorry for my late reply but I was not at home ...
I just tried to compile a test program on my devboard but unfortunately I receive two syntax errors in code
/*========================================================================*\
Use :led_base1
:Macro implementations
\*========================================================================*/
/*=----------------------------------------------------------------------=*\
Use :Turn the LED off.
\*=----------------------------------------------------------------------=*/
void FCD_061_led_base1__TurnOn()
{
/* Error: Syntax error */;
}
/*=----------------------------------------------------------------------=*\
Use :Turn the LED on.
\*=----------------------------------------------------------------------=*/
void FCD_061_led_base1__TurnOff()
{
/* Error: Syntax error */;
}
I attached the test program also
Kind regards,
- Attachments
-
- test gLCD.fcfx
- (10.22 KiB) Downloaded 344 times
Bernard
Flowcode 6 / EB006-V9
Flowcode 6 / EB006-V9
- Crenwick
- Posts: 127
- Joined: Sun Aug 07, 2011 1:40 pm
- Location: Belgium
- Has thanked: 7 times
- Been thanked: 21 times
- Contact:
Re: Help to create a gLCD_KS0108 variant
Ooops,
Sorry Ben, problem seems to come from the Led array component
Sorry Ben, problem seems to come from the Led array component
Bernard
Flowcode 6 / EB006-V9
Flowcode 6 / EB006-V9
-
- Posts: 1314
- Joined: Sun Jan 15, 2012 3:15 pm
- Has thanked: 474 times
- Been thanked: 458 times
- Contact:
Re: Help to create a gLCD_KS0108 variant
Hi
have you tried removing the 2 semicolon from lines 421(ish) and 431(ish)
Regards
Dazz
have you tried removing the 2 semicolon from lines 421(ish) and 431(ish)
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
- Crenwick
- Posts: 127
- Joined: Sun Aug 07, 2011 1:40 pm
- Location: Belgium
- Has thanked: 7 times
- Been thanked: 21 times
- Contact:
Re: Help to create a gLCD_KS0108 variant
Hi Ben,
Just tested the display on my devboard and I have a strange behaviour ..
Can you check the attached video ?
http://youtu.be/agsb3d_RvrM
Regards,
Just tested the display on my devboard and I have a strange behaviour ..
Can you check the attached video ?
http://youtu.be/agsb3d_RvrM
Regards,
Bernard
Flowcode 6 / EB006-V9
Flowcode 6 / EB006-V9
- JonnyW
- Posts: 1230
- Joined: Fri Oct 29, 2010 9:13 am
- Location: Matrix Multimedia Ltd
- Has thanked: 63 times
- Been thanked: 290 times
- Contact:
Re: Help to create a gLCD_KS0108 variant
Hi.
As far as the video goes, what should it be doing and what is it doing that is strange - you mean the power cycling?
Jonny
This was to do with a bad pin assignment. This should be sorted now.Sorry Ben, problem seems to come from the Led array component
As far as the video goes, what should it be doing and what is it doing that is strange - you mean the power cycling?
Jonny
- Crenwick
- Posts: 127
- Joined: Sun Aug 07, 2011 1:40 pm
- Location: Belgium
- Has thanked: 7 times
- Been thanked: 21 times
- Contact:
Re: Help to create a gLCD_KS0108 variant
Hi Jonny,
I attached the test program I used above, It's just writing "Hello" (one time !) in each corner of the display and then draw a rectangle box in the middle. In the flowcode simulation the result is ok but not on the display itself like viewed on the video. On the video you see that it write two Hello's at the same time, so at the end of the loop you see eight Hello's ... And in place of a rectangle I become a large bar in the middle of the screen.
Just let run the testprogram on flowcode and you will see the difference with the video
Regards,
I attached the test program I used above, It's just writing "Hello" (one time !) in each corner of the display and then draw a rectangle box in the middle. In the flowcode simulation the result is ok but not on the display itself like viewed on the video. On the video you see that it write two Hello's at the same time, so at the end of the loop you see eight Hello's ... And in place of a rectangle I become a large bar in the middle of the screen.
Just let run the testprogram on flowcode and you will see the difference with the video
Regards,
Bernard
Flowcode 6 / EB006-V9
Flowcode 6 / EB006-V9
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Help to create a gLCD_KS0108 variant
It looks like two of the chip selects are always active, maybe I got the logic the wrong way around for these so I will investigate this now.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Help to create a gLCD_KS0108 variant
I've made some mods and hopefully this will solve the issue.
Let me know how you get on.
Let me know how you get on.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Crenwick
- Posts: 127
- Joined: Sun Aug 07, 2011 1:40 pm
- Location: Belgium
- Has thanked: 7 times
- Been thanked: 21 times
- Contact:
Re: Help to create a gLCD_KS0108 variant
I just installed your latest version but it gives an error "Failed to add component" so I'm unable to test it.
Can you check ?
Regards,
Can you check ?
Regards,
Bernard
Flowcode 6 / EB006-V9
Flowcode 6 / EB006-V9
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Help to create a gLCD_KS0108 variant
Hello,
Were working on a release and I built the component using the release build DOH!! The release should happen today so you should be able to use this to check if the component is fixed.
For now I've rebuilt using an older version so let me know if you can add this.
Note that my older version is still going to be newer then the released version so may not work until you update to the new release.
Were working on a release and I built the component using the release build DOH!! The release should happen today so you should be able to use this to check if the component is fixed.
For now I've rebuilt using an older version so let me know if you can add this.
Note that my older version is still going to be newer then the released version so may not work until you update to the new release.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Crenwick
- Posts: 127
- Joined: Sun Aug 07, 2011 1:40 pm
- Location: Belgium
- Has thanked: 7 times
- Been thanked: 21 times
- Contact:
Re: Help to create a gLCD_KS0108 variant
Sorry,
Just the same error "Failed to add component"
Just the same error "Failed to add component"
Bernard
Flowcode 6 / EB006-V9
Flowcode 6 / EB006-V9
- JonnyW
- Posts: 1230
- Joined: Fri Oct 29, 2010 9:13 am
- Location: Matrix Multimedia Ltd
- Has thanked: 63 times
- Been thanked: 290 times
- Contact:
Re: Help to create a gLCD_KS0108 variant
Hi. We have modded the FCFX file format a little to support multi-dimension arrays and this means that newer components will not load correctly in the current release of Flowcode.
We are currently fixing a port access bug in the CAL, once this is 100% tested we will do a release - we are as keen to get a (working) patch out as anyone!
Jonny
We are currently fixing a port access bug in the CAL, once this is 100% tested we will do a release - we are as keen to get a (working) patch out as anyone!
Jonny
- Crenwick
- Posts: 127
- Joined: Sun Aug 07, 2011 1:40 pm
- Location: Belgium
- Has thanked: 7 times
- Been thanked: 21 times
- Contact:
Re: Help to create a gLCD_KS0108 variant
No problem, I understand. Keep giving us a good support, that's great
Kind regards,
Kind regards,
Bernard
Flowcode 6 / EB006-V9
Flowcode 6 / EB006-V9
- Crenwick
- Posts: 127
- Joined: Sun Aug 07, 2011 1:40 pm
- Location: Belgium
- Has thanked: 7 times
- Been thanked: 21 times
- Contact:
Re: Help to create a gLCD_KS0108 variant
Hello all !
So I installed FC 6.0.2 and was able to compile the new fcpx component
And it works like a charm
Only thing I had to do is change CS3 pin from PortC6 to PortC7 (maybe a pull up or so ?)
Regards,
So I installed FC 6.0.2 and was able to compile the new fcpx component
And it works like a charm
Only thing I had to do is change CS3 pin from PortC6 to PortC7 (maybe a pull up or so ?)
Regards,
Bernard
Flowcode 6 / EB006-V9
Flowcode 6 / EB006-V9