View previous topic :: View next topic |
Author |
Message |
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Sat Jun 11, 2016 12:17 am Post subject: |
|
|
I check library on Atxmega256A3BU with this config:
Code: | $regfile = "xm256a3budef.dat"
$crystal = 32000000
$hwstack = 100
$swstack = 100
$framesize = 100
Const Mul_pll = _xtal / 2000000
Config Osc = Enabled , Pllosc = Enabled , Pllsource = Rc2mhz , Pllmul = Mul_pll
Config Sysclock = Pll , Prescalea = 1 , Prescalebc = 1_1
'*******************************************************************************
$lib "glcd-Nokia3310.lib"
Config Vport3 = F
Config Portf = Output
Config Graphlcd = 128x64sed , A0 = Port3.2 , Si = Port3.3 , Sclk = Port3.4
Const Contrast_lcd = 68
Const Negative_lcd = 0 ' Inverting screen
Const Rotate_lcd = 0 ' Rotate screen to 180° |
It starts and works fine up to 50MHz. For 52MHz and higher it need to add delay in "_gwrite_datamisc" routine:
Code: | _gwrite_datamisc:
push r23
*#If varexist("_GLCD_PORT_CS1")
* cbi _GLCD_PORT_CS1,_glcd_cs1 ; enable chip - CS=0
#Endif
nop ; ---------- added delay !!!!!!!!
nop ; ---------- added delay !!!!!!!!
ldi r25,8 ; 8 bits
_gwrite_datamisc8:
...
|
Maybe your LCD slower than my and need this delay (you can use "@genus(1)" against "nop"). Also try to increase existed delays "@genus(1)" to "@genus(2)" or more. |
|
Back to top |
|
|
noley
Joined: 03 Oct 2016 Posts: 1
|
Posted: Tue Oct 11, 2016 5:55 am Post subject: Help with the library glcd-nokia3310 |
|
|
Hey.
I started playing with Bascom. I found a thread with a library for operating the display of nokia 3310. I based on the library to try to construct a bar graph. I tried pset command, line, lcd, locate, but do not work. I'm working on a demo version 2.0.7.3.
Could I ask for help in pushing it further? |
|
Back to top |
|
|
Hitwert
Joined: 06 Sep 2014 Posts: 1
|
Posted: Wed Nov 30, 2016 2:48 pm Post subject: |
|
|
Hi,
am I just terribly blind or is the file no longer attatched to this thread? I think the former is the case. Where can i find the download for the zip?
Thank you very much.
Well stupid me. You got to be logged in to see the download. Never mind me asking. |
|
Back to top |
|
|
kapest
Joined: 05 Feb 2006 Posts: 7
|
Posted: Wed Mar 20, 2019 5:38 pm Post subject: Were can i find glcd-Nokia3310.lib |
|
|
I find the Link. The Problem, I was loggin but not in the new way. I register in my Profile and now I'm glad.
Hello,
I looked for glcd-Nokia3310.lib some hour in Bascom-Forum and in the Internet, but I did'nt find a download-Link.
Pse Help
Tnx
kapest |
|
Back to top |
|
|
O-Family
Joined: 23 May 2010 Posts: 320 Location: Japan
|
Posted: Tue Apr 23, 2019 2:43 am Post subject: Library bug fixes. |
|
|
"glcd-Nokia3310.lib" has a defect that the dot on the right edge is missing when the screen is rotated 180 degrees.
This has been fixed.
Underline option added to the "LCDAT" instruction. [2:Solid , 3:dotted]
Lcdat 1 , 1 , "Nokia5110 TEST" , 2
Lcdat 2 , 7 , "by BASCOM-AVR"
Lcdat 4 , 1 , "ABCDEFGHIJKLMN"
Lcdat 5 , 1 , "01234567890123" , 3
Lcdat 6 , 31 , "O-Family" , 1
Postscript
When setting the contrast and then using the [CLS] command, there was a bug that the screen disappeared. |
|
Back to top |
|
|
matjazs
Joined: 08 Nov 2016 Posts: 86
|
Posted: Fri May 10, 2019 12:39 pm Post subject: |
|
|
Hello.
I'm trying to connect HX1230 LCD display on ATXMEGA128A3U.
I have two different hardware with diferent connection. When I use configuration (my first hardware):
Code: | Config Vport3 = F
$lib "glcd-Nokia1100.lib"
Config Graphlcd = 128x64sed , Si = Port3.5 , Sclk = Port3.6 , Cs1 = Port3.1 , Rst = Port3.0 |
it work OK.
When I do so (second hardware):
Code: | Config Vport0 = A , Vport1 = C , Vport2 = D
$lib "glcd-Nokia1100.lib"
'Config Port0.2 = Output
'Config Port1.0 = Output
'Config Port1.1 = Output
'Config Port2.1 = Output
Config Graphlcd = 128x64sed , Si = Port0.2 , Rst = Port1.0 , Cs1 = Port1.1 , Sclk = Port2.1
|
it doesn't work.
Could me someone explane, is it something worng, that I use Vport0, Vport1, Vport2 (3 times) and not only ones Vport3? In manual is written, that it is possible.
I checked hardware many times and I can say, that all is OK.
Regards, Matjaz
There is my test code:
Code: | '*******************************************************************************
$regfile = "xm128a3udef.dat"
$crystal = 32000000
$hwstack = 512
$swstack = 512
$framesize = 512
'$lib "xmega.lib"
$external _xmegafix_clear
$external _xmegafix_rol_r1014
'-Oscilator ----------------------------------------------------------------------
Config Osc = Enabled , Extosc = Enabled , Pllosc = Enabled , Range = 12mhz_16mhz , Startup = Xtal_16kclk , Pllsource = Extclock , Plldiv2 = Disabled , Pllmul = 2
Config Sysclock = Pll , Prescalea = 1 , Prescalebc = 1_1
Config Priority = Static , Vector = Application , Lo = Enabled , Med = Enabled
'-RTC-----------------------------------------------------------------------------
Config Date = Dmy , Separator = -
Config Clock = Soft , Rtc = 1khz_32khz_crystosc , Gosub = Sectic ' we select the internal 1 KHz clock from the 32KHz external oscillator
'-------------------------------------------------------------------------------
Config Submode = New
'-EEPROM XMEGA-----------------------------------------------------------------
Config Eeprom = Mapped
Enable Interrupts
'-NOKIA 1100-(HX1230 96x68)----------------------------------------------------------------
Wait 1
Const Contrast_lcd = 5
Config Vport0 = A , Vport1 = C , Vport2 = D
$lib "glcd-Nokia1100.lib"
'Config Port0.2 = Output
'Config Port1.0 = Output
'Config Port1.1 = Output
'Config Port2.1 = Output
Config Graphlcd = 128x64sed , Si = Port0.2 , Rst = Port1.0 , Cs1 = Port1.1 , Sclk = Port2.1 'Contrast 0 to 127, if not defined - 72
'Config Vport3 = F
'$lib "glcd-Nokia1100.lib"
'Config Graphlcd = 128x64sed , Si = Port3.5 , Sclk = Port3.6 , Cs1 = Port3.1 , Rst = Port3.0 'Contrast 0 to 127, if not defined - 72
'1 RST - Rst Portc.0
'2 CE - Cs1 Portc.1
'3 DC - A0 NC
'4 DIN - Si Porta.2
'5 CLK - Sclk Portd.1
'6 VCC
'7 LIGHT
'8 GND
'---------------------
'Rst & Cs1 is optional
'Const Contrast_lcd = 20
'Const Negative_lcd = 1 'Inverting screen
'Const Rotate_lcd = 1 'Rotate screen to 180°
Cls
Setfont Font8x8
Showpic 0 , 0 , Logoms
Wait 3
End
'-------------------------------------------------------------------
Sectic:
Return
'-GLCD---------------------------------------------------------------
$include "font8x8.font"
$include "andale10x16.font"
Logoms:
$bgf "GSM-Logo3.bgf" |
|
|
Back to top |
|
|
sielcon
Joined: 16 Mar 2006 Posts: 74 Location: Argentina
|
Posted: Wed Sep 25, 2019 7:14 pm Post subject: |
|
|
Hello everyone, I am using the lib for the nokia 3310 and I have a problem with the contrast, I have tried with lcdcontras = x (0 to 127), also with Glcdcmd 33: Glcdcmd x, before and after the initlcd but although in some Opportunity worked, then I stopped. I send a photo to see if someone with more experience in this display can guide me.
Thank you very much and best regards. |
|
Back to top |
|
|
O-Family
Joined: 23 May 2010 Posts: 320 Location: Japan
|
Posted: Thu Sep 26, 2019 1:25 am Post subject: |
|
|
Hi,
"glcd-Nokia3310.lib" has a bug that the screen cannot be displayed when the [CLS] command is used after setting the contrast.
Try using "glcd-Nokia3310_V2.lib".
I'm not sure of the symptoms, so please show me the program. |
|
Back to top |
|
|
sielcon
Joined: 16 Mar 2006 Posts: 74 Location: Argentina
|
Posted: Thu Sep 26, 2019 3:11 pm Post subject: |
|
|
Hi O-FAMILY, thank you very much for your quick response. Change the lib and delete the cls but everything remains the same.
Code: |
$lib "glcd-Nokia3310_V2.lib"
Config Graphlcd = 128x64sed , Rst = Portb.2 , A0 = Portb.4 , Si = Portb.3 , Sclk = Portb.5
Const Negative_lcd = 0 'Inverting screen
Const Rotate_lcd = 1 'Rotate screen to 180°
'I have tried these alternatives with values from 0 to 128 (255) but nothing changes, I am certainly doing something wrong
'Glcdcmd 33 : Glcdcmd 0
lcdcontrast=0
Initlcd
'Cls
lcdcontrast=0
|
|
|
Back to top |
|
|
O-Family
Joined: 23 May 2010 Posts: 320 Location: Japan
|
Posted: Thu Sep 26, 2019 4:00 pm Post subject: |
|
|
Is your problem saying that using the contrast change command does not change the display contrast?
If so, it may be different depending on the type of LCD.
I have two types of "Nokia 5110" LCD modules.
The contrast of the blue board LCD changes according to the contrast command.
On the red board LCD, the contrast is constant and does not change when using the contrast command.
However, the LCD on the red board keeps the contrast constant even when the power supply voltage changes to 2.7V-5V, which is a very beautiful display.
This seems to be a circuit built into the internal controller that keeps the contrast constant.
The controller used for this may not be the standard PCD8544, and the contrast may change with another command.
If you know the controller of this LCD, you may be able to control the contrast. |
|
Back to top |
|
|
sielcon
Joined: 16 Mar 2006 Posts: 74 Location: Argentina
|
Posted: Fri Sep 27, 2019 3:18 am Post subject: |
|
|
Hi O-Family, my board is red, that's why contrast doesn't work. Thank you very much, I will investigate.
Best regards. |
|
Back to top |
|
|
sielcon
Joined: 16 Mar 2006 Posts: 74 Location: Argentina
|
Posted: Fri Sep 27, 2019 6:05 pm Post subject: |
|
|
I found the problem, the defect only does it when the screen rotates 180 degrees |
|
Back to top |
|
|
O-Family
Joined: 23 May 2010 Posts: 320 Location: Japan
|
Posted: Sat Sep 28, 2019 2:28 am Post subject: |
|
|
Please write in more detail when writing the problem.
Your question will not be communicated.
You can usually change the contrast, but do you mean that the contrast does not change when you rotate the screen 180 degrees? |
|
Back to top |
|
|
sielcon
Joined: 16 Mar 2006 Posts: 74 Location: Argentina
|
Posted: Mon Sep 30, 2019 1:08 am Post subject: |
|
|
Sorry O-Family, the subject is like this, as you said the red board displays do not change the contrast and mine is not the exception, what I found is that the problem that is seen in the photo is that only rows 8 and 44 look with good contrast, the extra ones look very dim, in this case I had the screen rotated 180 degrees (Const Rotate_lcd = 1), but this problem disappears when the screen is set in normal mode (Const Rotate_lcd = 0) . Sorry again for expressing myself incorrectly.
Thank you very much for your time.
Best regards.
|
|
Back to top |
|
|
O-Family
Joined: 23 May 2010 Posts: 320 Location: Japan
|
Posted: Mon Sep 30, 2019 1:58 am Post subject: |
|
|
Hi,
understood.
Your problem is the dark line in your first photo.
The two types of LCD I have do not cause such symptoms even when the screen is flipped.
Therefore, I don't think the settings for the software and LCD are strange.
Also, if normal contrast is obtained when the screen is reversed, I don't think the LCD bias setting is strange.
Try various numbers and positions of characters to display.
Since this LCD is a second-hand product that has been removed from a Nokia second-hand mobile phone, there is no guarantee of normal operation.
Furthermore, since the controller and specifications used for each lot are not fixed, analysis is difficult.
Since it is an inexpensive LCD, try several other types. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|