View previous topic :: View next topic |
Author |
Message |
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Mon Oct 13, 2014 9:06 pm Post subject: Library for Nokia1616 display |
|
|
NOKIA-1616 series color display has resolution 128x160, size 1,8". Controller is SPFD54124B
Library works on NOKIA displays:
100, 101, 112, 113, 1616, 1661, 1662, 1800, 5030с, С1-00, С1-01, С1-02, С1-03, С2-00, X1-01 (12-pin socket):
And 2865cdma, 5070, 5200, 6060, 6061, 6070, 6080, 6085, 6086, 6101, 6102, 6103, 6125, 6136, 6151, 7360 (22-pin socket DF23-22):
Backlight is 3V or 7V, be careful.
Library has "Portrait" & "Landscape" mode and "Rotate 180°" function.
Example in attachment.
Last edited by Mrshilov on Sat Mar 04, 2017 5:48 pm; edited 1 time in total |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Tue Oct 21, 2014 9:48 pm Post subject: |
|
|
Thanks for sharing your excellent libs Mrshilov. As usual there is a lib, circuit and sample. Great _________________ Mark |
|
Back to top |
|
|
shams_iqbal
Joined: 13 Feb 2013 Posts: 2
|
Posted: Sat Apr 02, 2016 9:13 pm Post subject: |
|
|
it seems very interesting library got this nokia tft then i have tried your library but when i tried to change microcontroler with atxmega32a4u it give me follwing error
Error : 221 Line : 128 Backward jump out of range [_CLEAR_GRAPH1 [ 101]] , in File : C:\Users\Shams\Desktop\nokia c1 lcd display\Sources\xmega64a4u.bas
Error : 221 Line : 128 Backward jump out of range [_CLEAR_GRAPH2 [ 104]] , in File : C:\Users\Shams\Desktop\nokia c1 lcd display\Sources\xmega64a4u.bas
otherwise with selected avr (any mega avr) microcontrollers it compiles without any error
here is my code
Code: | '----------------------------------------------------------------------------'
' NOKIA-1616 display library '
' resolution 128x160 '
' '
' BASCOM-AVR 2.0.7.7 '
' Shilov Sergey ©2014 '
' St-Peterburg '
' RUSSIA '
' '
'----------------------------------------------------------------------------'
$regfile = "xm32a4udef.dat"
$crystal = 32000000
$hwstack = 64
$swstack = 64
$framesize = 64
'include the following lib and code, the routines will be replaced since they are a workaround
$lib "xmega.lib"
$external _xmegafix_clear
$external _xmegafix_rol_r1014
'First Enable The Osc Of Your Choice , make sure to enable 32 KHz clock or use an external 32 KHz clock
'Config Osc = Enabled , 32mhzosc = Enabled
'configure the systemclock
'Config Sysclock = 32mhz , Prescalea = 1 , Prescalebc = 1_1
'------------------------------- Setup -----------------------------------------
$lib "glcd-Nokia1616ap.lib"
Config Graphlcd = Color , Cs1 = Portd.7 , Si = Portd.4 , Sclk = Portb.1 , Rst = Portb.0
Const Portrait = 0 '1=Portrait, 0=Landscape
Const Rotate_180 = 0 '1=Rotated, 0=Not Rotated
'------------------- Variables & Constants -------------------------------------
Const Blue = &B00000011 ''predefined contants are making programming easier
Const Yellow = &B11111100
Const Red = &B11100000
Const Green = &B00011100
Const Black = &B00000000
Const White = &B11111111
Const Brightgreen = &B00111110
Const Darkgreen = &B00010100
Const Darkred = &B10100000
Const Darkblue = &B00000010
Const Brightblue = &B00011111
Const Orange = &B11111000
Const Violet = &B11100011
Dim I As Byte , N As Byte , M As Byte , P As Byte
'============================ Main prog ========================================
Initlcd
Cls
Do
Boxfill(0 , 0) -(127 , 159) , Green
Boxfill(0 , 0) -(127 , 159) , Red
Boxfill(0 , 0) -(127 , 159) , Violet
Boxfill(0 , 0) -(127 , 159) , Yellow
Boxfill(0 , 0) -(127 , 159) , Blue
Line(0 , 0) -(127 , 0) , Yellow
Line(0 , 0) -(0 , 159) , Yellow
Line(0 , 159) -(127 , 159) , Yellow
Line(127 , 0) -(127 , 159) , Yellow
Pset 1 , 1 , Yellow
Pset 126 , 1 , Yellow
Pset 1 , 158 , Yellow
Pset 126 , 158 , Yellow
Box(2 , 2) -(125 , 157) , Yellow
For I = 1 To 63 Step 4
Circle(64 , 80) , I , Green
Next I
Setfont Color8x8
Lcdat 76 , 12 , " Nokia 1616 " , Orange , Blue
Wait 1
Boxfill(0 , 0) -(127 , 159) , White
Showpic 24 , 40 , Clock
Wait 2
Loop
End
'-------------------------------------------------------------------------------
$include "color8x8.font"
Clock:
$bgf "Clock.bgc" |
can you plz help me that why this error is appearing wile compiling with any of atxmega controllers |
|
Back to top |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Sat Apr 02, 2016 10:15 pm Post subject: |
|
|
Use virtual port:
Code: | Config Vport0 = B
Config Vport1 = D
Config Graphlcd = Color , Cs1 = Port1.7 , Si = Port1.4 , Sclk = Port0.1 , Rst = Port0.0 |
|
|
Back to top |
|
|
shams_iqbal
Joined: 13 Feb 2013 Posts: 2
|
|
Back to top |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Mon Apr 04, 2016 11:10 pm Post subject: |
|
|
I checked
Code: | $regfile = "xm64a4udef.dat" |
and
Code: | $regfile = "xm128a4udef.dat" |
No errors. |
|
Back to top |
|
|
endusa200
Joined: 29 Jan 2017 Posts: 8
|
Posted: Thu Feb 02, 2017 9:09 pm Post subject: mega128 |
|
|
hello
when I change miro to mega128( $regfile = "m128def.dat" ) this erors seen :
bakward jump out of range
but it's working with atmega64
can you help me ? Crying or Very sad |
|
Back to top |
|
|
endusa200
Joined: 29 Jan 2017 Posts: 8
|
Posted: Thu Feb 02, 2017 9:14 pm Post subject: mega128 |
|
|
back ward jump out of rang [_SHOW PICTURE2 [68]]
back ward jump out of rang [_SHOW PICTURE1 [75]]
WHEN I use "Showpic" code with meg128 this eror seen |
|
Back to top |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Fri Feb 03, 2017 12:10 am Post subject: |
|
|
Try this version. |
|
Back to top |
|
|
endusa200
Joined: 29 Jan 2017 Posts: 8
|
Posted: Fri Feb 03, 2017 8:27 am Post subject: mega128 |
|
|
thank you
it's working |
|
Back to top |
|
|
endusa200
Joined: 29 Jan 2017 Posts: 8
|
Posted: Mon Feb 13, 2017 5:44 pm Post subject: error |
|
|
Hello
tanks for last code
It's working for atmega128 with port A,port B,port C,port D and port E , but when I use the port F for lcd , this error seen :
backward jump out of range[_Clear_Graph1[101]]
backward jump out of range[_Clear_Graph2[104]]
can you help me ? |
|
Back to top |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Tue Feb 14, 2017 12:44 am Post subject: |
|
|
This is not library problem - M1281 with the same pinout works fine.
In M128 due to M103 compatibility PORTF & PORTG will not work. |
|
Back to top |
|
|
endusa200
Joined: 29 Jan 2017 Posts: 8
|
Posted: Wed Feb 15, 2017 4:52 pm Post subject: |
|
|
OK
thank you for answering |
|
Back to top |
|
|
yahi92
Joined: 23 Feb 2014 Posts: 25
|
Posted: Sat Mar 04, 2017 6:31 am Post subject: |
|
|
Hello Mrshilov
Do you have any sample for loading "BMP" files from sdcard for this display?
(or any suggestion for doing that?)
Thanks for your great works(we should name you "Display Man"!)
Best regards |
|
Back to top |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
|
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
|
|