4Dsystem 1.7' uOLED-160G2 OLED communication issue

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
quazar
Posts: 24
Joined: Sun Jun 04, 2017 6:27 am
Has thanked: 17 times
Been thanked: 2 times
Contact:

4Dsystem 1.7' uOLED-160G2 OLED communication issue

Post by quazar »

Hello all,
I am wondering if a new component have to be created for serial communication to a uOLED-160G2 (GOLDELOX chip) display from 4Dsystems.
I did a few attempts to connect to the display using EB-006-00-9 and the existing library component gLCD_EB075_4D designed for 1.5" OLED display (and a test program EB075_Test.fcfx), however, no luck. Did anyone had a successful communication to uOLED-160G2 using Flowcode?

Can any one advise (or indicate a source) on:
1. How to modify the existing gLCD_EB075_4D "component macros", for example to change the initial baud rate (which currently is set to 57600)?
2. How to view the code embedded in the "initialize macro" of the same component gLCD_EB075_4D and how to modify it?
3. Where I can find a detailed description (datasheet) on the "GLCD (EB075, 4D-Goldelox)" component and how to view/modify the embedded macros?
4. Where to find what the "Initialize macro" actually does, there are no parameters to modify and the description is stating that "the macro have to be called before any other macros are called"?

Any help would be greatly appreciated.
Thank you.

Docara
Posts: 315
Joined: Sun Jun 23, 2013 1:29 pm
Has thanked: 28 times
Been thanked: 61 times
Contact:

Re: 4Dsystem 1.7' uOLED-160G2 OLED communication issue

Post by Docara »

Hi Quazar,

I cant answer your question directly but perhaps I can offer a different direction/thought path for you to accomplish your desired result.

I am looking at 4D systems at the moment, the intelligent displays seem to tick many boxes and if you trawl through the application notes http://www.4dsystems.com.au/appnotes it provides A LOT of useful information even to a non programmer like myself. The 4D Workshop IDE is the way to go but at at first seems limited, but buried under the surface are many useful little things are available even able to include custom widgets.

Anyway back to your question - the way I am looking at my display requirements is to base the communication on VISI and I am using the following link from John Crow http://www.matrixtsl.com/mmforums/viewt ... 26&t=15212 as a basis of development.

4D also provide C routine (libraries) which I am hoping to use in a C block within Flowcode. It is early days for me but I think the way forward is to let 4D workshop do all the donkey work and just let Flowcode handle the 'intelligence' which makes the communication and control display independant (ish)

Hope this helps a little
Matt

quazar
Posts: 24
Joined: Sun Jun 04, 2017 6:27 am
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: 4Dsystem 1.7' uOLED-160G2 OLED communication issue

Post by quazar »

Thank you Matt for your input, any ideas are very welcome.

I did look thru the 4D software: there is a very nice one called "VISI Genie" which is described in the link from John Crow (thank you John for your time and efforts), however, the display model I am using (with Goldelox controller) is not supported.

Back to the serial communication problem:
1. I did receive another display today, the same as indicated in the EB075 (4D Systems, uOLED-128G2).
2. I loaded the example from Matrix (program name: EB075A_v7.fcfx - it works perfect in flowchart simulation) into a PIC16F877A (installed on the EB-006 programmer) and .... no communication... and no reaction on the display.
3. I did change the BAUD_LIST parameter to 9600 in the display component macro to match the OLED display settings, and still no luck.

Not sure what I am missing here...
Did anyone ever tested the component called GLCD (EB075-Goldelox) with "4D Systems, uOLED-128G2" ?
Unfortunately, I could not find a way to see the code inside of the Component macros. Any suggestions?

Can someone, PLEASE, explain what the code in the Initialize Macro does:
// Call Component Macro
// Call Component Macro: gLCD_EB075_4D::Initialise()
FCD_0f441_gLCD_EB075_4D__Initialise();

Thank you very much!
And have a great time with your projects!

quazar
Posts: 24
Joined: Sun Jun 04, 2017 6:27 am
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: 4Dsystem 1.7' uOLED-160G2 OLED communication issue

Post by quazar »

Hello all,
An update:
I did manage to communicate to the 4D uOLED (1.5" and 1.7" displays) ising the UART component, and it works as intended.
Now, I can conclude that the existing GLCD EB075 GOLDELOX component is malfunctioning.

