Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2927
Posted: 12:03am 07 Mar 2016
Copy link to clipboard
Print this post
Brilliant - thanks for that. Will try shortly
palcal Guru Joined: 12/10/2011 Location: AustraliaPosts: 1965
Posted: 10:47am 07 Mar 2016
Copy link to clipboard
Print this post
OK I have got the NOKIA driver loaded but still no text on the screen. Will have to check all my connections again.
Paul.
Edit... Have checked each pin on the screen back to the micro and all is OK, and I'm not using a breadboard. After I got the message NOKIA driver loaded I typed
text 10,10,"hello world" and nothing happens.Edited by palcal 2016-03-08"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10067
Posted: 01:26pm 07 Mar 2016
Copy link to clipboard
Print this post
I'll try it with your pinout tomorrow morning. Just to confirm you have the CLK connected to pin 25, Din to pin 3, DC to 5, RST to 4 and CE to 2?
palcal Guru Joined: 12/10/2011 Location: AustraliaPosts: 1965
Posted: 06:08pm 07 Mar 2016
Copy link to clipboard
Print this post
Yes Peter those are my connections.
Paul.
Edit... I just reset the micro again and reloaded the code. All went well until I did the Library Save when I get an error CPU Exception #10 in C function at address 0x9D0028E8. I did see this message before but then I thought I loaded again and it didn't come up maybe I'm mistaken.
However every time I power up I get the message NOKIA5510 driver loaded, so I thought everything was OK.
Paul.
Edited by palcal 2016-03-09"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
paceman Guru Joined: 07/10/2011 Location: AustraliaPosts: 1329
Posted: 08:48pm 07 Mar 2016
Copy link to clipboard
Print this post
I'm having the same problem here Paul and I'm using the same pins as you, i.e. using:
NOKIA5110(5,4,2,&HBb,1)
on a similar setup - 28pin MX170 MMBasic V5.1. I've checked the pins three times now (so I hope I'm not stuffing things up) and I'm using the uM's pins 3 & 25 for the DIN & SCLK of the 5110. I've also tried two different contrast settings, &HBb as per you and Peter, and also &HC8 that works OK with JMan's code on the same screen; I unloaded then reloaded the driver in-between. Neither contrast setting works though.
In the Teraterm session below nothing shows on the screen after issuing either of the TEXT commands - I wasn't sure whether The SPI OPEN was still needed with Peter's driver. Then I wondered whether I still needed to issue the chip select commands but as you can see it gave the error on Pin 2 as soon as I tried to pre-set it.
One thing I wonder about though is that my setup with the NOKIA has 10K resistors on all control and data lines, i.e. SCE,RST,D/C,DIN,SCLK as per the original circuit that works OK with JMan's code. Is there an issue with this maybe?
Greg
> Micromite MKII MMBasic Ver 5.1
Copyright 2011-2016 Geoff Graham
NOKIA5110 driver loaded
> text 0,0,"Hello"
> spi open 4000000,3,8
> text 0,0,"Hello"
> pin(2)=1
Error: Pin 2 is reserved on startup
>
palcal Guru Joined: 12/10/2011 Location: AustraliaPosts: 1965
Posted: 08:53pm 07 Mar 2016
Copy link to clipboard
Print this post
Wait for Peter to respond I'm sure he will have a fix.
Paul."It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10067
Posted: 10:12pm 07 Mar 2016
Copy link to clipboard
Print this post
I've just tested with your configuration and it works perfectly for me
sub mm.startup
NOKIA5110(5,4,2,&HBb,1) 'DCpin, RSTpin, CSpin, Contrast, orientation
end sub
Pins 4 and 5 are the ICSP pins - do you have anything else connected to them?
Also try running at "CPU 10" to see if your display is slower than mine or Kermess's
palcal Guru Joined: 12/10/2011 Location: AustraliaPosts: 1965
Posted: 10:35pm 07 Mar 2016
Copy link to clipboard
Print this post
No nothing else connected, what about the error I got CPU exception #10.
Paul.
Edit...
Thought my current draw of 30ma was a bit low with the screen connected so I disconnected the screen and the current does not change. So the screen is drawing nothing although I have checked it has 3.3v on the pins.Edited by palcal 2016-03-09"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10067
Posted: 11:09pm 07 Mar 2016
Copy link to clipboard
Print this post
All went well until I did the Library Save when I get an error CPU Exception #10 in C function at address 0x9D0028E8. I did see this message before but then I thought I loaded again and it didn't come up maybe I'm mistaken.
what about the error I got CPU exception #10.
The clue is in your original statement. When you do a library save MMBasic moves the location of the driver in memory. Any attempt to use it before a reset will then try and use the old location. The error is benign because it causes a reset which is what we should have done after the library save.
This happens with all loadable drivers after a library save. You must always do a reset after a save before anything else.
Is your screen the same version as mine and Kermess?
palcal Guru Joined: 12/10/2011 Location: AustraliaPosts: 1965
Posted: 11:29pm 07 Mar 2016
Copy link to clipboard
Print this post
Yes I have the same screen, I have a few of them and have tried another to eliminate a faulty screen.
Paul.
Edited by palcal 2016-03-09"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10067
Posted: 11:48pm 07 Mar 2016
Copy link to clipboard
Print this post
I'm at a loss then. The driver works for me on both the 28-pin and 44-pin on any pins. It also works for Kermess on the 28-pin. Do you have an oscilloscope to check the signal lines.
Try "DO: CLS 1: pause 2: cls: pause 2:loop" and you should see everything waggling except reset which should stay high
paceman Guru Joined: 07/10/2011 Location: AustraliaPosts: 1329
Posted: 03:22am 08 Mar 2016
Copy link to clipboard
Print this post
Well, it's all working fine for me too now Peter and it looks like wiring was my problem.
I removed the connector I'd made up for the Nokia a couple of years ago (which had 10K resistors in all the control and data lines) and just rewired it all direct to the uM via standard DuPont jumpers - Voila, suddenly all was well! I don't know whether the connector was bad or the resistors maybe caused a problem with the CFunction driver. It worked with that connector previously with JMan's code but it's certainly possible I've created a problem with all the jiggling around.
I'll have a play with the new font capability tomorrow - thanks for your help with it and apologies for the red herring on my part.
Greg
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10067
Posted: 03:59am 08 Mar 2016
Copy link to clipboard
Print this post
which had 10K resistors in all the control and data lines
Were the resistors in series in the lines? If so then this is almost certainly the issue. The SPI on my code is running fast and charging the pin capacitance through a 10K resistor would slow the edges down too muchEdited by matherp 2016-03-09
palcal Guru Joined: 12/10/2011 Location: AustraliaPosts: 1965
Posted: 10:53am 08 Mar 2016
Copy link to clipboard
Print this post
Success!!! I dug out yet another display I had and it works. I can't understand why the others didn't work one of them had never been used. But now all OK.
Thanks Peter for your patience.
Paul."It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
paceman Guru Joined: 07/10/2011 Location: AustraliaPosts: 1329
Posted: 04:53pm 08 Mar 2016
Copy link to clipboard
Print this post
Were the resistors in series in the lines? If so then this is almost certainly the issue. The SPI on my code is running fast and charging the pin capacitance through a 10K resistor would slow the edges down too much
Yes they are so I guess that's a lesson learnt. JMan's code was implemented in MMBasic running on the MX150 before we had CFunctions so it would certainly have been running much slower.Edited by paceman 2016-03-10