I am trying to use the qslogger demo in LM4f232 Evaluation. What I am doing is I created a function:
void display_float(unsigned int s,unsigned int t,unsigned int u,unsigned int v,unsigned int w,unsigned int x)
{
s=s+0x30; //convert each digit to equivalent ASCII value
t=t+0x30;
u=u+0x30;
v=v+0x30;
w=w+0x30;
x=x+0x30;
UART0_DR_R =x;
while((UART0_FR_R & ~(1<<5))==0);
UART0_FR_R =UART0_FR_R & ~(1<<5);
DelayMs1(100);
UART0_DR_R =w;
while((UART0_FR_R & ~(1<<5))==0);
UART0_FR_R =UART0_FR_R & ~(1<<5);
DelayMs1(100);
UART0_DR_R =v;
while((UART0_FR_R & ~(1<<5))==0);
UART0_FR_R =UART0_FR_R & ~(1<<5);
DelayMs1(100);
UART0_DR_R =u;
while((UART0_FR_R & ~(1<<5))==0);
UART0_FR_R =UART0_FR_R & ~(1<<5);
DelayMs1(100);
UART0_DR_R ='.';
while((UART0_FR_R & ~(1<<5))==0);
UART0_FR_R =UART0_FR_R & ~(1<<5);
DelayMs1(100);
UART0_DR_R =t;
while((UART0_FR_R & ~(1<<5))==0);
UART0_FR_R =UART0_FR_R & ~(1<<5);
DelayMs1(100);
UART0_DR_R =s;
while((UART0_FR_R & ~(1<<5))==0);
UART0_FR_R =UART0_FR_R & ~(1<<5);
DelayMs1(100);
UART0_DR_R ='\r';
while((UART0_FR_R & ~(1<<5))==0);
UART0_FR_R =UART0_FR_R & ~(1<<5);
DelayMs1(100);
//usart_send_data('\r');
}
This function I am trying to call from (in acquire.c)
static void
ProcessDataItems(tLogRecord *pRecord)
{
DelayMs1(10000);
display_float(1,2,3,4,5,6);
tabspace();
DelayMs1(10000);
display_float(1,1,1,1,1,1);
tabspace();
DelayMs1(10000);
display_float(2,2,2,2,2,2);
DelayMs1(10000);
}
As you can see I have called this function three times:
DelayMs1(10000);
display_float(1,2,3,4,5,6);
tabspace();
DelayMs1(10000);
display_float(1,1,1,1,1,1);
tabspace();
DelayMs1(10000);
display_float(2,2,2,2,2,2);
DelayMs1(10000);
But when I see the result in teraterm, I find it only prints values from two calls:
6543.21 1111.11
Why I am not getting out put from the third call which should print 2222.22
The defintions of tabspace() others are given below:
void tabspace()
{
UART0_DR_R ='\t';
while((UART0_FR_R & ~(1<<5))==0);
UART0_FR_R =UART0_FR_R & ~(1<<5);
DelayMs1(1);
}
void enter()
{
UART0_DR_R ='\r\r';
while((UART0_FR_R & ~(1<<5))==0);
UART0_FR_R =UART0_FR_R & ~(1<<5);
DelayMs1(1);
}
void DelayMs1(unsigned int count)
{ // mSec Delay 11.0592 Mhz
unsigned int i; // Keil v7.5a
while(count) {
i = 115; // 115 exact value
while(i>0)
i--;
count--;
}
}
Please advice what is wrong here ?