Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:34 26 Nov 2024 Privacy Policy
Jump to

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.

Forum Index : Microcontroller and PC projects : (DM) MOD-LCD3310 (Nokia 3310) Support?

Author Message
mariae71

Regular Member

Joined: 22/08/2012
Location: Sweden
Posts: 43
Posted: 12:24pm 27 Aug 2012
Copy link to clipboard 
Print this post

I might have screwed up again...

It was in the middle of the night and I was sleep depraved, while buying a Duinomite eMega and MOD-IO, I was about $10 away from getting free shipment, so I added a MOD-LCD3310 to the order. Now I have it here, but the problem is that I have no idea what so ever how to use it on my DuinoMite Mega and/or eMega, or if it is even possible. Saw a thread about another monochrome but char based Nokia display (3110 or was it 5110?), but that display seems very different to mine, the 3310 is pixel based i think.

A nudge in the right direction is most appreciated. :) Edited by mariae71 2012-08-28
2 x DuinoMite Mega
1 x DuinoMite eMega
 
mariae71

Regular Member

Joined: 22/08/2012
Location: Sweden
Posts: 43
Posted: 01:29pm 27 Aug 2012
Copy link to clipboard 
Print this post

So far I have discovered that if it's plugged in to the UEXT (the way it's supposed to plug in) the DuinoMite becomes very unhappy when one tries to load from the SD card, it just shuts down. :|

edit: So I read now that the screens on Nokia 3310 and Nokia 5110 are infact the same screens. This means jman has done this on a Maximite according to this tread.

Only problem is that the pins that he list does not compare to the pins that i have.

He list the following setup:
Maximite Pin Nokia LCD
Pin 1 Pin3(SCE)
Pin 2 SPI TX Pin6(DN/MOSI)
Pin 3 SPI CLK Pin7(SCLK)
Pin 4 Pin4(RST)
Pin 5 Pin5(D\C)
Pin 6 SPI RX Unused


The pins on the MOD-LCD3310 is according to the PDF documet for the older revision on this page called:
[code]1: 3.3V
2: Ground
3:
4:
5: #LCD RES
6: #LCD D/#C
7:
8: MOSI
9: SCK
10: #CS[/code]

Pin 1, 2 and 8 seems like obvious. Then I can only guess..

Question if:
[code]#LCD RES = RST
#LCD D/#C = D\C
#CS = SCE[/code]Edited by mariae71 2012-08-29
2 x DuinoMite Mega
1 x DuinoMite eMega
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 08:53pm 27 Aug 2012
Copy link to clipboard 
Print this post

Hi

Here you go you can work it out from here
Mod-LCD3310






Hope this helps

Jman
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 828
Posted: 10:03pm 27 Aug 2012
Copy link to clipboard 
Print this post

Hello Maria,

you're right with:

#LCD RES = RST
#LCD D/#C = D\C
#CS = SCE

I connected my 5510 AND 3310 Displays successfully on my Duinomite with seven wires on the Arduino connector (but all pins are also available on the GPIO Port):

SetPin 1, 8 'Digital Output for SPI Enable / Analog CON2 A0
SetPin 17,2 'Digital Input for SPI In / Dummy-Pin: Display has no MISO!
SetPin 2, 8 'Digital Output for SPI Out / Analog CON2 A1
SetPin 3, 8 'Digital Input for SPI Clk / Analog CON2 A2
SetPin 15,8 'D/C / Digital CON4 D4
SetPin 4, 8 'Reset# / Analog CON2 A3
'VCC / Power CON1 3V3
'GND / Power CON1 GND


Frank
 
mariae71

Regular Member

Joined: 22/08/2012
Location: Sweden
Posts: 43
Posted: 02:45am 28 Aug 2012
Copy link to clipboard 
Print this post

Thank you guys, I now have it running, had to convert my DuinoMite Mega into a Maximite and to test your code jman. :)

Two problems is however apparent.

1) Text does not fit vertically on screen (top and bottom line is cut off), the 3310-screen is smaller than the 5110 screen?

edit: I now see that it's the vertical offset that is off rather than the screen height, top half of the first text line appears at the very bottom.

2) The screen is very dim - no back light? edit 2: managed to find out how to increase the constrast.

Added photo, this is how the text appears on the screen:


Edited by mariae71 2012-08-29
2 x DuinoMite Mega
1 x DuinoMite eMega
 
mariae71

Regular Member

Joined: 22/08/2012
Location: Sweden
Posts: 43
Posted: 02:00pm 28 Aug 2012
Copy link to clipboard 
Print this post

Well... After pulling my hair all day and night, the problem is no more. :)

seems there is different (at least two) drivers on those screens, and also that the driver is for screens that are 102x67 in resolution, and all that space is writeable. Solution is to shift the display up 5 pixels and start writhing at row 1 instead of row 0.

Found out about it all on this old forum post:
Nokia 3310 LCD shows only 5 rows of byte-wide pixels

After reading the initializing code in C on page two i added the instructions to the screen that was missing and awesomeness was instant. :)

