Discussion in "Project Help" started by    darshini    Sep 19, 2007.
Mon Oct 08 2007, 10:09 pm
#31
this particular code is from the header file i sent you previously
i was trying to modify it so that i could use it in the 8 bit mode
i dont know which pin in the hardware it is commected too
Mon Oct 08 2007, 10:10 pm
#32
void LCD_CHAR(unsigned char dat)
{
if(k<32){
if(kline==16 && position==line1)
{
kline=0;
LCD_CMD(PUTLINE2);
}
P0=0x01;
EN=0;
RS=1; //Operation is data write
RW=0;

P0=(dat&0xF0)|0x09; // Higher nibble first
PULSE();

P0=((dat&(0x0F))*16)|0x09; // Lower nibble next
PULSE();
k++;
kline++;
}
}


this has a similar bitwise ORing
Mon Oct 08 2007, 10:21 pm
#33
they are just setting or clearing the control bits.. nothing much...
Thats why i am saying that you need the original hardware schematic for which the code is written for. If you want to modify it for 8-bit then.. simply remove the lcd.h file from your project and write it from scratch. As 8-bit and 4-bit modes are totally different from each other.
Mon Oct 08 2007, 10:24 pm
#34
hmm thanks i'l do that
Mon Oct 08 2007, 10:32 pm
#35
that is the best option
you can take LCD tutorial codes as a reference for you.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

KevinTab
Sun Apr 28 2024, 05:35 am
Tumergix
Sun Apr 28 2024, 12:59 am
StevenDrulk
Sat Apr 27 2024, 08:47 pm
StephenHauct
Sat Apr 27 2024, 09:38 am
Adamsaf
Sat Apr 27 2024, 07:12 am
Robertphype
Sat Apr 27 2024, 12:23 am
ktaletrryp
Fri Apr 26 2024, 10:55 pm
Robertrip
Fri Apr 26 2024, 11:20 am