hesho90
Member level 4
- Joined
- Sep 3, 2012
- Messages
- 78
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Location
- egypt
- Activity points
- 1,778
sbit LCD_RS at RB0_bit;
sbit LCD_EN at RB1_bit;
sbit LCD_D4 at RB4_bit;
sbit LCD_D5 at RB5_bit;
sbit LCD_D6 at RB6_bit;
sbit LCD_D7 at RB7_bit;
sbit LCD_RS_Direction at TRISB0_bit;
sbit LCD_EN_Direction at TRISB1_bit;
sbit LCD_D4_Direction at TRISB4_bit;
sbit LCD_D5_Direction at TRISB5_bit;
sbit LCD_D6_Direction at TRISB6_bit;
sbit LCD_D7_Direction at TRISB7_bit;
void main() {
LCD_init();
Lcd_Out(1, 1, "hello");
}
Did the Proteus simulation work?
Try after connecting D0, D1, D2, D3 to ground... adjust the contrast of the LCD by varying the pot..or preset.
sbit LCD_RS at RB0_bit;
sbit LCD_EN at RB1_bit;
sbit LCD_D4 at RB4_bit;
sbit LCD_D5 at RB5_bit;
sbit LCD_D6 at RB6_bit;
sbit LCD_D7 at RB7_bit;
sbit LCD_RS_Direction at TRISB0_bit;
sbit LCD_EN_Direction at TRISB1_bit;
sbit LCD_D4_Direction at TRISB4_bit;
sbit LCD_D5_Direction at TRISB5_bit;
sbit LCD_D6_Direction at TRISB6_bit;
sbit LCD_D7_Direction at TRISB7_bit;
void main() {
TRISB = 0;
LCD_init();
Lcd_Out(1, 1, "hello");
}
do i have to use the same code from the your linkWhat is the value of POT you used?
Check whether the VDD, VSS of PIC and LCD are correct ...
Connect the constant resistance points of POT to VDD and VSS, variable resistance point to Ve of LCD..
Check the link that I give you...
Code C - [expand] 1 2 sbit LCD_RS at RB0_bit; sbit LCD_EN at RB1_bit;
Code C - [expand] 1 2 sbit LCD_RS at RB1_bit; sbit LCD_EN at RB0_bit;
this my new codeChange
Code C - [expand] 1 2 sbit LCD_RS at RB0_bit; sbit LCD_EN at RB1_bit;
to
Code C - [expand] 1 2 sbit LCD_RS at RB1_bit; sbit LCD_EN at RB0_bit;
sbit LCD_RS at RC0_bit;
sbit LCD_RW at RC1_bit;
sbit LCD_EN at RC2_bit;
sbit LCD_D0 at RB0_bit;
sbit LCD_D1 at RB1_bit;
sbit LCD_D2 at RB2_bit;
sbit LCD_D3 at RB3_bit;
sbit LCD_D4 at RB4_bit;
sbit LCD_D5 at RB5_bit;
sbit LCD_D6 at RB6_bit;
sbit LCD_D7 at RB7_bit;
sbit LCD_RS_Direction at TRISC0_bit;
sbit LCD_RW_Direction at TRISC1_bit;
sbit LCD_EN_Direction at TRISC2_bit;
sbit LCD_D0_Direction at TRISB0_bit;
sbit LCD_D1_Direction at TRISB1_bit;
sbit LCD_D2_Direction at TRISB2_bit;
sbit LCD_D3_Direction at TRISB3_bit;
sbit LCD_D4_Direction at TRISB4_bit;
sbit LCD_D5_Direction at TRISB5_bit;
sbit LCD_D6_Direction at TRISB6_bit;
sbit LCD_D7_Direction at TRISB7_bit;
void main() {
TRISC = 0;
TRISB = 0;
LCD_init();
Lcd_Out(1, 1, "hello");
}
fide? fade? Post your new code. Post your Circuit.
sbit LCD_EN at RB0_bit;
sbit LCD_RS at RB1_bit;
sbit LCD_D4 at RB4_bit;
sbit LCD_D5 at RB5_bit;
sbit LCD_D6 at RB6_bit;
sbit LCD_D7 at RB7_bit;
sbit LCD_EN_Direction at TRISB0_bit;
sbit LCD_RS_Direction at TRISB1_bit;
sbit LCD_D4_Direction at TRISB4_bit;
sbit LCD_D5_Direction at TRISB5_bit;
sbit LCD_D6_Direction at TRISB6_bit;
sbit LCD_D7_Direction at TRISB7_bit;
void main() {
TRISA = 0;
TRISB = 0;
LCD_init();
Lcd_Out(1, 1, "hello");
}
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?