Hello everyone,
I am trying to interface a JHD204A display in a dspic33 controller.
I have a few hardware issues ,connecting the LCD
Firstly the dspic33 operates with 3.3v.
The operating voltage of the LCD is 5v.
So is it ok if my Enable,RS,and data lines operates at 3.3v or should i level shift it upto 5v?
I drew a rough sketch of the circuit which i am going to implement on a bread board.
Secondly my data bus is not in sequence,so i created a function to write each bit individually.Please have a look at the code and please point out if i am missing anything.
I am stuck ,as the LCD is showing black square boxes only
I am trying to interface a JHD204A display in a dspic33 controller.
I have a few hardware issues ,connecting the LCD
Firstly the dspic33 operates with 3.3v.
The operating voltage of the LCD is 5v.
So is it ok if my Enable,RS,and data lines operates at 3.3v or should i level shift it upto 5v?
I drew a rough sketch of the circuit which i am going to implement on a bread board.
Secondly my data bus is not in sequence,so i created a function to write each bit individually.Please have a look at the code and please point out if i am missing anything.
Code:
#define EN LATBbits.LATB8
#define RS LATBbits.LATB9
#define D4 LATBbits.LATB10
#define D5 LATBbits.LATB11
#define D6 LATAbits.LATA0
#define D7 LATAbits.LATA1
void data(char ch)
{
if(ch & 1)
D4 = 1;
else
D4 = 0;
if(ch & 2)
D5 = 1;
else
D5 = 0;
if(ch & 4)
D6 = 1;
else
D6 = 0;
if(ch & 8)
D7 = 1;
else
D7 = 0;
}