I want to use the LCD for display and the touch sceen for input. I could not find a simple example project, I want to use it without CircleOS.
Is there an example project that does not use CircleOS for the LCD. I am happy with a demo that uses some kind of LCD_DrawChar() and shows the necessary initialization.
There is not such example. However, you can take the files lcd.c and draw.c from CircleOS and integrate them into your own application. You will have to call the init routines, that's all.
I've already tried it. I'm getting a strange behaviour: having a for-loop after the LCD-Init stuff, makes the LCD-Init stuff not working anymore. I don't understand the connection between adding a for-loop and the init-code.
I've done this a couple weeks ago and have gotten it working. I can post files if people are interested. Granted, all I did was use the CircleOS and modified a couple of the things that say DO NOT TOUCH. (it's actually quite tough to modify the CircleOS code, as there are lots of DEFINES that do non-obvious things. It would have been nicer if the code were a bit better documented for NON-CircleOS activities, but I'm not going to complain, it's still nicely written and clear.)
Perhaps my solution doesn't have the weird reset bug, but I'd be interested to know if it did!
I should also point out that I don't have anything written for dealing with the touchscreen. That will be for this weekend or sometime next week.
We got the initialization sequence from the LCD manufacturer (without investigating too deeply the sense of the values). I agree that this command seems not to be described in the controller manual. Don't know what to say...
To Kubark42: It would be nice to share your improvements with the community. Just one issue: because of the contest, we may not add any new feature until the end of the contest. But we may fix bugs...
Yes, these files belong to the STM32LIB provided by ST. We use it for all basic accesses to the embedded peripherals. If you make your own project, you can also select the option to use the ST library: "LD Linker | Libraries | ST library" We decided, for CircleOS, to include these files in the main project because they change sometimes, and we met some compatibility issues.
To Kubark42: It would be nice to share your improvements with the community. Just one issue: because of the contest, we may not add any new feature until the end of the contest. But we may fix bugs...
(Whoops, sorry for the delay, I hadn't realized you'd responded. It seems that I have to manually choose to subscribe to threads, which is a bit of a shame. I've filed a feature request in the "Website comments/suggestions" forum)
Oh, I haven't fixed any bugs. Anything I've done is directly taken from you guys. All it is is the code adapted to pure C, without having to have an OS layer in between. This is handy if you're looking for the lowest power usage possible, as now I can have a very simple program that sleeps the processor for most of the time, only waking it on demand.
So I'll share the code next time I'm in front of the right computer. With luck, I can take care of it tomorrow.
Francis, can the board not be modified to allow the posting of code? I've already done exactly what you have suggested, and used it for a primer2 cyclometer with GPS logging, but sharing this code is proving difficult as I cannot post it.
If you wish to post a single file, you can insert it in your post, on the forum. If you wish to post a whole project, you can post it in the project section. New projects are very welcome, even when they are not based on CircleOS.
Within a post in the forum, you can 'copy and paste' the contents of one file using the "code" tags (with brakets). See the help about 'tags'. It has been used, for example at: http://www.stm32circle.com/forum/viewtopic.php?id=617 Long files are made scrollable by this tag, that is much easier for the readers.
Ah, you're talking about using code tags, then. Yeah, I'm quite familiar with them from other boards.
So, in fact, I *cannot* post a file, right? Which is still a shame, as I can't post a demonstration code to the project page-- it's really not a project and would pollute the other listings-- but can't put the code and Ride7 project files here either. Any suggestions? Would it not be possible to allow posting small files to the forum?
To Kubark42: It would be nice to share your improvements with the community. Just one issue: because of the contest, we may not add any new feature until the end of the contest. But we may fix bugs...
(Whoops, sorry for the delay, I hadn't realized you'd responded. It seems that I have to manually choose to subscribe to threads, which is a bit of a shame. I've filed a feature request in the "Website comments/suggestions" forum)
Oh, I haven't fixed any bugs. Anything I've done is directly taken from you guys. All it is is the code adapted to pure C, without having to have an OS layer in between. This is handy if you're looking for the lowest power usage possible, as now I can have a very simple program that sleeps the processor for most of the time, only waking it on demand.
So I'll share the code next time I'm in front of the right computer. With luck, I can take care of it tomorrow.
Cheers, Kenn
Hi Kenn, Francis,
Do you have any news on the availability of the OS-less Primer2 project?
Well, it works pretty well on my Primer, although I still have a few more things to do before it's a final proof of concept. I doubt that it will ever find it's way onto the projects page, though. It's too bad that Raisonance can't seem to fix the forum to solve this (file posting) problem and a few other outstanding issues (automatic thread notifications, for instance), as then I could share the code with a wider audience.