The GLCD ST7565R component on LoRa Mote board

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

Moderator: Benj

streammaster
Posts: 78
Joined: Mon Jul 31, 2017 11:14 am
Has thanked: 7 times
Been thanked: 13 times
Contact:

The GLCD ST7565R component on LoRa Mote board

Postby streammaster » Tue Jun 05, 2018 11:09 am

Hi guys,

I'm using the FC for more then 3 years by now, however I never had any luck getting FC graphic display components working with my real hardware. I was pushed to write my own driver every time. This is not so hard, but to make own component with full and precise simulation is actually quite painful in comparison to 'normal coding' in FC.
I'm determine this time to get it now working with FC8 when I had purchased components again.

I'm trying to make a project using FC8 for the 'Microchip LoRa mote' board hardware. On the board, apart of other components such are some sensors and LoRa modem, are the PIC 18LF45K50 and parallel graphic display ERC12832-1 based on ST7565R controller. The connection is direct to PIC and there is no reason why this shouldn't work. However it doesn't. I posted the post on the forum more then year ago on the same subject but there was no resolution. I hope this time we will have a bit more luck, now when FC8 is out.

So when i compile the project using the MPLAB IDE which has the Microchip display driver, it works no problem, but if i use FC8 component the display is dead.

So I have request, could you please enable the display resolution change? The ERC12832 is 128 x 32 pixels.
I would happily modify the component but we, as ordinary users, have no access to the purchased FC components to change or modify them.
I believe the display component library should be based on controller model (not on actual display model) and the configuration should be configurable to cover controller features. This would help. Also you should publish actual documentation and specification which you used developing component. That would be an excellent reference and help for component.

So back to helping me out: do you see what may be the problem here? Is it the mismatch in resolution? Looking the source code for Microchip LCD driver there is nothing relevant in initialization or writing a simple integer number using the resolution parameter. Is this the case with FC component?

Could you make resolution configurable for this (and all other) components? I know that some display have this configurable.

Here is the relevant board schematic,
Motu board sch.PNG
Motu board sch.PNG (218.95 KiB) Viewed 2178 times

and component pins mapping.
FC8 display configuration.PNG
FC8 display configuration.PNG (23.5 KiB) Viewed 2178 times

I also attached the current project for the hardware board where in main i removed actual application and replaced with initialization of the LCD and some LED flashing in the loop.
Mote_LoRa_V1-2.fcfx
(124.29 KiB) Downloaded 65 times


If you need to use the 18LF45K50 inside the project you can find the configuration, and some additional configuration which is required for this model of PIC to work with internal oscillator and USB port. This is actually tested and working.
For the rest of the functions inside the project i relay didn't have chance to test it on real hardware as i become stuck with the display.

The board user manual can be downloaded from Microchip web: http://ww1.microchip.com/downloads/en/D ... 0Guide.pdf


Regards,

Igor

kersing
Valued Contributor
Valued Contributor
Posts: 1907
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 552 times
Been thanked: 1064 times
Contact:

Re: The GLCD ST7565R component on LoRa Mote board

Postby kersing » Tue Jun 05, 2018 6:44 pm

This displays controller can be connected to the micro with two different interface modes, the Flowcode component uses the ‘wrong’ mode for your hardware. Changing the settings will not solve the issue, the low level driving code requires changing.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

streammaster
Posts: 78
Joined: Mon Jul 31, 2017 11:14 am
Has thanked: 7 times
Been thanked: 13 times
Contact:

Re: The GLCD ST7565R component on LoRa Mote board

Postby streammaster » Wed Jun 06, 2018 1:15 am

Thanks for your answer,
which modes are you talking about?; which 'mode' uses FC and which one is using ST7565R controller? If you talking the 8080/6800 mode then i inserted a switch where i can change the display mode (but it is not solving the problem).
Could you please get a bit more details what low level driving code requires changing?

kersing
Valued Contributor
Valued Contributor
Posts: 1907
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 552 times
Been thanked: 1064 times
Contact:

Re: The GLCD ST7565R component on LoRa Mote board

Postby kersing » Wed Jun 06, 2018 5:41 pm

As you noticed the ST has two modes. I can recall which one FC uses, however it is the wrong one for the display. Set the display mode to the one not used by microchip, then check the connection properties the code should at least initialize the display even when the size does not match.
The low level code I’m referring to is the code to send data and commands to the display. These routines are part of the component.
These users thanked the author kersing for the post:
LeighM (Wed Jun 06, 2018 6:00 pm)
Rating: 5%
 
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
LeighM
Matrix Staff
Posts: 2008
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 480 times
Been thanked: 688 times
Contact:

Re: The GLCD ST7565R component on LoRa Mote board

Postby LeighM » Wed Jun 06, 2018 6:04 pm

I spent some time looking at this today and can confirm that the component uses Motorola 6800 mode.
I tried adding an Intel 8080 mode option but could still not get anything on the display.
I might just try a little longer tomorrow, perhaps interfacing to the Microchip code and see if that gets anywhere.

User avatar
LeighM
Matrix Staff
Posts: 2008
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 480 times
Been thanked: 688 times
Contact:

Re: The GLCD ST7565R component on LoRa Mote board

Postby LeighM » Fri Jun 08, 2018 10:19 am

Thanks to help from kersing I have now fixed the ST7565R component and also added a 68/80 mode switch property,
which has now been successfully tested in 8080 mode with the LoRa mote board.
The text works fine, there are still some issues with line and circle drawing that need further work,
but we will probably push the update out today either way.
These users thanked the author LeighM for the post (total 2):
kersing (Fri Jun 08, 2018 10:45 am) • streammaster (Thu Jun 14, 2018 6:07 am)
Rating: 10%
 

User avatar
Benj
Matrix Staff
Posts: 14674
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4659 times
Been thanked: 4283 times
Contact:

Re: The GLCD ST7565R component on LoRa Mote board

Postby Benj » Fri Jun 08, 2018 11:42 am

The new component is now working well and has been pushed out to the update system (Help -> Check for updates).

Remember to restart Flowcode after the update has been downloaded.

Let us know how you get on.
These users thanked the author Benj for the post (total 2):
kersing (Fri Jun 08, 2018 11:53 am) • streammaster (Thu Jun 14, 2018 6:07 am)
Rating: 10%
 

streammaster
Posts: 78
Joined: Mon Jul 31, 2017 11:14 am
Has thanked: 7 times
Been thanked: 13 times
Contact:

Re: The GLCD ST7565R component on LoRa Mote board

Postby streammaster » Thu Jun 14, 2018 6:06 am

Hi guys,

Great work! I confirm both modes are working now well! I tested this on Mote board.
Thanks for doing this!

Regards,

Igor
These users thanked the author streammaster for the post:
LeighM (Thu Jun 14, 2018 8:03 am)
Rating: 5%
 

User avatar
LeighM
Matrix Staff
Posts: 2008
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 480 times
Been thanked: 688 times
Contact:

Re: The GLCD ST7565R component on LoRa Mote board

Postby LeighM » Thu Jun 14, 2018 8:04 am

Thanks for that Igor