Регистриран на: Вто Май 29, 2007 2:23 pm Мнения: 3714 Местоположение: Високо в планината
ето какво пише в даташита:
Цитат:
If the break is longer than 13 bit times, the reception is considered complete after the number of bit times specified by PDSEL and STSEL. The URXDA bit is set, FERR is set, zeros are loaded into the receive FIFO, interrupts are generated if appropriate and the RIDLE bit is set.
добавих проверка за грешка и на FERR бита
Код:
while(!DataRdyUART1() || U1STAbits.FERR==1);
, но сега пък не приема въобще. И флаговете чистя ръчно:
Return Value
[b]If ‘1’ is returned, it indicates that the receive buffer has a data to be read.[/b]
If ‘0’ is returned, it indicates that receive buffer does not have any new data to be read.
Remarks:
This function returns the status of the UART receive buffer. This indicates if the UART receive buffer contains any new data that is yet to be read as indicated by the UxSTA<URXDA> bit.
Потребители разглеждащи този форум: 0 регистрирани и 3 госта
Вие не можете да пускате нови теми Вие не можете да отговаряте на теми Вие не можете да променяте собственото си мнение Вие не можете да изтривате собствените си мнения Вие не можете да прикачвате файл