Graphic display

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Graphic display

Post by Jan Lichtenbelt »

Using a small messuring panel, I found that the graphic LCD displays (gLCD) of Matrix Multimedia are to large.

Fortunately the Olimex Nokkia 6610 LCD display can be sold separately. With the voltage shifting buffers 74HC4050D and 3V3 voltage regulator this graphic display can be used in connection with a PIC microcontroller. I bought a graphic display with sticker GE-8, which means there is an EPSON controller used for this gLCD (sticker GE-12 is a Phillips controller).

I tried to use the flowcode to manage this gLCD. The flowcode used are examples on internet of both the EB043 and the EB058 board. That means both standard options of Flowcode were tested to control the gLCD, however without succes. I shaw only some blincking of the blue background colour.

How can help me to get this Olimex gLCD with Epson controller to work in connection with a PIC microcontroller?

Thanks

Jan Lichtenbelt

User avatar
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: Graphic display

Post by Benj »

Hello Jan,

If you can find out exactly which Epson chip is used as the controller for the display the there should be a good datasheet for that controller. If you then use the datasheet and the existing component code fr reference then it should be fairly straight forward to create a driver for your own display. GLCD driver code is always a bit daunting and complex but if you start off at the bus level eg sending signals via SPI and take it from there then you should be ok.

User avatar
Steve
Matrix Staff
Posts: 3434
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: Graphic display

Post by Steve »

Jan,

Can the EB057 module (as used in the EB058 E-block) be used on your measuring panel, or is this also too large?

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: Graphic display

Post by Jan Lichtenbelt »

Dear Ben,

I only know the sticker is GE8. I do not know how to find which Epson driver is used exactly. Is there a way to find it? (on the Olimex board I can not see even the chip).

Kind regrads

Jan
--------------------------
Dear Steve,

The EB057 seems to me a little bit larger compared to the Olimex board. Probably it can be used. Can the EB057 be delivered separately? Or can it be devided from the EB058 block, without damage?

Kind regards

Jan

User avatar
Steve
Matrix Staff
Posts: 3434
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: Graphic display

Post by Steve »

Yes - we sell the EB057 separately.
http://www.matrixmultimedia.com/product ... D%20Module

And yes, it can be removed from an EB058 E-block without problem.

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Graphic display EB057/58 connections

Post by Jan Lichtenbelt »

Dear Steve/Ben

Today the E-block EB057 arrived. But I do not understand the connections. Or better said I miss the reset.
The Circuit diagram of EB057/058 *) shows the 4 connections: CS Chip Select, SCK Serial Clock, MISO Master In-Slave Out and MOSI Master Out-Slave In. As I understand it correctly MISO will not be used and MOSI is the data input from the PIC microcontroller to the gLCD. What I'm missing is the RST (Reset) connection. The connections to the Sub D connector are for 16F88 microcontroller are: CS 1, SCK 6, MISO 3, MOSI 2 (numbering from 1-9).

The Flowcode V4 example, from http://www.matrixmultimedia.com/Flowcode3a-X.php, like 1. 3D Text Example, see attachment, shows the following connections: B3 Reset, B2 Chip Select, B1 Clock and B0 Data. It may be clear that this does not fit without some additional information.

Questions:
1) What to do with the Flowcode Reset, while EB057/058 does not have a reset connection?
2) Is it correct that MOSI on the EB057/058 must be connected to "Data" in the Flowcode?
3) Is it correct that MISO on the EB057/058 is not used in the Flowcode?

Thanks already for your help.

Jan Lichtenbelt

*) Note: See EB058-30-1-.pdf, http://www.matrixmultimedia.com/product ... PHPSESSID=
Attachments
1. 3D Text Example.fcf
(8 KiB) Downloaded 547 times

User avatar
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: Graphic display

Post by Benj »

Hello Jan,

The next release of Flowcode will fix this issue.

To start with you will need the latest gLCD component code file which is available from here. Copy the file into your "Flowcode v4\Components" directory and overwrite the existing file.
PIC_gLCD.c
(32.57 KiB) Downloaded 602 times
The component connections shown for the component are incorrect. Only the CS signal is actually used by the code. The other signals are dictated by your device and the pins are marked on the chip diagram or device datasheet as SCK, SDI and SDO.

The MISO signal (SDI) is not specifically required as currently there is no data that comes back from the display to the microcontroller. However it is good to use it for the board because it is assigned to the SPI peripheral and therefore you cannot use it for normal I/O operation while the gLCD is operational.

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: Graphic display

