cancel
Showing results for 
Search instead for 
Did you mean: 

I don't know how to use HAL_UART_Receive();

hukhongcongtu26111993
Associate II
Posted on September 22, 2015 at 11:25

I am trying to receive string from my PC then put it on the LCD. This my code :

char recieve[10];
while(__HAL_UART_GET_FLAG(&huart2,UART_FLAG_RXNE)==0){};
for(i=0;i<=9;i++)
{
HAL_UART_Receive(&huart2,(uint8_t *)&recieve[i],1,0xffff);
LCDString(&recieve[i]);
HAL_Delay(1000);
}

but LCD show 2 character only... ( if I send ''abcd'', LCD show ab only).... anyone tell me about this problem and code for mypurpose please... thanks!!!
2 REPLIES 2
hukhongcongtu26111993
Associate II
Posted on September 23, 2015 at 01:45

 You are very kind ! Thanks a lot !