EB058 and AVR-Controller

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
GeorgK
Posts: 4
Joined: Tue Jan 11, 2011 12:11 pm

EB058 and AVR-Controller

Post 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?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: EB058 and AVR-Controller

Post by Benj »

Hello,

Here is some example C code that should help to get you started. Let me know how you get on.
Attachments
EB-058.c
(28.49 KiB) Downloaded 310 times

GeorgK
Posts: 4
Joined: Tue Jan 11, 2011 12:11 pm

Re: EB058 and AVR-Controller

Post 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?
Attachments
glcdEB058.zip
(35.56 KiB) Downloaded 278 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: EB058 and AVR-Controller

Post 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?

GeorgK
Posts: 4
Joined: Tue Jan 11, 2011 12:11 pm

Re: EB058 and AVR-Controller

Post 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?
Attachments
glcdEB058.zip
(40.09 KiB) Downloaded 273 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: EB058 and AVR-Controller

Post 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.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: EB058 and AVR-Controller

Post 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.

GeorgK
Posts: 4
Joined: Tue Jan 11, 2011 12:11 pm

Re: EB058 and AVR-Controller

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: EB058 and AVR-Controller

Post 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 309 times
Let me know how you get on.

Post Reply