That was it, I put a 50us delay between the writes and that fixed it up. I got everything working now as I want.
Thanks !
But now a new problem....
....So far, when playing with the GLCD, I've had my strings in program memory.
I'm trying to use a 1wire device, and trying to translate my value into a string.
I've tried using itoa to convert it to a string, but I keep getting the same error.
Code:
Error [1109] type mismatch in redeclaration of 'write_lcd'
My code
Code:
void write_lcd(unsigned char xPos, unsigned char yPos, rom char *str);
Code:
rom char tempLow;
rom char tempHigh;
Code:
void onewire_ConvertT()
{
int temperature;
int tempL,tempH;
int temp;
onewire_reset();
onewire_write_byte(skipRom);
onewire_write_byte(convertT);
delay500ms();
onewire_write_byte(readScratchpad);
tempL=onewire_read_byte();
delay1us();
tempH=onewire_read_byte();
delay1us();
tempLow=itoa(tempL);
if(onewire_reset()==0)
{
write_lcd(0,4,tempLow);
write_lcd(0,5,tempHigh);
}
}
The code as it stands probably will not work, as its incomplete and im still pouring over the datasheet for timings. I would just like to know how i can go about converting an int to a string so that I can use it with my write_lcd().