Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Using the LCD Display on the XMEGA A3BU Xplained board
Goto page 1, 2  Next
 
Post new topic   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> Share your working BASCOM-AVR code here
View previous topic :: View next topic  
Author Message
MAK3

Bascom Member



Joined: 24 Sep 2010
Posts: 450
Location: Germany

germany.gif
PostPosted: Tue Feb 05, 2013 10:57 pm    Post subject: Using the LCD Display on the XMEGA A3BU Xplained board Reply with quote

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

Bascom Member



Joined: 27 May 2010
Posts: 314

PostPosted: Sat Mar 02, 2013 11:52 am    Post subject: Reply with quote

Thanks,
Will graphics (like point, line etc.) work with the library?)
regards, Meister
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5003
Location: Holland

blank.gif
PostPosted: Sat Mar 02, 2013 10:08 pm    Post subject: Reply with quote

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

Bascom Member



Joined: 25 May 2004
Posts: 40
Location: New York

usa.gif
PostPosted: Tue May 26, 2015 3:51 pm    Post subject: Reply with quote

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

Bascom Member



Joined: 25 May 2004
Posts: 40
Location: New York

usa.gif
PostPosted: Tue May 26, 2015 8:18 pm    Post subject: Reply with quote

Never mind. Got it.
Jerry
Back to top
View user's profile
Meister

Bascom Member



Joined: 27 May 2010
Posts: 314

PostPosted: Tue May 26, 2015 10:04 pm    Post subject: Reply with quote

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

Bascom Member



Joined: 25 May 2004
Posts: 40
Location: New York

usa.gif
PostPosted: Wed May 27, 2015 5:34 am    Post subject: Reply with quote

Thank you very much Meister.
Back to top
View user's profile
jynx

Bascom Member



Joined: 28 Apr 2016
Posts: 8

PostPosted: Sat Apr 30, 2016 8:19 pm    Post subject: Reply with quote

Where did you find the file "font8x8.font"? I cannot find it in the Bascom folder. Thanks!
Back to top
View user's profile
jynx

Bascom Member



Joined: 28 Apr 2016
Posts: 8

PostPosted: Sat Apr 30, 2016 10:58 pm    Post subject: Reply with quote

Where did you find the file "font8x8.font"? I cannot find it in the Bascom folder. Thanks!
Back to top
View user's profile
Meister

Bascom Member



Joined: 27 May 2010
Posts: 314

PostPosted: Sun May 01, 2016 8:21 am    Post subject: Reply with quote

Quote:
Where did you find the file "font8x8.font"?

http://bascomforum.de/
Back to top
View user's profile
jynx

Bascom Member



Joined: 28 Apr 2016
Posts: 8

PostPosted: Sun May 01, 2016 9:30 pm    Post subject: Reply with quote

Awesome! Thanks.
Back to top
View user's profile
Paisley

Bascom Member



Joined: 04 Jun 2013
Posts: 4

PostPosted: Fri Dec 07, 2018 11:07 pm    Post subject: Reply with quote

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

Administrator



Joined: 09 Apr 2004
Posts: 5003
Location: Holland

blank.gif
PostPosted: Sat Dec 08, 2018 8:44 pm    Post subject: Reply with quote

It comes with BASCOM-AVR, you find it in the LIB folder.
_________________
Mark
Back to top
View user's profile Visit poster's website
Paisley

Bascom Member



Joined: 04 Jun 2013
Posts: 4

PostPosted: Sun Dec 09, 2018 11:03 am    Post subject: Reply with quote

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 Smile

I can see glcdEADOGM128x6.lib and other libs, but the one I need is not there.

Thank you and kind regards!
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5003
Location: Holland

blank.gif
PostPosted: Sun Dec 09, 2018 11:23 am    Post subject: Reply with quote

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
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> Share your working BASCOM-AVR code here All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
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