Post by Jan Lichtenbelt »

Dear Ben,

Sorry, but it is hard for me to follow your advices as far as the exact the connections are concerned.

You said, CS(Chip Select) is the only code used. Does that means that I need only to connect the CS of the EB057 to the microchip (eg. 16F88) and can deny all other connections? If more connections are needed, please give the EB057 connectors which has to be connected to the microcontroller 16F88 pins B0, B1, B2 and B3 with the flowcode B0=Data, B1=SCK, B2= CS and B3=Reset.

regards,

Jan

User avatar
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: Graphic display

Post by Benj »

Hello Jan,

Here is a picture showing how to wire up the EB057 gLCD when using a 16F88.
Attachments
gLCD.JPG
gLCD.JPG (17.46 KiB) Viewed 19792 times

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: Graphic display

Post by Jan Lichtenbelt »

Ok Ben,

it works!

Thanks

Jan

User avatar
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: Graphic display

Post by Benj »

Hi Jan,

Thats great, thanks for letting me know.

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: Graphic display

Post by Jan Lichtenbelt »

Dear Ben,

I have still one question. The hardware does not use the RESET, while the RESET is programmed in the software. In the flowcode the RESET can not be set "not connected" (this will give an error). The result is that one input/output pin of a microcontroller is blocked by the software. And that is a pitty.

The questions is what is the reason to use the RESET in the Flowcode and the software? If not used, will this RESET remains in a future version? And is there now a possibility to use the RESET pin for other input/output functions?

With kind reagards

Jan Lichtenbelt

User avatar
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: Graphic display

Post by Benj »

Hello Jan,

The pins shown in the component connections window other then the chip select pin are not called by the C code and as such can be used by any other Flowcode component or a normal input or output icons etc. Note that you may get a warning if the pin is assigned to another component but this is nothing to worry about. Future releases of Flowcode will contain a fix to the gLCD component where if the EB057 module is selected the only pin in the component connections window will be the chip select pin.

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Colors of Graphic display

Post by Jan Lichtenbelt »

Colors with the RGB settings are shown in the picture attached. Horizontal red changing from 0 to 7. Vertical from top to bottom, green from 0 to 7. This is repeated for each blue settings of 0 to 3 from top to bottom.
Attachments
gLCD RGB.jpg
gLCD RGB.jpg (191.62 KiB) Viewed 19731 times
Last edited by Jan Lichtenbelt on Sat Oct 09, 2010 12:57 pm, edited 1 time in total.

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Transparent and Solid Drawbox of Graphic display

Post by Jan Lichtenbelt »

Drawbox has two parameters, Transparent and Solid. That means four combinations. See the picture with four boxes, all first filled with the number 100 and there after used Drawbox(...Transparent,Solid). The foregroundcolor is black (RGB=000) and the backgroundcolor is yellow (RGB=770).
Transparent=1 gives the same results for Solid is 0 or 1, showing still the original number. Transparent=0 depend on the Solid value, as shown.

What if you want to delete a number by means of a box, without any black, just yellow. Change the foregroundcolor into the blackgroundcolor, in the example equal to yellow (SetforeColour(7,7,0)) before drawing the box. Don't forget to set the foregroundcolor back to the original color (here black) after drawing the box.

Good luck
Attachments
gLCD Drawbox.jpg
gLCD Drawbox.jpg (147.59 KiB) Viewed 19728 times

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: Graphic display

Post by Jan Lichtenbelt »

I have a question: I moved the first 5 gLCD macro calls from the main macro into the init macro. The result is that in both cases the simulation mode works correctly, but the program in the microcontroller (PIC16F88) does not work correctly if these gLCD macro are placed in the INIT macro. I do not understand this. Who can help?

Jan Lichtenbelt

attached:
1) Tachometer-V3.fcf with the gLCD macros in the main macro (works correctly)
2) Tachometer_V4.fcf with the gLCD macros in the init macro (works not correctly in the microcontroller)
Attachments
Tachometer_V4.fcf
(18.11 KiB) Downloaded 443 times
Tachometer_V3.fcf
(18 KiB) Downloaded 376 times

User avatar
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: Graphic display

Post by Benj »

Hello Jan,

After your software macro you are calling the hardware init macro again which will have the effect of resetting the display. If you remove this second call to the init component macro then the program should run correctly.

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: Graphic display

Post by Jan Lichtenbelt »

Dear Ben,

You are right. I removed the double maco calls, but the result is the same. That means correct simulation but incorrectly microcontroller working. What happens?

