digital clock help required URGENT
Mon Oct 08 2007, 10:09 pm
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
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
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
{
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
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.
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:32 pm
that is the best option
you can take LCD tutorial codes as a reference for you.
you can take LCD tutorial codes as a reference for you.
Powered by e107 Forum System