--- Quote Start ---
The bit takes time to send. So you need to check your bit in the middle of that duration so you know for sure what bit you read. On the edges gives inacurate readings. Also, you need to pass your signal trough a synchronizer to prevent metastability.
Back to read in the middle: Once you detected the start bit (first falling edge after stopbit) you wait half the bittime and than start reading.
--- Quote End ---
how do i check i the middle? can you help me? if you can to take my code and show me how to check in the middle :) thanks