I would love to be able to use it, so, can any one indicate on how to troubleshoot an fix it?
A link for creating LCD components would be great.
Thank you.

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: 4Dsystem 1.7' uOLED-160G2 OLED communication issue

Post by Benj »

Hello,

It's likely the 4D Goldelox protocol has changed slightly over the years and therefore broken the Flowcode component, this certainly happened with the Picaso displays though this should be fixed now.

If you have working macros using the UART component then it should be fairly easy to wrap these macros up into a new component.

By including the gLCD Base component you can add simulation to your component.

I'll add it to the list to investigate the new Goldelox protocol and see if there are any major differences that have crept their way in and that we can fix in the existing component.

Edit. having a quick look now and yes the protocol has completely changed.

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: 4Dsystem 1.7' uOLED-160G2 OLED communication issue

Post by Benj »

Right I've made a start and hopefully the following will now work as expected.

Everything is significantly different now so it's not surprising that it wasn't working before.

Please note you will need the latest version of Flowcode 7 to use this component.

I've hopefully fixed the following macros so far.

Initialise, ClearDisplay, DrawLine, Print, PrintNumber.

Please note that the Print and PrintNumber now use column and line coordinates rather than X and Y pixel coordinates, but the simulation will still use pixel coordinates.

I've also exposed the Baud rate as this is now set from the 4D workshop software.
gLCD_EB075_4D.fcpx
(22.24 KiB) Downloaded 473 times
Let me know how you get on.

quazar
Posts: 24
Joined: Sun Jun 04, 2017 6:27 am
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: 4Dsystem 1.7' uOLED-160G2 OLED communication issue

Post by quazar »

Hello Benj,
Thank you for very much your hard work! I did notice that you are very busy and I am very pleased to get your support!
First, I just started to use Flowcode7, zero - experience. I did like the interface - quick to program and easy to test and troubleshoot.
Therefore, I could not figure out yet, on how to edit component macros, how to get to the C code and alter it. I would love to get a hint on how to do it. I did watch the LED component creation video, but does not contain any macros examples. I will keep reading/looking.
I did TEST the NEW component you created on "uOLED-160G2" hardware.
Some observations:
1. The Baud speed does not get updated: even if changed, it stays at 57600 (and confirmed working at 57600).
2. The simulation coordinate system will have to be updated somehow to match the row and column as you indicated in your notes. (Please see the attached picture and thanks for the details)
uOLED-160G2.PNG
(389.25 KiB) Downloaded 13042 times
3. When trying to draw the square (I used the altered Matrix EB075_Test program
EB075_Test_Fixed_component.fcfx
(8.36 KiB) Downloaded 467 times
) it does not show on the screen.
4. Just a note: 4D Systems recommends a 4 sec delay after the initialize command.
Please feel free to correct me if I have wrong statements.

Have a great day!

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: 4Dsystem 1.7' uOLED-160G2 OLED communication issue

Post by Benj »

Thanks for letting me know.

I have had another pass through the component and hopefully have now fixed the text offset issue so that the display and the simulation will match up.

Hopefully everything should now work as expected but let me know how you get on.
gLCD_EB075_4D.fcpx
(21.62 KiB) Downloaded 447 times

quazar
Posts: 24
Joined: Sun Jun 04, 2017 6:27 am
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: 4Dsystem 1.7' uOLED-160G2 OLED communication issue

Post by quazar »

hello Benj,
forgot to mention:
changing the size of lettets and numbers does not work. the fonts will stay at initial "0" size, regardless of the entered parameter.

Thank you again.

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: 4Dsystem 1.7' uOLED-160G2 OLED communication issue

Post by Benj »

Thanks for letting me know. This should hopefully be fixed now.
gLCD_EB075_4D.fcpx
(21.67 KiB) Downloaded 452 times

quazar
Posts: 24
Joined: Sun Jun 04, 2017 6:27 am
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: 4Dsystem 1.7' uOLED-160G2 OLED communication issue

Post by quazar »

