XMEGA-A3BU Xplained Graphics LCD Library

Go To Last Post
20 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've added support for the XMEGA-A3BU Xplained to Andy Gock's Graphic LCD Library (see http://agock.com/software/glcd-graphic-lcd-library/).

If anyone is interested, I'll post the modified library and my test case software here.

Don

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Don, I am interrested in your port thanks.

Johan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm away from my desktop until next week. I'll post the library at that time.

Don

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks
Johan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just returned tonight from snowboarding in Montana.

Here it is. Documentation here: http://s.agock.com/glcd-documentation/

Don

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Don, my turn to have been out of office for a couple of days. Thanks for sharing.
Johan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello Donblake,

Thank you so much for the post! I was wondering will it work on avr studio 4? I am currently using that for my project, I want to make use of the lcd of the A3BU XPLAINED to display some numbers after calculation by the mcu. I have downloaded your avr studio 5 demo code.

Thank you!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Don,
I have a huge list of error using the program you posted. Running it on studio 4. The errors are mainly undefined functions in unit_tests.h file. But it has already been included, and the c file is also in the same directory.

I have downloaded your zip file, opened up the whole glcd 0.5.2, copy and paste directly into my 'include path folder'
it still doesnt work. any advice?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have defined the selection of symbols as follows in the glcdTest01.c file

#define GLCD_DEVICE_XPLAINED_XMEGA_A3BU
#define GLCD_CONTROLLER_ST7565R
#define GLCD_USE_SPI
#define GLCD_INIT_NHD_C12832A1Z_FSW_FBW_3V3
#define GLCD_USE_AVR_DELAY
#define __DELAY_BACKWARD_COMPATIBLE__

am i doing it correctly?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am guessing that the way i define the symbols are wrong, I dunno how to create a makefile for this, dont really understand how the makefile works too..
anyone can help? I am on avr studio 4.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

dont really understand how the makefile works too.

https://www.gnu.org/software/mak...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The problem now is linking all the seperate c files together. I have this main.c , glcd.c, unit_tests.c. how do i link them tgt? they each have a header file..

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

The problem now is linking all the seperate c files together. I have this main.c , glcd.c, unit_tests.c. how do i link them tgt? they each have a header file..

Well how do you want to do this? Hand edited Makefiles or an IDE? If a beginner I'd suggest letting an IDE handle the Makefile generation for you may be easier.

If using an IDE it should just be a case of "Add existing item..." to add the .c files to the list to be compiled and linked. The .h files will look after themselves as long as #include's have been used correctly.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I kinda tot that the AS4 is an IDE, but seems like I was wrong, so I should use Eclipse instead?

or do you have any to recommend? Thank you.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No As4 should be just fine. As I say in an IDE a multiple C file project is just a case of "Add existing item..." and adding each .c source file in turn. Each gets separately compiled (-c) then the linker joins all the resultant .o files to create a composite .elf. As long as you ensure all .c were listed then everything resolves OK - otherwise you get "undefined reference" link errors.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

but as I compile with As4, the compiler says it cant find glcd.o , which glcd.c is a source file, of a few header files glcd_x.h
there is no main in glcd.c so i guess that is why it cant be converted into an object file?

but the int main is in this other c file called, test.c .
I was wondering how can I link all these together? I cant compile without including the glcd.c file, too many errors and undeclared functions, that is expected because the header files probably cant call the functions in its c file if I don add them in.
but when I have added them to the add existing source file folder, i compile, the compiler says it cant find glcd.o

I've worked whole day on this, still gotta write a report for this project. Kinda looks like I am going no where with this :(

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

the compiler says it cant find glcd.o , which glcd.c is a source file

That suggests that the .c file failed to compile then. Look at the Build Ouptut tab for details of what went wrong when compilation was attempted.
Quote:

there is no main in glcd.c so i guess that is why it cant be converted into an object file?

I wouldn't expect a "driver" file to contain main(). Usually you would be the one supplying an over-all main() that ties everything together and actually calls the functions the driver(s) provide(s). Of course there has to be a main() in one of the C files or you will get a link error saying that the CRT cannot find a function called main() to call.

I'll see if I can turn the files above into a building (no guarantees about actually working!) AS4 project later but my current computers don't have AS4 installed (just AS6) so I need to switch back to an old one to try AS4.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

rainblag wrote:
I have defined the selection of symbols as follows in the glcdTest01.c file

#define GLCD_DEVICE_XPLAINED_XMEGA_A3BU
#define GLCD_CONTROLLER_ST7565R
#define GLCD_USE_SPI
#define GLCD_INIT_NHD_C12832A1Z_FSW_FBW_3V3
#define GLCD_USE_AVR_DELAY
#define __DELAY_BACKWARD_COMPATIBLE__

am i doing it correctly?

No. These symbols need to be defined for ALL source files, not just glcdTest01.c.

Add these symbol definitions to the project properties.

BTW: you'll find main defined in glcdTest01.c.

My attachment includes a project (glcdTest01.cproj) for Atmel Studio 6.0. I haven't had AVR Studio 4.0 on any of my computers in a long time.

Don

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hi don, I understand that your project works for the studio 6, but I had studio 4 installed on my windows XP. I have tried defining in all source files, but to no avail. This error of " compiler cannot find glcd.o" still appears.

Will try finding alternatives, maybe install studio 6 on another com that I can get my hands to.
Thank you

Wilson

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

rainblag wrote:
hi don, I understand that your project works for the studio 6, but I had studio 4 installed on my windows XP. I have tried defining in all source files, but to no avail. This error of " compiler cannot find glcd.o" still appears.

Will try finding alternatives, maybe install studio 6 on another com that I can get my hands to.
Thank you

Wilson

As clawson suggested, the "cannot find glcd.o" error suggests that glcd.c did not compile successfully. Scroll back and look for earlier errors. Also, make sure glcd.c is included in your project.

Don