• Earle F. Philhower, III's avatar
    Fix SerialPIO sampling, avoid reading random garbage (#544) · 5927d4ee
    Earle F. Philhower, III authored
    Adjust the 1/2 bit time to match the number of extra cycles in the actual
    PIO loop.
    
    Throw out the entire start bit, which results in sampling the data at the
    midpoint and not the starting time of a bit (which was causing random
    failures on read data).
    
    Tested at 300bps all the way to 2,000,000bps using a loopback connection.
    
    Fixes #360
    5927d4ee
SerialPIO.cpp 10.3 KB