Thank you Benj!!!
I appreciate the speed of your response.
I did test the latest component you created:
I did draw some graphics and printed some fonts to test.
On the attached picture on the left: is the real display, and on the right: the simulation screen.
Capture.PNG
(326.1 KiB) Downloaded 12966 times
As you can see everything is displaying correctly, just the fonts, which size is multiplied by 2 (the word TEST), are not displayed on the simulation screen, however, it works on the real uOLED-160G2 display.
DisplayImageFromCard() command works as intended too.
(Note: this latest component works only on Flowcode v7.2.1.4. I did try on the older version Flowcode v7.1.1.0 and it does NOT. I am using the old version because in the new one the interrupts simulation is not working any more, and I have to switch between 2 versions for now...)
One more request if I can:
I would like to print bigger fonts (multiply the size (width, height) by 3, or 4, or 5 for example), could you please modify the "Print" and PrintNumber" commands to accommodate the selection of a bigger size multiplier?
And last one: could you, please, describe on how the component modification is done, just a hint, please. Or the original Matrix components are not editable? (I did read on the forum that the CAL functions are, but could not find anything about Components macros editing).

Thank you, and have a great day!

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: 4Dsystem 1.7' uOLED-160G2 OLED communication issue

Post by Benj »

Hi Quazar,

Is there a problem with the filling of the ellipse?

I have now fixed the problem where font sizes other than 0 did not simulate. though sizes over the standard size 3 won't currently simulate.

I've added some more font sizes for the downloadable version for you and these might then eventually make it into the simulation and the other gLCD components.

Standard Fonts
0 = Normal
1 = 2 x Width
2 = 2 x Width and 2 x Height
3 = 2 x Height

Extended Fonts - Currently no simulation
4 = 2 x Width and 3 x Height
5 = 2 x Width and 4 x Height
6 = 2 x Width and 5 x Height
7 = 2 x Width and 6 x Height
8 = 3 x width
9 = 3 x Width and 2 x Height
10 = 3 x Width and 3 x Height
11 = 3 x Width and 4 x Height
12 = 3 x Width and 5 x Height
13 = 3 x Width and 6 x Height
14 = 4 x width
15 = 4 x Width and 2 x Height
16 = 4 x Width and 3 x Height
17 = 4 x Width and 4 x Height
18 = 4 x Width and 5 x Height
19 = 4 x Width and 6 x Height
20 = 5 x width
21 = 5 x Width and 2 x Height
22 = 5 x Width and 3 x Height
23 = 5 x Width and 4 x Height
24 = 5 x Width and 5 x Height
25 = 5 x Width and 6 x Height
26 = 6 x width
27 = 6 x Width and 2 x Height
28 = 6 x Width and 3 x Height
29 = 6 x Width and 4 x Height
30 = 6 x Width and 5 x Height
31 = 6 x Width and 6 x Height
gLCD_EB075_4D.fcpx
(22.32 KiB) Downloaded 384 times
Components are not editable without the component project source file. We used to allow edits but it ended up being a support nightmare as you had to go through each and every component in a program to check for edits which could be causing problems. At the moment the only way to add your own functionality is to create your own set of components or request changes.

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: 4Dsystem 1.7' uOLED-160G2 OLED communication issue

Post by Benj »

This component will add simulation for the new font sizes 4-31.
Base_GLCD.fcpx
(9.13 KiB) Downloaded 392 times

quazar
Posts: 24
Joined: Sun Jun 04, 2017 6:27 am
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: 4Dsystem 1.7' uOLED-160G2 OLED communication issue

Post by quazar »

Hi Benj,
Thank you very much! I appreciate it!
I did a small project to estimate the size and position of the fonts. Thank you for additional font size multipliers!
Much easier and faster to program now. Please see the hardware and simulation pictures side by side (near perfect!).
I am also displaying a picture of a fan from a SD card which obviously is not showing on the simulation. I am using the 160x128 display, so, I just increased the value on the existing component.
uOLED-160G2_Compare.PNG
(550.98 KiB) Downloaded 12874 times
Regarding the component creation, would you have the source code for an old graphical display, so I can learn how it was made?
Thanks again.
Have a great day!

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

Re: 4Dsystem 1.7' uOLED-160G2 OLED communication issue

Post by Zane »

Hi,

If you go to the 4D web site and select the product you are looking at, there is a data sheet that has the serial command set for the given display. If you look at this post there is a component that i have created so you can see how it is constructed. There are no simulation macros included in this component

http://www.matrixtsl.com/mmforums/viewt ... 5&start=26

