Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

NOKIA-3310/5110 LCD library
Goto page Previous  1, 2, 3, 4, 5, 6, 7
 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Share your working BASCOM-AVR code here
View previous topic :: View next topic  
Author Message
Mrshilov

Bascom LCD Guru



Joined: 24 Jan 2009
Posts: 313
Location: Russia

russia.gif
PostPosted: Sat Jun 11, 2016 12:17 am    Post subject: Reply with quote

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
View user's profile
noley

Bascom Member



Joined: 03 Oct 2016
Posts: 1

PostPosted: Tue Oct 11, 2016 5:55 am    Post subject: Help with the library glcd-nokia3310 Reply with quote

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
View user's profile
Hitwert

Bascom Member



Joined: 06 Sep 2014
Posts: 1

PostPosted: Wed Nov 30, 2016 2:48 pm    Post subject: Reply with quote

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
View user's profile
kapest

Bascom Member



Joined: 05 Feb 2006
Posts: 7

germany.gif
PostPosted: Wed Mar 20, 2019 5:38 pm    Post subject: Were can i find glcd-Nokia3310.lib Reply with quote

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. Smile

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
View user's profile
O-Family

Bascom Member



Joined: 23 May 2010
Posts: 127
Location: Japan

japan.gif
PostPosted: Tue Apr 23, 2019 2:43 am    Post subject: Library bug fixes. Reply with quote

"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
View user's profile Visit poster's website
matjazs

Bascom Member



Joined: 08 Nov 2016
Posts: 11

PostPosted: Fri May 10, 2019 12:39 pm    Post subject: Reply with quote

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
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Share your working BASCOM-AVR code here All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4, 5, 6, 7
Page 7 of 7

 
Jump to:  
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