embedded_galaxy
Newbie level 4
hi,
i am working on 16x2 lcd with 4bit mode on pic18f. my connections are as follows :
so my shifting bits are as follows :
is the right way?
is shifting of bits are ok with my data lines connections(D4-D7,RA3-RA0)?
my other configuration for lcd is OK(code is work fine with different data line connections).
is D0-D3 must connected to gnd?
ASAP
thanks
i am working on 16x2 lcd with 4bit mode on pic18f. my connections are as follows :
- RS -RA5
- E - RA4
- D4 - RA3
- D5 - RA2
- D6 - RA1
- D7 - RA0
so my shifting bits are as follows :
Code:
/* First nibble */
E_BIT_HIGH; // E to HIGH
udelay(2);
// Write data
LATA = ((LATA & 0x0F) | ((cmd & 0xF0)));
/* Second nibble */
// E to HIGH
LCD_E_BIT_HIGH;
udelay(2);
// Write data
LATA = ((LATA & 0x0F) | (cmd &0x0F)>>4);
is the right way?
is shifting of bits are ok with my data lines connections(D4-D7,RA3-RA0)?
my other configuration for lcd is OK(code is work fine with different data line connections).
is D0-D3 must connected to gnd?
ASAP
thanks
Last edited by a moderator: