Page 1 of 1

Nokia5110

Posted: Tue Jun 20, 2017 8:11 pm
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

Re: Nokia5110

Posted: Wed Jun 21, 2017 10:28 am
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.

Re: Nokia5110

Posted: Wed Jun 21, 2017 11:16 am
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 550 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.

Re: Nokia5110

Posted: Wed Jun 21, 2017 1:57 pm
by jgu1
Thank you Ben. I test it ASAP and you hear from me.

Br Jorgen

Re: Nokia5110

Posted: Wed Jun 21, 2017 7:27 pm
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

Re: Nokia5110

Posted: Wed Jun 21, 2017 10:33 pm
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.

Re: Nokia5110

Posted: Thu Jun 22, 2017 12:59 pm
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 731 times
Let me know how you get on.

Re: Nokia5110

Posted: Thu Jun 22, 2017 2:28 pm
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

Re: Nokia5110

Posted: Sun Jun 25, 2017 6:32 pm
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

Re: Nokia5110

Posted: Mon Jun 26, 2017 12:17 pm
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 17945 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 699 times
Let me know how you get on.

Re: Nokia5110

Posted: Mon Jun 26, 2017 6:22 pm
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

Re: Nokia5110

Posted: Tue Jun 27, 2017 9:24 am
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 716 times

Re: Nokia5110

Posted: Tue Jun 27, 2017 4:19 pm
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

Re: Nokia5110

Posted: Sat Nov 11, 2017 1:30 pm
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:

Re: Nokia5110

Posted: Mon Nov 13, 2017 11:27 am
by Benj
Hello,

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

Re: Nokia5110

Posted: Thu Apr 16, 2020 5:14 am
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

Re: Nokia5110

Posted: Thu Apr 16, 2020 6:57 am
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

Re: Nokia5110

Posted: Fri Apr 17, 2020 5:40 am
by iman40000
yea i tried it but it dident work
there are no other idea ? can you send me the chart that you say ?