Page 1 of 1

EB058 and AVR-Controller

Posted: Thu Jan 13, 2011 1:59 pm
by GeorgK
We work in our school with AVR-Controller (E-blocks) und we program these in C. We have bought several grafic-displays EB058. We need driver-functions. For the EB043 they exists, but not for the EB058. Can you help me?

Re: EB058 and AVR-Controller

Posted: Thu Jan 13, 2011 3:02 pm
by Benj
Hello,

Here is some example C code that should help to get you started. Let me know how you get on.

Re: EB058 and AVR-Controller

Posted: Tue Jan 18, 2011 9:47 am
by GeorgK
I have must modify some include directives. In the attachments is the c-code (compiled with avr gcc). The led on the EB058 is now on, but the display not put the text out! We work with avrstudio. Can you help me?

Re: EB058 and AVR-Controller

Posted: Tue Jan 18, 2011 10:04 am
by Benj
Hello,

Did the LCD clear correctly. Eg startup and fill with colour. Had a look at your program and it all seems to be ok. Maybe if you set the forecolour using the function then this may help?

Re: EB058 and AVR-Controller

Posted: Wed Jan 19, 2011 3:41 pm
by GeorgK
Hello,
the led on the diplay is on, but the diplay not responds.
My microcontroller is the ATMEGA 32.

I have connect the display on PortB
display -> PortB
CS -> 2
CLK -> 7
DO -> 5
DI -> 6

in the main function i have the following instructions, but no response.
FCD_gLCD0_Init();
FCD_gLCD0_SetBackColor(0,7,0);
FCD_gLCD0_Clear();
FCD_gLCD0_SetForeColor(7,0,0);
FCD_gLCD0_DrawBox(20, 10, 100, 40, 0, 1);
FCD_gLCD0_Print("Hello World", 5, 0, 1, 0);

Can you help me?

Re: EB058 and AVR-Controller

Posted: Thu Jan 20, 2011 2:09 pm
by Benj
Hello,

As a quick thought how are you powering the EB058? Are you using the +14V terminal or the +V terminal? You should be using the+14V terminal and using a 9 - 14V PSU with the programmer.

Also are you using the patch system on the board to wire across your pin connections? I take it you are doing this as the LED is lighting. Your pin assignments are correct for the ATMEGA32 anyway.

Re: EB058 and AVR-Controller

Posted: Thu Jan 20, 2011 2:18 pm
by Benj
Hello,

Sean has just suggested that if the SS pin is left as an input and floating then it can disable the SPI from functioning.

One option is to output a 0 to this pin before you start talking to the display.

Another option is to use the SS pin PB4 on the ATMEGA32 as the CS pin and this way the pin is always being used as an output and cannot take down the comms.

Re: EB058 and AVR-Controller

Posted: Thu Jan 20, 2011 3:05 pm
by GeorgK
Hello,
I am using the patch system on the EB058 and i have connected the V+ terminal to the +14V (multiprogrammer EB-019). When i connect the CS to the PB4 (SS) and change the line
#define

Code: Select all

MX_GFXLCD_CS  4
there is no change!

What is wrong??

Thanks
George

Re: EB058 and AVR-Controller

Posted: Fri Jan 21, 2011 12:17 pm
by Benj
Hello George,

Im really sorry, There was a fundemental bug in the example C code file I gave to you. I have fixed this now and hopefully the display should just work for you now.
glcdEB058.zip
(39.75 KiB) Downloaded 310 times
Let me know how you get on.