Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : MM+: Display an 800x480 image in <1s
Page 2 of 2 | |||||
Author | Message | ||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8605 |
Details of the options are given in the fourth tutorial and are essential to use static strings |
||||
TrevorH Senior Member Joined: 06/04/2018 Location: United KingdomPosts: 142 |
Thanks for your help on options, that did it and now works perfectly. I am still not able to get DrawBitmap working, instead of putting text characters on the screen it only puts a line on screen at the x and y. I don't really understand how the DrawBitmap routine works ( you did say it was more complicated than DrawRectangle). Trevor |
||||
TrevorH Senior Member Joined: 06/04/2018 Location: United KingdomPosts: 142 |
@matherp Hi, you have used the CFunction in this thread to create many different variants and as you know it is the basis for my CPLD driver. Can you please tell me what determines whether you create a CFunction or a CSub. Since this routine can have many uses how do you decide how many arguments to pass for each individual usage or is this explained already somewhere and I have missed it, If so I apologise in advance. Trevor. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8605 |
Same answer as if the code was in Basic - Functions return an answer. What may confuse is that when CFunctions were initially introduced there were only functions. CSubs came later so some of the earlier examples would be functions when they were really subs Don't really understand the question. Number of arguments is totally dependent on the specific application and is tailored to suit. There is a limit of 10 in the MMBasic handling so if more needed then you need to use arrays. |
||||
TrevorH Senior Member Joined: 06/04/2018 Location: United KingdomPosts: 142 |
I suppose the first question is a bit vague as I knew already about returns etc, but after some experimenting I have found that the loadable used doesn't seem to auto load as a library part if I create it as a CSub. As far as the arguments go I know how to use SSD1963 as Initialisation using "i=SSD1963(1,6,7) but I haven't seen any examples of the other 9 commands available to this Cfunction. In each case I assume they take different numbers of parameters. I think I don't understand how this works. Sorry to be a pain, I clearly have a lot to learn. Trevor. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8605 |
There is one example in the Basic program attached on page 2 of the thread |
||||
Page 2 of 2 |
Print this page |