PDA

View Full Version : Using Nokia LCD



Pages : 1 [2]

mister_e
- 29th June 2011, 17:51
That's because the macro use DATA, you want to jump on the DA or DT asm instruction ;)

astanapane
- 29th June 2011, 19:49
Hi Steve,

are you going to share the new Nokia 3310 and 5110 driver with us the following days?

thanks

Ioannis
- 29th June 2011, 20:21
Do you want to be a beta tester or a happy user?

Trust Steve that he will post a good piece of working code when he decides it is ready. Besides being on different time zone.

Ioannis

astanapane
- 29th June 2011, 21:30
Ioannis,

i can wait as long as it needs to be ready.

thanks

mister_e
- 30th June 2011, 06:09
I have it working, no problem, I just always find some features to add in, and/or way to use it. Yes it will works on almost everything. 12f629 is enough with PBP... but damn, dont'expect being able to show a lot of string and embedded pictures with a so RAM/EEPROM underpowered device :D Still doable to add some eeprom to it, but WHY?!? Too much new 8 pin device with much more horse power under the hood for the same price.

The magic is at compilation time... hidden but there. The "driver" know which method to use to store/retrieve the strings out of the code space... OR EEPROM if you want.

Some PIC allow to read/write to their code space (PIC16F88, 877 and so forth), some don't (16F628, 12F629...)... and then you have the PIC18. 3 different method, one driver deciding for you. Sick! I learned a lot out of it... again.

Sure there will be odd PIC somewhere though... there's ALWAYS one ... or twelve.

Stay tunned... free stuff need patience :D

astanapane
- 30th June 2011, 08:50
i would like to thank you once more Steve.

:-)

mister_e
- 30th June 2011, 08:57
Really welcome my friend. BTW it will be handy for me too ;)

SKOLS1
- 10th July 2011, 09:12
@Fretello,can you post the code for this project (see image : http://pic.mk/thumbs/termoclock.jpg (http://pic.mk/?v=termoclock.jpg) )
please I need it to make a project with Nokia 3310 LCD display.And can you put the program that you make those graphic pictures?

fratello
- 10th July 2011, 09:23
All you need...

mister_e
- 11th July 2011, 03:19
Simple follow up: I haven't gave up, just really busy.

astanapane
- 11th July 2011, 07:13
no problem Steve,

take your time.

:-)

SKOLS1
- 14th July 2011, 20:32
I compile the code and I got an error message:When I delete this line:@ DEVICE pic16F628A, XT_OSC, WDT_OFF, PWRT_OFF, BOD_OFF, MCLR_ON, LVP_OFF, CPD_OFF, PROTECT_OFF
there is no Error.When the line isn't deleted there is an error,that is saying Illegal opcode(pic16F628A) This error is when I use pic16F648A

mister_e
- 14th July 2011, 21:01
which code?

@ DEVICE line is for PM assembler, if you're using MPASM to compile, you need to change it accordingly.

So again, Post #1 & #5
http://www.picbasic.co.uk/forum/showthread.php?t=543

SKOLS1
- 14th July 2011, 21:11
I am using MPASM to compile.I try with two of them @DEVICE and _config_... etc. but it doesn't working on my PC.

mister_e
- 14th July 2011, 21:31
If you have read post #1 and #5 of the above link and it still don't work.... Post what you tried then...

For MPASM you will use @ __CONFIG thing. notice there's 2 underscore character before CONFIG

mister_e
- 27th July 2011, 21:21
Teaser time... have a good reading BEFORE the launch... or lunch... whatever floats your boat.

5803

astanapane
- 28th July 2011, 11:13
Hi steve,

i have downloaded the txt, reading time.

thanks.

mister_e
- 30th July 2011, 01:53
OK, since I'm changing my ISP and I'll be unavailable for a few days, I've decided to post the BETA version of it today. It's not finished yet, but quite workable.

