Nokia5110

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

Moderator: Benj

Post Reply
jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Nokia5110

Post by jgu1 »

Hi All!

Does any of all the displays in the drop down list for display component in FC7 support this Nokia 5110 display, please :

http://www.ebay.com/itm/84x48-Nokia-LCD ... 2749.l2649

Br Jorgen

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: Nokia5110

Post by Benj »

Hi Jorgen,

Looks like it uses the PCD8544 display driver IC. I don't think we currently support this driver IC but should be fairly simple to add.

I've already found some example code so I'll have a quick go at adding it for you. At that price I've also just bought a few to play around with.

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: Nokia5110

Post by Benj »

Right it was surprisingly easy... too easy... so lets see if it actually works.

Simply drop the attached file into your "Flowcode 7/components" folder, restart Flowcode and the component should then be available under the displays component category.
gLCD_PCD8544.fcpx
(8.95 KiB) Downloaded 473 times
I've used a RAM buffer to allow the display data to be correctly buffered to allow you to do anything. e.g. draw text on top of other graphics and have none byte aligned text. This buffer eats 504 bytes of ram ( 84 x ( 48 / 8 )) so is something to be aware of when choosing your micro.

Let me know how you get on.

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: Nokia5110

Post by jgu1 »

Thank you Ben. I test it ASAP and you hear from me.

Br Jorgen

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: Nokia5110

Post by jgu1 »

Hi Ben!

:D :D :D It work¨s. But as you told, it eat byte of Ram. I tested with Pic16f 876, 877, 1937 and Arduino Uno not possible. Error code1 during compiling, something with ram. But with Arduino Mega 2650 working.

Now I have to figure out how background, foreground, transparent working and make graphics, ect. .

Is it not possible to make it working with smaller device¨s also , Uno and Pic16xxx ?

It would be nice to make a project with these display together with BME280 component :lol:

I bought the 3 of these display on Ebay, 2 of them has bad contrast (cheap), the third was ok.......

Thank you.


Br Jorgen
Attachments
Nokia5110.fcfx
(9.29 KiB) Downloaded 657 times
NokiaPic.PNG
(226.19 KiB) Downloaded 10025 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: Nokia5110

Post by Benj »

Hi Jorgen,

I think there is a contrast setting in the initialise. 'll see if I can find a nice way to expose it so you can get the other displays working.

As for the ram problem, yes we can get rid of the buffer altogether but it means you can't do as much with the display as you dont have access to modify a single pixel, it's always a bank of 8 pixels.

For example say you printed a line to the display, going from top left to bottom right and then another line going from top right to bottom left. In the middle where the lines intersect we have no way of knowing what data exists on the display without the buffer so the first line would end up broken.

For very basic printing of text with Y coordinates on 8-bit boundaries, 0, 8, 16, etc the buffer is not required as we never overlap the text. If the text wasprinted on say y coordinate of 4 and 12 then the text at coordinate 12 would corrupt the bottom of the text at coorinate 4.

Maybe I can add a property to the component to allow you to switch the buffer off if you need to, if you're switching off the buffer then hopefully you can be made aware of the consequences.

Hope this makes sense.

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: Nokia5110

Post by Benj »

Hello,

Right I've added a new macro to allow you to control the contrast to hopefully get the other displays looking good and also added a new property to allow you to switch off the buffering functionality if required.

I've checked and the RAM usage for the component drops from over 532 bytes to 28 bytes so this should help significantly with running on smaller memory devices.
gLCD_PCD8544.fcpx
(9.78 KiB) Downloaded 629 times
Let me know how you get on.

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: Nokia5110

Post by jgu1 »

Oh my god Ben, I am grateful for everything. I am not home at the moment, I'l test it during
Weekend, and you hear from me, really look forward.

Thank' s again.

Br Jorgen

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: Nokia5110

Post by jgu1 »

Hi Ben!

Sorry your new component doesn´t work.

If I try to change the value with random number on contrast and bias, first nothing happen, then suddentlig the text dissepear and is not possible to the text back again before I use the "old" component again. (I use the same testprogram, but restart FC7 every time I switch from old to the new component)
If I change Byte, then I only get som line i the display and sometimes the screen is totally black.
Another thing, How do I invert the text as shown in picture 1 ??

Thank´s in advance

Hope you can fix it.

Br Jorgen
Attachments
Invertet.PNG
(16.9 KiB) Downloaded 9919 times
Kontrast.PNG
(6.41 KiB) Downloaded 9919 times
byte.PNG
(3.72 KiB) Downloaded 9919 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: Nokia5110

Post by Benj »

Hello,

I believe you are using an out of bounds values for the Bias, If you hover your mouse over the parameters then it should give you the valid range you can use as well as the current default values.
HoverOver.jpg
HoverOver.jpg (12.91 KiB) Viewed 15643 times
Here is a new version which should hopefully sort the black/white pixel problem as per your property selections.
gLCD_PCD8544.fcpx
(9.77 KiB) Downloaded 599 times
Let me know how you get on.

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: Nokia5110

Post by jgu1 »

Hi again Ben!

Thank´s again!

No matter what I put in value for contrast between 0 - 127 and bias 0 - 7 nothing change the contrast. I have 3 display and they are all different in contrast, and it is not possible to change these in contrast. one is very weak and one is very black and one is ok. Sorry.

But now I am able to invert the text, working. :D Could yo please take a look again.

Br Jorgen

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: Nokia5110

Post by Benj »

Hi Jorgen,

Thanks for letting me know. I think I have spotted my mistake now and hopefully the ControlContrast function will now have some effect on the display.
gLCD_PCD8544.fcpx
(9.81 KiB) Downloaded 612 times

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: Nokia5110

Post by jgu1 »

Hi Ben!

Quick test.

Perfect, perfect. Nice and smoothly adjustment of the contrast. I will play with it more during the weekend and make project.

Thank you Ben.

Br Jorgen

User avatar
alikut99
Posts: 9
Joined: Wed Sep 20, 2017 11:22 pm
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Nokia5110

Post by alikut99 »

hi every one
I try add Nokia 5110 components, LCD to flow code 6 but i can't


failed to add the component : glcd (pdc8544)
you do not have a valid license to perform this action :? :? :?

how can used without license ????
:wink: :wink:

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: Nokia5110

Post by Benj »

Hello,

Sorry the component is a new development and therefore v7 only.

iman40000
Posts: 5
Joined: Thu Apr 09, 2020 7:10 am
Contact:

Re: Nokia5110

Post by iman40000 »

hey
ben i have a problem with the 5110 LCd it s not showing the charecters just showing some lines
i have simulated it on fc8 it works perfect
but in reality its just showing lines as i said before, i used ardiuno uno and fc8

thanks in advanced
Attachments
1.JPG
1.JPG (15.27 KiB) Viewed 6232 times
qwqwqw.jpg
qwqwqw.jpg (78.49 KiB) Viewed 6232 times

mnf
Valued Contributor
Valued Contributor
Posts: 1188
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: Nokia5110

Post by mnf »

Just an idea - but your code is constantly re-writing the number on the display. Try adding a delay to the loop, or just write the data once and get rid of the loop.

Martin

iman40000
Posts: 5
Joined: Thu Apr 09, 2020 7:10 am
Contact:

Re: Nokia5110

Post by iman40000 »

yea i tried it but it dident work
there are no other idea ? can you send me the chart that you say ?

Post Reply