PIC16f877A and QL200 develoment board/ LCD problem

General discussion on mikroC PRO for PIC.
Post Reply
Author
Message
dragonfly56360
Posts: 1
Joined: 14 Apr 2014 15:46

PIC16f877A and QL200 develoment board/ LCD problem

#1 Post by dragonfly56360 » 14 Apr 2014 16:03

Hello every body,

I have a little problem I don t understand. I have a very simple program to use my LCD on my development board I have just bought.

I just want to see my sentence every seconds on my screen using a PIC16f877a.
Here my code:

Code: Select all

sbit LCD_RS at RA1_bit;
sbit LCD_EN at RA3_bit;
sbit LCD_D7 at RD7_bit;
sbit LCD_D6 at RD6_bit;
sbit LCD_D5 at RD5_bit;
sbit LCD_D4 at RD4_bit;


sbit LCD_RS_Direction at TRISA1_bit;
sbit LCD_EN_Direction at TRISA3_bit;
sbit LCD_D7_Direction at TRISD7_bit;
sbit LCD_D6_Direction at TRISD6_bit;
sbit LCD_D5_Direction at TRISD5_bit;
sbit LCD_D4_Direction at TRISD4_bit;



void main(){


CMCON=0x07;

    ADCON1=0X07;               //a port as ordinary i/o.
    TRISA=0X00;                //a port as output.
    TRISD=0X00;                //d port as output.

   Lcd_Init();



do{
Lcd_Out(1,2,"First project");
Lcd_Out(2,2,"with lcd screen");

delay_ms(1000);

Lcd_cmd(_LCD_CLEAR);

Delay_ms(1000);
}while(1);
}

Unfortunately, nothing.... My screen is just yellow.
I checked the PIN assignments, and they are correct.
Here the assignment (see p22) : http://www.pic16.com/soft/QL200_user_a4_en.pdf

Could you give me an idea or a solution?

Thank you.

User avatar
petar.timotijevic
mikroElektronika team
Posts: 1739
Joined: 19 Feb 2014 13:46
Location: Serbia
Contact:

Re: PIC16f877A and QL200 develoment board/ LCD problem

#2 Post by petar.timotijevic » 16 Apr 2014 04:15

Hello,

Try with this:

Code: Select all

 
  ADCON1  = 0;                       // Configure AN pins as digital I/O
  CMCON = 0;                         // Disable comparators
Best regards,
Peter

Post Reply

Return to “mikroC PRO for PIC General”