robocop
Newbie level 2
This is the implementation of the circuit in proteus.
Hi everyone, we are interfacing a microcontroller with the LCD 4 liner and we have this problem..if we try to program a simple "Hello World" to be outputed in the LCd the LCD only display two black squares in 1 and 3 row lines.. and we have this code:
Code:
sbit LCD_RS at RB4_bit;
sbit LCD_EN at RB5_bit;
sbit LCD_D4 at RB0_bit;
sbit LCD_D5 at RB1_bit;
sbit LCD_D6 at RB2_bit;
sbit LCD_D7 at RB3_bit;
sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_RD_Direction at TRISB5_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB0_bit;
sbit LCD_D5_Direction at TRISB1_bit;
sbit LCD_D6_Direction at TRISB2_bit;
sbit LCD_D7_Direction at TRISB3_bit;
// End LCD module connections
char txt10[] = "HELLO WORLD";
void main(){
TRISB = 0x00;
ADCON1 = 0x7F;
CMCON = 0x07;
ADRESH = 0; // Configure AN pins as digital I/O
ADRESL = 0;
delay_ms(200);
Lcd_Init(); // Initialize LCD
delay_ms(200);
Lcd_Out_Cp(txt10);
}
---------- Post added at 13:51 ---------- Previous post was at 13:50 ----------
Please use code tags when posting code.
Attachments
Last edited by a moderator: