/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / LCD Display without CircleOS

Username:     
Password:     
             

Forum

# 1   2009-03-28 19:23:02 LCD Display without CircleOS

james000
New member
Registered: 2009-02-09
Posts: 1

LCD Display without CircleOS

Hi,

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.

best regards
Gerhard

Offline

 

# 2   2009-03-29 05:09:38 LCD Display without CircleOS

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: LCD Display without CircleOS

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.

Offline

 

# 3   2009-03-30 11:41:07 LCD Display without CircleOS

pisi
Member
Registered: 2009-02-19
Posts: 17

Re: LCD Display without CircleOS

I'm also interested into this.
Can you please provide an example?

Offline

 

# 4   2009-03-30 11:52:26 LCD Display without CircleOS

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: LCD Display without CircleOS

I would say that CircleOS itself is an example. The files are available in the CircleOS project (see the resource section).

Offline

 

# 5   2009-03-30 11:58:00 LCD Display without CircleOS

pisi
Member
Registered: 2009-02-19
Posts: 17

Re: LCD Display without CircleOS

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.

Offline

 

# 6   2009-03-30 13:18:10 LCD Display without CircleOS

pisi
Member
Registered: 2009-02-19
Posts: 17

Re: LCD Display without CircleOS

now, I've got it.

just started again with lcd.[c|h] from COS while trying to minimize changes to those files.

Offline

 

# 7   2009-04-06 14:38:08 LCD Display without CircleOS

pisi
Member
Registered: 2009-02-19
Posts: 17

Re: LCD Display without CircleOS

Hello,

I'm still struggling with the LCD stuff.

What ist the following code from LCD_ST7732S_Controller_init from lcd.c doing?

        WriteCOM(0xf8);   //cmd 0xf8,dat 0x06; LOAD
        WriteData(0x06);  //SLEEP OUT LOAD DEFAULT

I can't find the 0xf8 command in the st7732 datasheet.
(http://www.sitronix.com.tw/sitronix/SAS … v1.5.1.pdf)

Offline

 

# 8   2009-04-06 16:20:09 LCD Display without CircleOS

kubark42
Member
Registered: 2009-02-13
Posts: 46

Re: LCD Display without CircleOS

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. wink (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.

Kenn

Last edited by kubark42 (2009-04-06 16:23:56)

Offline

 

# 9   2009-04-06 16:23:24 LCD Display without CircleOS

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: LCD Display without CircleOS

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...

Offline

 

# 10   2009-04-06 16:26:14 LCD Display without CircleOS

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: LCD Display without CircleOS

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...

Offline

 

# 11   2009-04-06 16:41:38 LCD Display without CircleOS

pisi
Member
Registered: 2009-02-19
Posts: 17

Re: LCD Display without CircleOS

Nachdem ich folgende Dateien zum Projekt hinzugefügt hatte, verschand mein mysteriöses Problem (s.o.).

stm32f10x_fsmc.c
stm32f10x_gpio.c
stm32f10x_nvic.c
stm32f10x_rcc.c

Offline

 

# 12   2009-04-06 16:49:27 LCD Display without CircleOS

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: LCD Display without CircleOS

Nachdem ich folgende Dateien zum Projekt hinzugefügt hatte, verschand mein mysteriöses Problem (s.o.).

What do you mean ?

Offline

 

# 13   2009-04-06 18:20:56 LCD Display without CircleOS

pisi
Member
Registered: 2009-02-19
Posts: 17

Re: LCD Display without CircleOS

oops. sorry.

adding those four files to the project resolved the mysterious problem i had. (described above)

but i don't understand why it compiled in the first place.

Offline

 

# 14   2009-04-07 06:40:20 LCD Display without CircleOS

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: LCD Display without CircleOS

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.

Offline

 

# 15   2009-04-09 22:13:22 LCD Display without CircleOS

kubark42
Member
Registered: 2009-02-13
Posts: 46

Re: LCD Display without CircleOS

Francis :

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

Offline

 

# 16   2009-04-11 19:30:17 LCD Display without CircleOS

kubark42
Member
Registered: 2009-02-13
Posts: 46

Re: LCD Display without CircleOS

Well, I'd like to add the zip with the complete Ride7 project, but I can only post images. Can the board be changed to allow us to post files, too?

Offline

 

# 17   2009-05-17 06:26:34 LCD Display without CircleOS

wldmk1
New member
Registered: 2009-05-03
Posts: 1

Re: LCD Display without CircleOS

Hello, I am also trying to get the LCD working without circle os, it would be helpful if anyone could share their solution with me?

Offline

 

# 18   2009-05-18 06:31:03 LCD Display without CircleOS

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: LCD Display without CircleOS

A simple solution consists in taking the CircleOS project, then removing the other parts.

Offline

 

# 19   2009-05-19 08:06:08 LCD Display without CircleOS

kubark42
Member
Registered: 2009-02-13
Posts: 46

Re: LCD Display without CircleOS

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.

Offline

 

# 20   2009-05-19 09:38:06 LCD Display without CircleOS

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: LCD Display without CircleOS

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.

Offline

 

# 21   2009-05-19 13:35:13 LCD Display without CircleOS

kubark42
Member
Registered: 2009-02-13
Posts: 46

Re: LCD Display without CircleOS

I hadn't realized I could post files. The only option I'm given is to post images, so I just assumed that that meant that other files were off limits.

As for the projects, since things aren't quite ready yet, I would hesitate to post the cyclometer project. I will certainly do it once done, though.

Offline

 

# 22   2009-05-19 14:16:38 LCD Display without CircleOS

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: LCD Display without 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.

Offline

 

# 23   2009-05-19 14:22:58 LCD Display without CircleOS

kubark42
Member
Registered: 2009-02-13
Posts: 46

Re: LCD Display without CircleOS

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?

Offline

 

# 24   2009-06-25 11:24:35 LCD Display without CircleOS

hairykiwi
New member
From: Ledbury, UK
Registered: 2009-05-31
Posts: 9

Re: LCD Display without CircleOS

kubark42 :

Francis :

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?

Many thanks,
Hamish

Offline

 

# 25   2009-06-26 16:42:09 LCD Display without CircleOS

kubark42
Member
Registered: 2009-02-13
Posts: 46

Re: LCD Display without CircleOS

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.

Last edited by kubark42 (2009-06-26 16:42:43)

Offline

 

Board footer