We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello Everyone, Generally when interfacing LCD with my controller (AT89C52),in 8 bit mode I use a full port for my data lines. and I get the desired result.
But I have seen many projects where the data lines are split up in to two different ports, d0 to d3 in one port and d4 to d7 in another. Could someone please explain to me how this works or maybe please give me an example to work with.
Thanks in advance, Arun
Rather than "LCD_PORT = dat;" to output the data on LCD_PORT, you can split it up, in the most extreme case:
"LCD_D0 = (dat & 0x01)?1:0;" //for dat.0 "LCD_D1 = (dat & 0x02)?1:0;" //for dat.1 ... "LCD_D7 = (dat & 0x80)?1:0;" //for dat.7
In cases where you have multiple pins on the same port, you can group them.