View previous topic :: View next topic |
Author |
Message |
MAK3
Joined: 24 Sep 2010 Posts: 449 Location: Germany
|
Posted: Tue Feb 05, 2013 10:57 pm Post subject: Using the LCD Display on the XMEGA A3BU Xplained board |
|
|
Hello,
here is an example of how to use the LCD Display on the XMEGA A3BU Xplained board:
Based on the library from here:
http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=download&id=2447
I made an example which I have tested in hardware:
Code: | $regfile = "XM256A3BUDEF.DAT"
$crystal = 32000000 '32MHz
$hwstack = 64
$swstack = 40
$framesize = 80
$lib "glcdeadogm128x3.lib" ' Lib for the XMEGA A3BU-XPLAINED Display
Config Osc = Enabled , 32mhzosc = Enabled
Config Sysclock = 32mhz , Prescalea = 1 , Prescalebc = 1_1
Config Portr.0 = Output
Led0 Alias Portr.0 'LED 0 (XMEGA-A3BU XPlained board from Atmel )
Config Portr.1 = Output
Led1 Alias Portr.1 'LED 1 (XMEGA-A3BU XPlained board from Atmel )
Config Porte.4 = Output
Display_backlight Alias Porte.4
' DISPLAY_SS = PF3
' DISPLAY_RS = PD0 --> A0 (REGISTER_SELECT)
' SPI_SCK --> PD1
' SPI_MOSI --> PD3
Config Graphlcd = 128x64eadogm , Cs1 = Portf.3 , A0 = Portd.0 , Si = Portd.3 , Sclk = Portd.1 , Rst = Porta.3
'specify the font we want to use
'Setfont Font8x8tt
Setfont Font8x8
Cls
Set Display_backlight
Lcdat 1 , 1 , "11111111"
Lcdat 2 , 1 , "88888888"
Lcdat 3 , 1 , "MCS Electronics" , 1
Wait 2
Do
Waitms 500
Lcdat 1 , 1 , "22222222"
Set Led1
Reset Led0
Waitms 500
Lcdat 1 , 1 , "11111111"
Reset Led1
Set Led0
Loop
End
'include used fonts
'$include "font8x8TT.font"
$include "font8x8.font" |
MAK3 |
|
Back to top |
|
|
Meister
Joined: 27 May 2010 Posts: 319
|
Posted: Sat Mar 02, 2013 11:52 am Post subject: |
|
|
Thanks,
Will graphics (like point, line etc.) work with the library?)
regards, Meister |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Sat Mar 02, 2013 10:08 pm Post subject: |
|
|
no. the reason is that the manufacturer of the LCD did not allow the user to read the data. I do not understand why they do not simply add a command to read out the data.
Anyway, when you can not read the memory, you can not read a byte, alter a bit, and write the byte back. setting a pixel would require this.
A workaround is to use the processor memory as a buffer and work on that. But it is a waste of memory. For a smaller display that might not be a problem. 128x32 for example requires 4096 bits = 512 bytes. 512 is still a lot of sram IMO. _________________ Mark |
|
Back to top |
|
|
Jerry
Joined: 25 May 2004 Posts: 40 Location: New York
|
Posted: Tue May 26, 2015 3:51 pm Post subject: |
|
|
Thanks for good information MAK3.
I have a couple questions.
Where did this library come from?
$lib "glcdeadogm128x3.lib" ' Lib for the XMEGA A3BU-XPLAINED Display
I am using BASCOM-AVR 2.0.7.8 and I do not see this library.
Where did you get, or how did you create?
$include "font8x8.font"
Thank you,
Jerry |
|
Back to top |
|
|
Jerry
Joined: 25 May 2004 Posts: 40 Location: New York
|
Posted: Tue May 26, 2015 8:18 pm Post subject: |
|
|
Never mind. Got it.
Jerry |
|
Back to top |
|
|
Meister
Joined: 27 May 2010 Posts: 319
|
Posted: Tue May 26, 2015 10:04 pm Post subject: |
|
|
There is a recent nice graphics application for the XMEGA A3BU-XPLAINED board:
http://bascomforum.de/
Scroll down to the last post (#159).
Regards, Meister |
|
Back to top |
|
|
Jerry
Joined: 25 May 2004 Posts: 40 Location: New York
|
Posted: Wed May 27, 2015 5:34 am Post subject: |
|
|
Thank you very much Meister. |
|
Back to top |
|
|
jynx
Joined: 28 Apr 2016 Posts: 8
|
Posted: Sat Apr 30, 2016 8:19 pm Post subject: |
|
|
Where did you find the file "font8x8.font"? I cannot find it in the Bascom folder. Thanks! |
|
Back to top |
|
|
jynx
Joined: 28 Apr 2016 Posts: 8
|
Posted: Sat Apr 30, 2016 10:58 pm Post subject: |
|
|
Where did you find the file "font8x8.font"? I cannot find it in the Bascom folder. Thanks! |
|
Back to top |
|
|
Meister
Joined: 27 May 2010 Posts: 319
|
Posted: Sun May 01, 2016 8:21 am Post subject: |
|
|
Quote: | Where did you find the file "font8x8.font"? |
http://bascomforum.de/ |
|
Back to top |
|
|
jynx
Joined: 28 Apr 2016 Posts: 8
|
Posted: Sun May 01, 2016 9:30 pm Post subject: |
|
|
Awesome! Thanks. |
|
Back to top |
|
|
Paisley
Joined: 04 Jun 2013 Posts: 4
|
Posted: Fri Dec 07, 2018 11:07 pm Post subject: |
|
|
Hi,
is the glcdeadogm128x3.lib library still available somewhere? The link just gives an invalid .zip and I would looooove to use the LCD on my Xplained board..
Thank you and kind regards! |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Sat Dec 08, 2018 8:44 pm Post subject: |
|
|
It comes with BASCOM-AVR, you find it in the LIB folder. _________________ Mark |
|
Back to top |
|
|
Paisley
Joined: 04 Jun 2013 Posts: 4
|
Posted: Sun Dec 09, 2018 11:03 am Post subject: |
|
|
Negative, I downloaded the recent version of BASCOM to check but it is not there. If you have it, could you upload it please? That would be really really helpfull for me
I can see glcdEADOGM128x6.lib and other libs, but the one I need is not there.
Thank you and kind regards! |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Sun Dec 09, 2018 11:23 am Post subject: |
|
|
The file is there.
This forum is not intended to upload normal system files from BASCOM. The reason is simple : if we change the files we have to deal with them on the forum as well. _________________ Mark |
|
Back to top |
|
|
|