View previous topic :: View next topic |
Author |
Message |
ivangel
Joined: 20 Sep 2010 Posts: 41 Location: Poland
|
Posted: Tue Oct 30, 2018 7:53 pm Post subject: GLCD-UC1608-SPI library from Mrshilov and XMega |
|
|
I have LCD based on UC1608 chip, connected with XMEGA 256 A3U, with SPI. I use library Mrshilov and at the beginning I had a problem with displaying characters and graphics. For correct displaying of characters it was enough to change in the original library ld / st to ldd / std and r23 to change to r11. Unfortunately the graphics either hangs up the CPU or it displays badly. I am asking for help because I\\\\\\\\\\\\\\\'m not good at Assembler
Code of modified library in Attachment
(BASCOM-AVR version : 2.0.8.1 ) _________________ www.midaz.com.pl |
|
Back to top |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Fri Nov 02, 2018 11:21 pm Post subject: |
|
|
Try to use virtual port. Like this:
Code: |
$regfile = "xm256a3udef.dat"
$crystal = 32000000
$hwstack = 100
$swstack = 100
$framesize = 100
Config Osc = Disabled , 32mhzosc = Enabled
Config Sysclock = 32mhz , Prescalea = 1 , Prescalebc = 1_1
Config Vport0 = A
Config Port0 = Output
$lib "glcd-UC1608-spi.lib"
Config Graphlcd = 128x64sed , Si = Port0.0 , Sclk = Port0.1
|
|
|
Back to top |
|
|
ivangel
Joined: 20 Sep 2010 Posts: 41 Location: Poland
|
Posted: Thu Nov 08, 2018 6:12 pm Post subject: |
|
|
Thanx, i will try _________________ www.midaz.com.pl |
|
Back to top |
|
|
ivangel
Joined: 20 Sep 2010 Posts: 41 Location: Poland
|
Posted: Thu Nov 08, 2018 6:32 pm Post subject: |
|
|
Sorry, no luck...
It hangs many times, and finally when it starts it can be seen that the picture is destroyed
Any ideas yet?
its my init code:
Code: | Config Vport0 = C
Config Port0 = Output
$lib \\\"glcd-UC1608-spi_2.lib\\\" \\\'Library must be in LIB directory
\\\'$lib \\\"glcd-UC1608-spi.lib\\\"
Config Graphlcd = 128x64sed , Si = Port0.7 , Sclk = Port0.5
\\\' \\\"Sclk\\\" must be connected to D0 of display
\\\' \\\"Si\\\" must be connected to D3 of display
\\\' D6 of display must be connected to GND
\\\' D7 of display must be connected to +3,3V
\\\' CD, WR0, WR1, BM0, BM1 of display must be connected to GND
\\\'Const Negative_lcd = 1 \\\'Optional screen inversion
Const Rotate_lcd = 1 \\\'Optional rotate screen to 180°
Initlcd |
_________________ www.midaz.com.pl |
|
Back to top |
|
|
|