Page 1 of 1

The LED examples for MikroBASIC work fine, the glcd doesn't.

Posted: 13 Feb 2008 10:45
by Sirchip
I have the "EasyAVR4" development board.

I have the latest version of MikroBASIC installed. The LED_blinking, and LED_curtain tests worked fine.

For testing of the large graphical LCD display I tried the following example test: glcd_test.abap. This test was created on Thursday, September 28, 2006.

When building and running the test the AVRFLASH programmer Loaded and wrote the program to Flash memory properly, there were no errors.
The glcd did not show anything. The display is lit properly, the changeable pin is in the graphical pin position. The contrast control works fine and does adjust the contrast. I tried all different positions for the contrast control, but still no graphical characters were viewed during multiple, attempted, glcd_test.abap tests. The glcd is properly mounted on the pins and socket assembly.

I sure would like to see something on the glcd. Please give me some ideas. Thank you.--Mike

Same problem here

Posted: 13 Jun 2008 17:50
by ka5mal
Mike,

I also have a similar problem but with PIC microcontrollers. The LED is blinking fine. But when I include the glcd_init line below

T6963C_init(240, 128, 8, PORTD, PORTA, 3, 2, 0, 1)

the whole program compiles but the LED blinking is also stopped. Nothing comes to the GLCD either. Did you get any feedback ?

Thanks
Kamal

Re: Same problem here

Posted: 17 Jun 2008 15:48
by marko.medic
Hi Mike,

Here is the code that should work with EasyAVR4 and ATMEGA16:

Code: Select all

'
'* Project name:
'     graphical LCD test
'* Author:
'     MikroElektronika, July 2006.
' * Description:
'     This program demonstrates how to use GLCD library. This example is writing
'     images, text, lines, rectangle, boxes, cycles and more.
' * Test configuration:
'     MCU:             ATmega16
'     Dev.Board:       Easy AVR 4
'     Oscillator:      External, 8 MHz
'     Ext. Modules:
'     SW:              mikroBasic for AVR 4.02
' * NOTES:
'
program glcd_test
include "images"          '  you can put you owen pictures in this library.
dim  i as byte
sub procedure wait
  delay_ms(2000)
end sub
main:
  Glcd_Init(PORTD, 2, 3, 4, 5, 7, 6, PORTA)
  Glcd_Set_Font(font5x7,5,8,32)
  while true
    Glcd_Image(mikro_logo_bmp)
    wait
    Glcd_Image(logo_atmel_bmp)
    wait
    Glcd_Fill($00)
    Glcd_Write_Text("mikroBasic compiler",6,1,1)
    Glcd_Write_Text("for Atmel AVR MCU"   ,12,3,1)
    Glcd_Write_Text("by",55,5,1)
    Glcd_Write_Text("mikroElektronika",15,7,1)
    wait
    Glcd_Fill($00)
    Glcd_Box(  0,50, 10, 63, 1)
    Glcd_Rectangle( 10,20, 20, 63, 1)
    Glcd_Box( 20,40, 30, 63, 1)
    Glcd_Rectangle( 30,10, 40, 63, 1)
    Glcd_Box( 40,30, 50, 63, 1)
    Glcd_Rectangle( 50,50, 60, 63, 1)
    Glcd_Box( 60,40, 70, 63, 1)
    Glcd_Rectangle( 70,10, 80, 63, 1)
    Glcd_Box( 80,20, 90, 63, 1)
    Glcd_Rectangle( 90, 5,100, 63, 1)
    Glcd_Box(100,40,110, 63, 1)
    Glcd_Rectangle(100,50,120, 63, 1)
    wait
    Glcd_Fill($00)
    i=0
    while i<30
      Glcd_Rectangle(i,i,127-i, 63-i, 1)
      i=i+5
    wend
    wait
    Glcd_Fill($00)
    i=1
    while i<31
      Glcd_Circle(63, 31, i, 1)
      i=i+5
    wend
    wait
    Glcd_Fill($FF)
    wait
    Glcd_Line(35,50,63,10,0)
    Glcd_Line(63,10,91,50,0)
    Glcd_Line(35,50,91,50,0)
    Glcd_Line(63,10,30,35,0)
    Glcd_Line(35,50,30,35,0)
    wait
  wend
end.
ka5mal wrote:Mike,

I also have a similar problem but with PIC microcontrollers. The LED is blinking fine. But when I include the glcd_init line below

T6963C_init(240, 128, 8, PORTD, PORTA, 3, 2, 0, 1)

the whole program compiles but the LED blinking is also stopped. Nothing comes to the GLCD either. Did you get any feedback ?

Thanks
Kamal
Kamal:

Please post your thread in section for PIC MCUs. This section is for AVR

Best Regards