I hope this is of some help.

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

Re: 4Dsystem 1.7' uOLED-160G2 OLED communication issue

Post by stefan.erni »

Hi Ben

I saw the additional fonts for the 4D Display. Is it possible to have some bigger fonts for the STM32F469 Disco Touchscreen?

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: 4Dsystem 1.7' uOLED-160G2 OLED communication issue

Post by Benj »

Hello,

Yes no problem with that, here you go.
gLCD_STM32F469NI.fcpx
(10.08 KiB) Downloaded 368 times

sundgau
Posts: 78
Joined: Mon Sep 26, 2011 4:18 pm
Has thanked: 5 times
Been thanked: 10 times
Contact:

Re: 4Dsystem 1.7' uOLED-160G2 OLED communication issue

Post by sundgau »

Hello benj,
I have many trouble with GLCD 4d Goldelox
My 4D 128-g2 display on an EB075 board works with a 16F877A in "channel" mode but can not be run in "software" mode; the transmission speed is limited to 4800baud.
Screen Shot 02-19-18 at 04.34 PM.JPG
Screen Shot 02-19-18 at 04.34 PM.JPG (117.06 KiB) Viewed 17864 times
Screen Shot 02-19-18 at 04.22 PM.JPG
Screen Shot 02-19-18 at 04.22 PM.JPG (124.99 KiB) Viewed 17864 times
With an ECIO40 on the portC with a redirection (patch) of RES on RC0; I can not operate it in "software" mode with the good speed of 9600baud. Maybe incompatible with the ECIO40?

I also tried with an AllCode with the following connections (see photo) but unsuccessful.
Do you want to give me a track so that I can progress and integrate it is GLCD in my project with an ECIO40 and an AllCode.
Screen Shot 02-19-18 at 04.27 PM.JPG
Screen Shot 02-19-18 at 04.27 PM.JPG (49.61 KiB) Viewed 17864 times
thank you in advance

Bruno

sundgau
Posts: 78
Joined: Mon Sep 26, 2011 4:18 pm
Has thanked: 5 times
Been thanked: 10 times
Contact:

Re: 4Dsystem 1.7' uOLED-160G2 OLED communication issue

Post by sundgau »

Hello, everybody,
No one to answer my problem; how to change the transmission rate to 9600baud instead of 4800baud compatible with the glcd128g2 in "software" mode for the UART channel.
The display works very well with an ECIO40 in "channel" mode for the UART channel; it is indeed free to use! But can not use it with my AllCode because the UART channel is reserved for bluetooth!
 
It would be interesting also to be able to use the function "injector" for the simulation.

Thank you for helping me!

Bruno

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: 4Dsystem 1.7' uOLED-160G2 OLED communication issue

Post by Benj »

Hi Bruno,
how to change the transmission rate to 9600baud instead of 4800baud compatible with the glcd128g2 in "software" mode for the UART channel.
The display works very well with an ECIO40 in "channel" mode for the UART channel; it is indeed free to use! But can not use it with my AllCode because the UART channel is reserved for bluetooth!
On the Formula AllCode device UART channel 1 is used for the Bluetooth communications. Hardware channels 2, 3 and 4 are free for you to use as you wish.

quazar
Posts: 24
Joined: Sun Jun 04, 2017 6:27 am
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: 4Dsystem 1.7' uOLED-160G2 OLED communication issue

Post by quazar »

Hello everyone,
I am trying to connect using the ECIO40P16 controller to the
4Dsystem 1.7' uOLED-160G2 OLED display.
So far, I can display only a little circle.
All other print commands are ignored.

If anyone could provide an example of the working communication in hardware (in simulation mine works fine) that would be great!!!
I did use F0 and F1 for RX and TX,and D0 for display Reset.
I added a 3.3v to 5v level shifter, but no luck...

Benj, is it possible to add a function to the existing display library component to read the command acknowledgement from the display and a timeout function to allow to jump to anothe subroutine, if no responce from the display would be received in 2 sec, for example?
Thank you very much!!!

quazar
Posts: 24
Joined: Sun Jun 04, 2017 6:27 am
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: 4Dsystem 1.7' uOLED-160G2 OLED communication issue

Post by quazar »

Please see my other post for reference:
viewtopic.php?p=106929#p106929

Post Reply