unzeitig
Joined: 31 Jan 2008 Posts: 25
|
Posted: Thu Nov 02, 2017 11:02 am Post subject: ATXMEGA and glcdeadogm128x6.lbx problem |
|
|
After many years of using graphical display EADOGL128x64 with glcdeadogm128x6.lbx on ATMega128 I have tried use the same on ATXMega128A3U and ATXMega256A3U. Unfortunately it does not work properly - picture on display is shifted to the right side. I have tried to use additional reset sequence of display commands but without success. Does anybody meet same problem? My opinion is that lbx is not compatible with ATXMega. Hereinafter is modification of BASCOM example code:
[code]$regfile = "xM256a3uDEF.DAT"
$hwstack = 64 '64
$swstack = 64 '64
$framesize = 64
$lib "xmega.lib" : $external _xmegafix_clear : $external _xmegafix_rol_r1014
'---------------------------------------------------------------
$lib "glcdeadogm128x6.lbx" ' specify the used lib
Const Crystalfrekq = 32000000
$crystal = Crystalfrekq
Config Osc = Disabled , 32mhzosc = Enabled , 32khzosc = Enabled
Config Sysclock = 32mhz , Prescalea = 1 , Prescalebc = 1_1 'CPU Clock = 32MHz
Bitwait Osc_status.1 , Set 'Check if 32MHz Oscillator is ready
Bitwait Osc_status.2 , Set 'Check if internal 32.768 KHz Oscillator is ready
Osc_dfllctrl.0 = 0
Dfllrc32m_ctrl.0 = 1 'enable
Config Graphlcd = 128 * 64eadogm , Cs1 = Porta.7 , A0 = Porta.5 , Si = Porta.3 , Sclk = Porta.4 , Rst = Porta.6
Dim B As Byte , J As Byte
Dim K As Byte , X As Word , Y As Word
Setfont My6_8
Cls
Lcdat 1 , 1 , "0123456789"
Lcdat 2 , 1 , "9876543210" , 1
Waitms 3000
'specify the font we want to use
Setfont Font8x8tt
'You can use locate but the columns have a range from 1-128
'When you want to show somthing on the LCD, use the LDAT command
'LCDAT Y , COL, value
Lcdat 3 , 1 , "1234567890"
Lcdat 4 , 1 , "0987654321" , 1
Lcdat 5 , 1 , "MCS Electronics" , 1
Waitms 3000
Setfont My12_16
Cls
Lcdat 1 , 1 , "0123456789" 'a bigger font
Lcdat 4 , 1 , "9876543210" , 1 'a bigger font
Waitms 3000
Showpic 0 , 0 , Mcs
Do
Loop
End
Mcs:
$bgf "ks108.bgf"
'include used fonts
$include "font8x8TT.font"
$include "my12_16.font"
$include "my6_8.font"
[/code]
Does anybody use EADOGL128x64 display with ATXMega with success?
[b][color=red](BASCOM-AVR version : 2.0.7.9 , Latest : 2.0.7.8 )[/b][/color]
Last edited by unzeitig on Thu Nov 02, 2017 11:19 am; edited 1 time in total |
|