Extract the archive to your root directory, it should create a NokiaGLCD folder. from there surf in the few code example and you should be able to understand most part of it.

Like I said, it's not 100% finished yet, the documentation is not finished (maybe not 100% accurate either) AND I'm still adding/modify features and try to shrink the whole codesize. No need for ANY complaints and I know some part have to be coded better than they already are ;)

Before next friday (july 5th) I might not be able to access the internet as much as I would like to.

Beta Enjoy.. or beta wait :D

mister_e
- 30th July 2011, 02:35
OUPS, discard the previous.. from wrong computer
here you go, sorry :(

fratello
- 30th July 2011, 20:40
Wow !!! GREAT JOB !!! Thanks Mr. E !
...In some applications I put the "RES" pin of display to V+ (max 3v3), and I have no problem...Maybe it's usefull for having one "extra-pin" free, for 12F675, for example.

mister_e
- 31st July 2011, 00:55
Thanks Fratello,
Yup, I'm aware of that, But I would prefer the CE option, since it's better to initialise the LCD right after a hardware reset. Basically you can set the CE pin to ground without problem. Now if you really run out of I/O, you could use a R/C network on the RES pin, and do the initialisation. Another thing, if you run your unit and want to go in Sleep mode... you can still re-initialise the display after the Sleep. Not sure if you can do it properly with the RES pin always high.. However, I haven't messed too much with this too much.

If you want to save an I/O, set the RES pin to Ground and use the following define
DEFINE GLCD_OVERRIDE_CE

This will remove the CE High/Low at compile time.

ruijc
- 3rd August 2011, 10:40
Thank you Steve for your work on this,

Will do some experiments this week.

Best regards
Rui

mister_e
- 5th August 2011, 22:59
Thanks Rujic. This should work ;)

The next and final version Include the Variable/constant to HEx/Bin/Dec conversion routine, improvement for custom, character/custom screen and... that's all. After that, it will be to the end user to make his own homework ;)

mister_e
- 11th August 2011, 07:25
as of today, 37 downloads, no bug report, no questions, not much comment... must be ok :)

bitmaniac
- 11th August 2011, 07:52
Mister_e: I had very long time since last read this thread!
I see that ther has been great project with NOKIA LCD stuf!!!

Excellent work you've done my friend!

If ever I need to use nokia lcd ,in the future, your routine will certainly be my first option!!! :)

mister_e
- 11th August 2011, 19:10
Haha thanks Bitmaniac!
I don't know how much future there is in those Nokia LCD right now, seems the deal is no longer the deal some had couple of years ago, however it's been a good and funny project. Learnt a lot from it. Still polishing the latest version for PBP 2.60, and I guess I could have it easier to use for PBP3 but not sure yet.

Side note, for the Proteus/Isis user, one of my friend found a Model for that. I haven't used it myself because... I don't use Proteus.

OK, it seems it doesnt simulate all Nokia features like Contrast, Inverse Video and couple of other, but It looks workable. Here's the link for those interested.

http://www.8051projects.net/download-d217-nokia-3310-lcd-proteus-model.html

What I've been told about the installation: You unpack the .zip file and copy the files located in Models and Library folder of this zip archive to Proteus/Isis Models and Library folder. Period... and it should work. My friend use Version 7.8 on Win 7 , not sure if this is the latest version or not... however...

SteveB
- 12th August 2011, 02:50
as of today, 37 downloads, no bug report, no questions, not much comment... must be ok :)

Waiting for a display to arrive in the mail...

mvs_sarma
- 12th August 2011, 06:27
@ Steve,
Perhaps one can convert it to work on a modern TFT type NOKIA lcd display, as 3310 displays may not be available in future.

mister_e
- 12th August 2011, 08:41
Sure enough, it's a huge core for ANY Glcd. Sure they will be available for some times... but not those <= 2$ :D

farhang
- 13th December 2011, 00:06
Hi,could you please send me hex code an schematic for me, my email [email protected] many thanks.