Thanks very, very much for the code example jman. :)

edit: Forgot... Maybe I should share the altered init part of jmans code.
[code]LCD_Init:

' Increased the pauses, better safe than sorry, only occurs once anyway.

Pin(RST) = 0 : Pause 200 : Pin(RST) = 1
Pause 200 : Pin(DC) = 0 : Pause 200 ' RESET LCD

LcdData= &H21 : GoSub LCD_ByteOut ' LCD EXTENDED COMMANDS
Pause 40
LcdData= &He4 : GoSub LCD_ByteOut ' Large VOP Extended Displays
Pause 40
LcdData= &H45 : GoSub LCD_ByteOut ' Y-Offset +5 pixels
Pause 40
LcdData= &He0 : GoSub LCD_ByteOut ' SET LCD Vop (CONTRAST)
Pause 40
LcdData= &H06 : GoSub LCD_ByteOut ' SET TEMP COEFFICENT
Pause 40
LcdData= &H13 : GoSub LCD_ByteOut ' LCD BIAS MODE
Pause 40
LcdData= &H20 : GoSub LCD_ByteOut ' LCD STANDARD COMMANDS
Pause 40
LcdData= &H09 : GoSub LCD_ByteOut ' All on (black)
Pause 750 ' Needs to be so high
LcdData= &H08 : GoSub LCD_ByteOut ' Display blank
Pause 50
LcdData= &H0C : GoSub LCD_ByteOut ' LCD IN NORMAL MODE
Pause 40

Return[/code]

As far as I know this script will mess up the y-alignment on screens that worked perfectly with jmans original code.Edited by mariae71 2012-08-30
2 x DuinoMite Mega
1 x DuinoMite eMega
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 09:18pm 28 Aug 2012
Copy link to clipboard 
Print this post

Great news
Glad you got it going and thanks for sharing
Maybe we should add some defines for the different screen types ?

Regards

Jman
 
mariae71

Regular Member

Joined: 22/08/2012
Location: Sweden
Posts: 43
Posted: 08:38am 29 Aug 2012
Copy link to clipboard 
Print this post

  jman said   Great news
Glad you got it going and thanks for sharing
Maybe we should add some defines for the different screen types ?

Regards

Jman

Thanks! :)

Yea, good idea, but i don't know how to... The strange thing about the different screens is that any 3310 screen work on any 3310 Nokia phone, despite differences, therefore there must either be a universal way of initializing them or a way to tell them apart by probing signals at runtime, or something like that... But I know way to little about these things to even begin to understand what's going on...

Yesterday when I was trying to get the screen to align right myself (before i found the tread I link to above) I was sending random commands to the screen in desperation just in the vain hope that I would stumble on something. I then noticed that sending &H28 as last command in the init makes the screen output upside-down, that might be useful if one wants to project the screen at a tilted glass...

I really think we should create a Maximite/DuinoMite software repository and hardware database... A place dedicated totally for just Maximite/DuinoMite code and also peoples documentation on how to get certain hardware working with it. I'm not talking about a discussion place, this place is awesome, but strictly a repository and a database.

Any other Maximite/DuinoMite users that feel that's a good idea and would consider sharing their non-secret, non-copyrighted codes and hardware solutions to such place? Edited by mariae71 2012-08-30
2 x DuinoMite Mega
1 x DuinoMite eMega
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 09:19am 29 Aug 2012
Copy link to clipboard 
Print this post

Hi
  mariae71 said  
Great news I really think we should create a Maximite/DuinoMite software repository and hardware database... A place dedicated totally for just Maximite/DuinoMite code and also peoples documentation on how to get certain hardware working with it. I'm not talking about a discussion place, this place is awesome, but strictly a repository and a database.


Try taking a look here
Maximite Libary

Jman
 
mariae71

Regular Member

Joined: 22/08/2012
Location: Sweden
Posts: 43
Posted: 12:00pm 30 Aug 2012
Copy link to clipboard 
Print this post

  jman said   Hi
Try taking a look here
Maximite Libary

Jman

Awesome! I was not aware of this... Much thanks! :)
2 x DuinoMite Mega
1 x DuinoMite eMega
 
LG046
Newbie

Joined: 02/08/2012
Location: Netherlands
Posts: 12
Posted: 06:09am 02 Sep 2012
Copy link to clipboard 
Print this post

so you made your duinomite into a maximite or is this now also working with a duinomite?
 
mariae71

Regular Member

Joined: 22/08/2012
Location: Sweden
Posts: 43
Posted: 06:26am 02 Sep 2012
Copy link to clipboard 
Print this post

  LG046 said   so you made your duinomite into a maximite or is this now also working with a duinomite?

I converted it to Maximite because jman's code lacked row numbers an I was to lazy to convert the code to line numbers, but if you convert jman's code to line numbers think it should work well with a DuinoMite.

edit: Flashed it with MMBasic 4.0...Edited by mariae71 2012-09-03
2 x DuinoMite Mega
1 x DuinoMite eMega
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024