pablo palomba

908AP32 on CW5.0- Help with AS1_SendBlock.

Discussion created by pablo palomba on Mar 15, 2007
Latest reply on Mar 21, 2007 by pablo palomba
Hello,
I´m using the AP32 and CW5.0 to program.
I was trying to use "LCD_GetTxComplete();" or "AS1_GetTxComplete();" without results.
I´m sending some characters to a serial Display, and sometimes lose characters in Buffer, it is like the previous command, hasn´t any effect, I used a delay between sending and clearing but the same, The next code show what I'm talking about.

LCD_SendChar(148); //Command for display
LCD_SendBlock("Some text",9,&SND);
while (!(LCD_GetTxComplete())){}; // WITHOUT SUCCESS!
LCD_ClearTxBuf(); //IT CLEARS SOME CHARACTERS BEFORE SEND MESSAGE,


Another example:
LCD_ClearTxBuf();
/***************** DELAY *************
for (G=0;G65535;G++){ //delay 1.09 Seg
for (d=0;d8;d++){
}
d=0;
}
/*************************************
d=0;
LCD_SendChar(18); //I LOSE THIS DATA, 18 turn off the BACKLIT of LCD
d=0;
G=0;
/***************** DELAY *************
for (G=0;G65535;G++){ //delay 1.09 Seg
for (d=0;d8;d++){
}
d=0;
}
/*************************************
d=0;
/***************** DELAY *************
for (G=0;G65535;G++){ //delay 1.09 Seg
for (d=0;d8;d++){
}
d=0;
}
/*************************************
d=0;
LCD_ClearTxBuf();


Please, if somebody, can tell me how can I use "LCD_GetTxComplete();" to avoid lose of data, or another thing, I will appreciate a lot!.

Thanks and regards!

B_conf

Outcomes