mr.sneezy
- 27th February 2013, 08:05
(I see this thread is quite inactive, maybe that means there is another more active ??)

I am trying out Steves code for driving a 5110 screen (bought here http://dx.com/p/arduino-1-6-lcd-display-screen-for-nokia-5110-red-silver-140226 )
It works very well, except for one of his examples. In the more complex example called 'USINGGLCDOUT_CMD_16F---' I get an error during compiling, and I've tried a few tricks but nothing has got passed it (I modified it for a 16F819, but other than the pic specific configs and the pins I chose use nothing else is changed).

Here it is.
PICBASIC PRO(TM) Compiler 3.0.1.4, (c) 1998, 2011 microEngineering Labs, Inc.
All Rights Reserved.
[ERROR] usingglcdout_cmd_16f819.pbp (57) : Reading DEFINE Block

it comes from this define I think (which works fine in the other less complex examples about using variables and constants).
DEFINE GLCD_2DEC_USED
INCLUDE "..\Include\GLCD_NOKIA.PBP" ' Plug the Nokia Driver/Wrapper in here

If I remark out the define I get this when I compile.
PICBASIC PRO(TM) Compiler 3.0.1.4, (c) 1998, 2011 microEngineering Labs, Inc.
All Rights Reserved.
[ASM ERROR] USINGGLCDOUT_CMD_16F819.ASM (562) : ERROR: (Seems you forgot to add DEFINE GLCD_2DEC_USED to your code...)
Which you'd expect.

I can post up the whole example code if anyone wants, but it's right out of Steve's examples.
I'm wondering if it's something to do with PBP3.

Anyone got a clue ?
Keeping in mind that his other examples compile and run fine, and I tried his code with and without my config and pin changes..

Martin

wjsmarine
- 8th May 2014, 15:17
Hi Martin,

Did you receive an answer from Steve on this? Is there another thread?

Cheers,
Bill

wjsmarine
- 8th May 2014, 15:25
@ mister_e

Steve,

Firstly thanks for all the hard work you put into making the Nokia 3310 Glcd a success. I've only recently discovered it and now use the library a lot.

May I ask for some advice on how to implement a change from only displaying dec characters to include hex? I've been through the samples and documentation but I don't see anything. Unfortunately I don't have an asm skills yet.

If this has been achieved by other users or appears elsewhere I'd appreciate some guidance. No rush.

Kind regards,
Bill

fratello
- 27th September 2014, 09:52
Old thread ... but nice !
This is my last soft & hard for interfacing with Nokia display : termo-clock.
Enjoy !

7457

pedja089
- 27th September 2014, 10:55
Nice.
Can you post proteus and pbp files?

fratello
- 27th September 2014, 11:20
Sure .... Enjoy !

TexHoTpoHuk
- 28th September 2014, 06:31
could you attach circuit diagram for your final version termo clock .
Thanks in advance !!!

fratello
- 28th September 2014, 07:44
Yes, this is it !
7461

pedja089
- 28th September 2014, 09:16
Thank you very much.
I need to find way to import lcd model in proteus.

fratello
- 28th September 2014, 11:49
Copy each file into corresponding Proteus folder.

pedja089
- 28th September 2014, 12:15
Thanks.
I will try it, when get back...

pedja089
- 1st October 2014, 17:28
I tried and didn't work.
I'll try it with different proteus version.
Thanks any way.

fratello
- 1st October 2014, 18:12
Did you do it like in picture ?

[ATTACH=CONFIG]7463[/ATTACH

pedja089
- 1st October 2014, 20:39
I have proteus 8 installed on pc, and there is no existing LIBRARY folder. Anyway I put files as it is on picture, but didn't work.
I'll try to install proteus 7, and give it try.

pedja089
- 1st October 2014, 21:20
Work with proteus 7 :)

fratello
- 4th October 2014, 20:01
Update soft ... bug with "seconds" position resolved. See attach.

74657466

fratello
- 26th May 2015, 10:42
What is wrong here ?! Macro buffer overflow ...
Thanks !
7838

wjsmarine
- 5th August 2015, 06:19
Hi All,

Sorry to hijack the thread but I thought this was the best place to put it...

Attached my code example to write big characters to the Nokia 3310 LCD using custom fonts to smooth the normally large chunky characters (made with FastLCD). I have a weird fault where the breadboard setup works fine however exact hardware and code on a pcb works in every aspect apart from displaying the Big characters! Both run from the internal oscillator at 4Mhz and if serial is included there is no corruption observed on either.

As shown in the photo the left display (pcb cover) works fine connected to the big breadboard while the plain LCD connecting to the veroboard/ZIF socket/small breadboard runs except no Big characters. Swapping PIC's (identical code) or LCD's between the two makes no difference. The board is setup with a DS18B20 for temperature measurements but the code has fixed values for display testing.

Does anyone have an idea on why this doesn't run off the breadboard? One would expect it to be the other way round due all the additional inter-capacitance of the protoboard but not so in this case... My o'scope is an old one with limited bandwidth so I can't really see much difference between both sets of waveforms and suspect timing is an issue however including delays in Shiftout makes no difference.

While on the subject I want to use a bigger PIC for greater code space and settled on a 16F1847 but there are errors and it won't compile when using the "GLCD_NOKIA.bas" include file from Mr.E - who can't be thanked enough for his hard work in developing this Include. My asm skills are zilch so any help appreciated. The config allows for testing the same code with this device.

I hope my example is of use to others, these are very basic LCD's but cheap and plentiful so I think will be with us for a while, ironing out some bugs is worth the effort and I am sure will apply to other displays as well.

Kind regards,
Bill


7967

tahirmaqsood
- 18th March 2016, 14:39
I have proteus 8 installed on pc, and there is no existing LIBRARY folder. Anyway I put files as it is on picture, but didn't work.
I'll try to install proteus 7, and give it try.

check this for proteus 8
8203

wjsmarine
- 6th May 2017, 10:25
Hi All,

The Nokia Big Character mystery is solved finally after getting back to the problem with some spare time...

My post with the photo and code showed two identical setups and only one with Big Characters working while the other - working perfectly displaying normal size characters - did not show the Big ones. In fact the two breadboards (and the pcb I made) were not identical: the working unit had the Nokia LCD's /CS line tied to ground while the other (no Big Chars) was being driven by PortB. Making the non-working breadboard (and the pcb) the same fixed the problem.

Why did this affect only Big Characters display? I have no idea except to offer the BC generation uses Shiftout and not Mr.E's wrapper and suspect there is a very narrow timing window if using /CS for the routine. Not owning a Logic Analyzer didn't help.

The only remaining problem is the one whereby Steve's wrapper appears incompatible with the 16F1847 (and probably a good number of the enhanced chips) so if anyone with the skills can correct this I'd very much appreciate learning from the exercise.

Steve, if you are reading this can you offer a solution to the 31 custom character limit in your wrapper and can this be expanded? I've hacked your code in various ways and learnt something in the process but my ASM skills remain sadly lacking, something I'm going to address when more spare time is available.

Kind regards to All,
Bill

wjsmarine
- 3rd May 2018, 04:47
Hi All,

Well it's been a year and I've had to come back to this after another project has stalled due this damn 16F1847 problem. I'm using this because it is the largest codespace 18 pin pic at 8k and there are no 18F parts worth mentioning available in dip18. Correct me if I'm wrong.

If there are any gurus out there that want a challenge please see the attached, I'm sure there are others having similar issues so let's find a solution if possible as it appears mister_e is done with further development of his wrapper.

The sample provided is a reduced set of a much larger, successful program but using a 16F88 without any issues.

Kind regards,
Bill

86298630