aswathymohan
Member level 4
- Joined
- Nov 11, 2012
- Messages
- 68
- Helped
- 5
- Reputation
- 10
- Reaction score
- 5
- Trophy points
- 1,288
- Activity points
- 1,727
Hi,
I am using a pic development board (v.3) for lcd interfacing program in Mikroc.This is the code which i have used
The LCD I am working with is JHD162A and clock frequency is 16 Mhz.I tested the same in Proteus and got output.But in hardware part,it is showing garbage values,how can settle this problem
I checked all the connections -R/w ,contrast is connected to ground,D0-D3 is left open
Regards
I am using a pic development board (v.3) for lcd interfacing program in Mikroc.This is the code which i have used
Code:
// LCD module connections
sbit LCD_RS at RB0_bit;
sbit LCD_EN at RB1_bit;
sbit LCD_D4 at RB2_bit;
sbit LCD_D5 at RB3_bit;
sbit LCD_D6 at RB4_bit;
sbit LCD_D7 at RB5_bit;
sbit LCD_RS_Direction at TRISB0_bit;
sbit LCD_EN_Direction at TRISB1_bit;
sbit LCD_D4_Direction at TRISB2_bit;
sbit LCD_D5_Direction at TRISB3_bit;
sbit LCD_D6_Direction at TRISB4_bit;
sbit LCD_D7_Direction at TRISB5_bit;
// End LCD module connections
void main(){
TRISB = 0x00; // Configure PORTB pins as digital
PORTB = 0x00;
delay_ms(100);
Lcd_Init(); // Initialize Lcd
delay_ms(1000);
Lcd_Cmd(_LCD_CLEAR); // Clear display
Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off
delay_ms(100);
while(1) { // Endless loop
Lcd_Out(1,1,"hello"); // Write text in first row
}
}
The LCD I am working with is JHD162A and clock frequency is 16 Mhz.I tested the same in Proteus and got output.But in hardware part,it is showing garbage values,how can settle this problem
I checked all the connections -R/w ,contrast is connected to ground,D0-D3 is left open
Regards