??? 01/10/05 16:48 Read: times |
#84681 - Beware - early ti/ri flags! Responding to: ???'s previous message |
If you want to time some event - e.g. switch direction - starting from ti-flag set (-> serial port interrupt), note, that it is set when the stopbit starts (not when it is finished), hence you might need to wait for 2 bit times to create the "2 stopbit".
When continously transmitting, for 2 stopbits it might be enough to wait 1 stopbit, as the UART delays the transmission of a byte for 1 bit time since write to SBUF. Similarly, the ri flag is set in the middle of reception of the stopbit. Please read carefully the datasheet, it is clearly indicated in the timing diagrams of the UART. Jan Waclawek |
Topic | Author | Date |
MODBUS on UART (parity & stop bits?) | 01/01/70 00:00 | |
parity and stop | 01/01/70 00:00 | |
parity and stop | 01/01/70 00:00 | |
2 Stop Bits | 01/01/70 00:00 | |
stop bit | 01/01/70 00:00 | |
Beware - early ti/ri flags! | 01/01/70 00:00 | |
Modbus![]() | 01/01/70 00:00 |