evaang2003
Newbie level 6
4 bit lcd code
hi, i have problem in changing 4 bit lcd module to 8 bit lcd module.
i have source code of temperature sensor using ds1820 which display temperature on 4 bit lcd module.
however, my lcd can only run on 8 bit module.
can anybody show me how to change it?
i am using ccs c compiler.
i attach here with 4bit lcd temp sensor code and 8 bit lcd driver.
here is the result after i combine them but it din work.
it keep telling me the LineOfCharacters does not match actual count.
why?
void main ( void )
{
char LineOfCharacters;
InitLCD();
GoToLine(1);
printf(WriteChar,"temperature is",1);
while ( TRUE )
{
ResetDS1820();
cDataOut = DS1820_SKIP_ROM;
WriteDS1820();
cDataOut = DS1820_CONVERT_T;
WriteDS1820();
WaitForConversion();
ResetDS1820();
cDataOut = DS1820_SKIP_ROM;
WriteDS1820();
cDataOut = DS1820_READ_SCRATCHPAD;
WriteDS1820();
ReadDS1820();
iTemperature = iDataIn / 2;
GoToLine(2);
printf ( WriteChar, "%lu%cC %lu%cF", iTemperature, DEGREE_SYM, ( ( 9 * iTemperature ) / 5 ) + 32, DEGREE_SYM );
}
}
hi, i have problem in changing 4 bit lcd module to 8 bit lcd module.
i have source code of temperature sensor using ds1820 which display temperature on 4 bit lcd module.
however, my lcd can only run on 8 bit module.
can anybody show me how to change it?
i am using ccs c compiler.
i attach here with 4bit lcd temp sensor code and 8 bit lcd driver.
here is the result after i combine them but it din work.
it keep telling me the LineOfCharacters does not match actual count.
why?
void main ( void )
{
char LineOfCharacters;
InitLCD();
GoToLine(1);
printf(WriteChar,"temperature is",1);
while ( TRUE )
{
ResetDS1820();
cDataOut = DS1820_SKIP_ROM;
WriteDS1820();
cDataOut = DS1820_CONVERT_T;
WriteDS1820();
WaitForConversion();
ResetDS1820();
cDataOut = DS1820_SKIP_ROM;
WriteDS1820();
cDataOut = DS1820_READ_SCRATCHPAD;
WriteDS1820();
ReadDS1820();
iTemperature = iDataIn / 2;
GoToLine(2);
printf ( WriteChar, "%lu%cC %lu%cF", iTemperature, DEGREE_SYM, ( ( 9 * iTemperature ) / 5 ) + 32, DEGREE_SYM );
}
}