Problem with LCD JHD 162A Please Heeeeeeeellllp!!!!!!!

General discussion on mikroC.
Post Reply
Author
Message
diegoest212
Posts: 3
Joined: 21 Oct 2011 07:27

Problem with LCD JHD 162A Please Heeeeeeeellllp!!!!!!!

#1 Post by diegoest212 » 21 Oct 2011 07:41

Hi every one,
I'm almost losing my mind with LCD JHD162A, I'm using MikroC PRO v4.15 and a PIC18F4480 or PIC18F4550...
I just want to display a "h" but the LCD is blank... Here is the code and connections...

sbit LCD_RS at RD2_bit;
sbit LCD_EN at RD3_bit;
sbit LCD_D4 at RD4_bit;
sbit LCD_D5 at RD5_bit;
sbit LCD_D6 at RD6_bit;
sbit LCD_D7 at RD7_bit;

sbit LCD_RS_Direction at TRISD2_bit;
sbit LCD_EN_Direction at TRISD3_bit;
sbit LCD_D4_Direction at TRISD4_bit;
sbit LCD_D5_Direction at TRISD5_bit;
sbit LCD_D6_Direction at TRISD6_bit;
sbit LCD_D7_Direction at TRISD7_bit;

void main()
{
OSCCON = 0x70;
TRISD = 0x00; //Configuración como salida para manejo del LCD.
TRISB = 0x00;
PORTD = 0;
delay_ms(1000);
Lcd_Init();
delay_ms(2000);
Lcd_Cmd(_LCD_CLEAR);
while(1)
{
Lcd_Init();
delay_ms(2000);
PORTB = 1;
Lcd_Out(1,1,"h");
Lcd_Out(1,1,"h");
Lcd_Out(1,1,"h");
Lcd_Out(1,1,"h");
Lcd_Out(1,1,"h");
delay_ms(2000);
PORTB = 0;
Lcd_Cmd(_LCD_CLEAR);
}
}


Connections:

Vss -> GND
Vcc -> +5Vcc
Vee -> Pot. 10K
RS -> PORTD PIN 2
R/W -> GND
E -> PORTD PIN 3
D0 -> GND
D1 -> GND
D2 -> GND
D3 -> GND
D4 -> PORTD PIN 4
D5 -> PORTD PIN 5
D6 -> PORTD PIN 6
D7 -> PORTD PIN 7

Post Reply

Return to “mikroC General”