How initializing a display i2c winstar ??

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
tello
Posts: 94
Joined: Wed Jan 16, 2013 11:37 am
Has thanked: 56 times
Been thanked: 16 times

How initializing a display i2c winstar ??

Post by tello »

Hi Guys.

I have an I2C display model Winstar WO2002A-TFH-AT # with the ST7036 IC control.
I tried everything but I get to initialize properly.
The datasheet is according initialization (Initialize 5V.JPG). But as I write this with the component display I2C ?? ..

Thank you
Attachments
WO2002A-TFH-AT.pdf
datasheet display
(1.06 MiB) Downloaded 558 times
Initialize display 5V.jpg
Initialize display 5V.jpg (48.65 KiB) Viewed 12375 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: How initializing a display i2c winstar ??

Post by Benj »

Hello,

If you look at page 16 of the datasheet then this lists the format of the I2C commands. Use the I2C Master component to output the I2C data.

If your new to I2C then this blog post is a good starting point.

http://www.matrixtsl.com/blog/simplifie ... c-and-spi/

tello
Posts: 94
Joined: Wed Jan 16, 2013 11:37 am
Has thanked: 56 times
Been thanked: 16 times

Re: How initializing a display i2c winstar ??

Post by tello »

Thanks Benj

I'm working on it now.
I'll keep you informed

tello
Posts: 94
Joined: Wed Jan 16, 2013 11:37 am
Has thanked: 56 times
Been thanked: 16 times

Re: How initializing a display i2c winstar ??

Post by tello »

Hi guys
As I mentioned last week I have had serious problems to initialize the display for I2C.
Initialization is right now and I can write to the display by component I2C_Master, but I would like to do with the component that brings Flowcode6 I2C display.
How can I do this??

Attachment program initialization if anyone need any help as I've needed.

Thank you
Attachments
DISPLAY_20X4_I2C_23k22.fcfx
(19.04 KiB) Downloaded 478 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: How initializing a display i2c winstar ??

Post by Benj »

Hello,

Please find attached an exported component which should simulate and the source code for the component.

The .fcpx file will need to be copied to your "Flowcode 6/Components" directory for the component to appear in the list.
gLCD_ST7036_i2c.fcpx
(7.74 KiB) Downloaded 502 times
glcd_ST7036_I2C.fcfx
(86.09 KiB) Downloaded 457 times
Let me know how you get on.

tello
Posts: 94
Joined: Wed Jan 16, 2013 11:37 am
Has thanked: 56 times
Been thanked: 16 times

Re: How initializing a display i2c winstar ??

Post by tello »

Hey guys, anyone know for LCD driver is developed I2C component display.

Thank you

tello
Posts: 94
Joined: Wed Jan 16, 2013 11:37 am
Has thanked: 56 times
Been thanked: 16 times

Re: How initializing a display i2c winstar ??

Post by tello »

Hi Benj.

I've been testing but I can not make display work properly, I can initialize but then appear strange characters.

You can send I2C Display component to be able to modify the macros and adapt to my needs ST7036 driver ??

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: How initializing a display i2c winstar ??

Post by Benj »

Hi Tello,

Yes no problem here is the component source code.
LCD I2C.fcfx
(44.77 KiB) Downloaded 527 times
glcd_SSD1306_I2C.fcfx
(102.92 KiB) Downloaded 479 times
Let me know how your getting on.

tello
Posts: 94
Joined: Wed Jan 16, 2013 11:37 am
Has thanked: 56 times
Been thanked: 16 times

Re: How initializing a display i2c winstar ??

Post by tello »

Hi guys, I am very happy today.

With the help of Benj and some of you have almost finished component Display driver with I2C 24x20 SSD1803A and ST7036.
I just need a last step, I can not export the component because I have an error. The program and a screenshot of the error are here.
I need one last help because I can not find the solution, I am delighted to share with you the new component.

Thank you very much to all.
Attachments
LCD 4X20 I2C.fcfx
(26.96 KiB) Downloaded 379 times
display.jpg
(4.02 MiB) Downloaded 2179 times
COMPONENT_EXPORT.jpg
(219.79 KiB) Downloaded 2179 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: How initializing a display i2c winstar ??

Post by Benj »

Hello,

You need the properties window up and then to click on an empty part of the panel to bring up this. You can also do this by using the drop down menu at the top of the properties window and selecting the root object.
LCDExp1.jpg
LCDExp1.jpg (25.57 KiB) Viewed 11457 times
Next click the Interface Manager drop down.

The Clear macro has a simulation override which does not exist in the project. Change this from ClearSim to Clear and this error should disappear. Note there are other macros that share this problem.
LCDExp2.jpg
LCDExp2.jpg (43.12 KiB) Viewed 11457 times
The simulation override macro is used to allow you to create code for the download and seperate code that runs when simulating.

When you are done in the interface manager you also need to go into the settings manager.

In the Standard options change the name to suit your new component and allow you to identify it, you can also change the manufacturer etc if you wish.

Finally and more importantly you need to change the GUID in the advanced tab. Click the Edit button by the GUID setting and in the new window that appears click New next to the existing key. This allows you to create a new component rather than overwriting the existing lcd_i2c component.
LCDExp3.jpg
LCDExp3.jpg (94.18 KiB) Viewed 11457 times
You should then be able to export your component as a new component.

tello
Posts: 94
Joined: Wed Jan 16, 2013 11:37 am
Has thanked: 56 times
Been thanked: 16 times

Re: How initializing a display i2c winstar ??

Post by tello »

Good morning.
I have already 4x20 I2C display component exports. But I have three questions.

1- When you export the component blocks shown me that I do not need are CalcI2C component. As you can take from appearing in the exported component ??.

2. When sending several commands 13,67ms there is a time between the end of one and the beginning of the next command, you can make that shorter time ??
The message we have to send is too long and need to put less time between commands.

3- How can I concatenate two strings ?? , for example:

S SCR_00 String [20] ""
S SCR_01 String [20] "Value 1"
S SCR_02 String [20] "Value 2"

SCR_00 = SCR_01 + SCR_02 need to concatenate Strings SCR_01 and SCR_02

How can I do it??

Thank you
Attachments
SendCommand.jpg
(255.05 KiB) Downloaded 2077 times
componente_4x20.jpg
componente_4x20.jpg (38.55 KiB) Viewed 11372 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times

Re: How initializing a display i2c winstar ??

Post by LeighM »

Hi
I do not know about the delays, are they in your code?

You can concatenate two strings like this ...

Code: Select all

str1 = ""
str2 = "Value 1"
str3 = "Value 2"
str1 = str2 + str3
strings.jpg
strings.jpg (7.65 KiB) Viewed 11369 times
It looks like you might have "inherited" the sub-component macros, like so ...
inherit.jpg
inherit.jpg (34.11 KiB) Viewed 11369 times
Un-tick the box to not inherit them.

Hope that helps
Leigh

Post Reply