best way of monitoring & capturing usart protocol for find & storing of a character
hi every one
is there any special function for this purpose ?
i am currently read characters byte by byte and compare them with desire character but i dont know why it does not work some time
my way :
Code:
do
R_Buffer=usart_reci(1);//function of receiving characters from usart 1 its work correctly
while( R_Buffer=='o'| R_Buffer=='O');
Re: best way of monitoring usart protocol for finding & storing of a desire character
Read each byte inside uart-rx interrupt, increase reseived byte counter, use a timer with interrupt to check when package will end, in main loop check ready flag and determine received data. Timer should overflow after 1,5 bytes receive time.
STM8 example