Jan

Attached: improper working program
Attachments
Tachometer_V4a.fcf
(17.34 KiB) Downloaded 402 times

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: Graphic display

Post by Jan Lichtenbelt »

OK, I found the problem. Moving the gLCD macros from the main macro to the init macro introduces a stack overflow. That can happen.

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: Graphic display

Post by Jan Lichtenbelt »

Dear Ben,

I have a question about the connections of the gLCD. In some windows here above, you mentioned to use B0=Chip Select, B2=Data and B4=(System) Clock. That works. However Flowcode 4 gives the possibility to change the pin settings to other pins as B0,B2 and B4. I tried it, like e.g. B0= Reset, B1=CS, B2= Clock and B3=Data, but that fails. I tried to find the reason in C, but I got lost. Although it is not essential I'm interested the pin selection is unique in this case.

kind regards

Jan Lichtenbelt

User avatar
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: Graphic display

Post by Benj »

Hello Jan,

The only pin that is used from the component connections when using the EB057 or EB058 is the chip select pin. None of the other pins are used by the code. This was just a way of getting the updated component out quickly. The new version of the component that will be released in the next update version will only present the chip select pin in the component connections window when using the EB057 or EB058 displays.

Hope this makes sense.

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: Graphic display

Post by medelec35 »

I have not long receive my gLCD (EB058). It had loads of potential for being a great piece of Kit, but im still at the 'Now used for the first time, so Im confused state' :lol:

The flowcharts pasted on this thread e.gTachometer_V3.fcf (thanks for sharing Jan) just produce a solid light blue box covering 100% of the background. Then over the top of light blue background a large black solid square box is drawn covering 99.7 of the light blue, and and writing that's underneath. Do these work for anyone else, who had updated to V4.5 please?

Here is what I'm trying to acheive but not getting far, if anyone could be so kind to help me out, I would appreciate it very much.
1)With a yellow background, just write the words Matrix Multimedia on two separate lines in red font.
Would of thought using SetForeColor to 7, 0, 0 would have done that, but no, text is in black (at this stage I'm not saying there are bugs, as it could easily be something simple I'm doing wrong!)
Below the the text,evey 200ms I would like start off with 0 and keep counting by 1 until 32767 is reached, then start back to 0.
I have tried overwriting the numbers with a box but this is not working at all. I just get solid small boxes the size the font should be.
Again it's probably my lack of understanding.

I have attached the flowchart for anyone to laugh....opps I mean look at. If some one could help me get it working that would be fantastic!
Also what would be ideal is a font/line colour chart. similar to the one Jan posted picture of that would give the three number combinations for a range of colours.
Or even better you click on the colour (form the whole spectrum of colours) and all three values are given just like in the picture below:
Colours1.jpg
Colours1.jpg (40.74 KiB) Viewed 18751 times
Hmm, wonder if I can use this but just work out the equivalent ratios from 0 to 7 for red green and blue?

Regards
Martin
Attachments
RED Text & Cout Example.fcf
(8 KiB) Downloaded 351 times
Martin

User avatar
Steve
Matrix Staff
Posts: 3434
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: Graphic display

Post by Steve »

There does seem to be a problem with the gLCD simulation since the update to V4.5. We are working on a fix. Sorry for the inconvenience.

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: Graphic display

Post by medelec35 »

Thanks for letting me know Steve.
At least I know its not me being daft (there could still be a bit of element to it as well! Lol :) )
Here is a though for when its all working, would you mind giving your opinion on it please.
It you run Paint (I’m using the one shipped with windows 7)
Then click Edit colors.
Click inside the colour spectrum block to desired colour e.g. orange, then move the slider on the right until correct brightness I achieved.
Divide each number given within colour by 255 then x 7. Place these numbers in the SetForeColor & SetBackColor postions?
Would this give the correct font or background colour?
Colour chart.jpg
Colour chart.jpg (53.62 KiB) Viewed 18739 times
Eg for the attachment
Red = 249/255*7 = approx 7
Green = 119/255*7 = approx 3
Blue = 32/255*7= approx 1
If this does work (at this stage I’m not saying it will) then since the colour number range on paint goes from 0 = 255 but on gLCD go from 0 – 7 there will definitely be limitations/differences.

Martin
Martin

User avatar
Steve
Matrix Staff
Posts: 3434
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: Graphic display

Post by Steve »

Please see here for a fix for the gLCD component (and some other fixes):
http://www.matrixmultimedia.com/mmforum ... =29&t=8700

Post Reply