Basic line and shape functions come out distorted

General discussion on Visual GLCD Software.
Post Reply
Author
Message
ISpitFireXI
Posts: 5
Joined: 20 Jun 2017 19:36
Location: US

Basic line and shape functions come out distorted

#1 Post by ISpitFireXI » 30 Jun 2017 14:33

When I use the MikroC GLCD functions to make lines, shapes, or dots it comes out with this weird distorted pattern. But if I use fill, or if I use a bitmap image it looks fine.

Here's the source to a test program that just makes a line blink on the screen, and a picture of what it looks like. I have no idea what could be causing this.

Code: Select all


// Glcd module connections
char GLCD_DataPort at PORTD;

sbit GLCD_CS1 at LATB0_bit;
sbit GLCD_CS2 at LATB1_bit;
sbit GLCD_RS  at LATB2_bit;
sbit GLCD_RW  at LATB3_bit;
sbit GLCD_EN  at LATB4_bit;
sbit GLCD_RST at LATB5_bit;

sbit GLCD_CS1_Direction at TRISB0_bit;
sbit GLCD_CS2_Direction at TRISB1_bit;
sbit GLCD_RS_Direction  at TRISB2_bit;
sbit GLCD_RW_Direction  at TRISB3_bit;
sbit GLCD_EN_Direction  at TRISB4_bit;
sbit GLCD_RST_Direction at TRISB5_bit;
// End Glcd module connections

void main() {


  TRISD = 0x00;

  ANSELB = 0;                        // Configure PORTB pins as digital I/O
  ANSELD = 0;                        // Configure PORTD pins as digital I/O

  Glcd_Init();                                   // Initialize GLCD
  Glcd_Fill(0x00);                               // Clear GLCD

  while(1) {
    
    Glcd_Line(0,0,127,63,1);
    Delay_ms(1000);
    Glcd_Fill(0x00);
    Delay_ms(1000);
    
  }

}
Snapshot.jpg
Snapshot.jpg (41.58 KiB) Viewed 3073 times

User avatar
darko.ilijevski
Posts: 581
Joined: 21 Mar 2017 16:57

Re: Basic line and shape functions come out distorted

#2 Post by darko.ilijevski » 03 Jul 2017 17:32

Hello,

Can you please provide us with a bit more info - what MCU are you using and on which development system ?
Also I have cropped your image as it was way too big...

Best regards
BR,
Darko

ISpitFireXI
Posts: 5
Joined: 20 Jun 2017 19:36
Location: US

Re: Basic line and shape functions come out distorted

#3 Post by ISpitFireXI » 06 Jul 2017 13:12

darko.ilijevski wrote:Hello,

Can you please provide us with a bit more info - what MCU are you using and on which development system ?
Also I have cropped your image as it was way too big...

Best regards

Sorry about the picture size. I'm using a PIC16F18877 on a EasyPICv7 with MikroC.

User avatar
darko.ilijevski
Posts: 581
Joined: 21 Mar 2017 16:57

Re: Basic line and shape functions come out distorted

#4 Post by darko.ilijevski » 07 Jul 2017 12:50

Hello,

It seems that it's a bug with that particular MCU, I will report this to our developers.
Thanks for the notice.

Best regards
BR,
Darko

Post Reply

Return to “Visual GLCD General”