libftdi Archives

Subject: Re: libftdi-1.0: More patches

From: Robert Pearce <rob@xxxxxxxxxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Fri, 2 Sep 2011 22:41:01 +0100
On Fri, 2 Sep 2011 21:26:10 +0200
Uwe Bonnes <bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

> >>>>> "Jim" == Jim Paris <jim@xxxxxxxx> writes:
> 
> ...
>     >> results. However with the RS232 pattern you can't easily measure
>     >> exact frequency with the scope.
>        ^^^^^
>     Jim> If you send a continuous string of UUUUU then you'll see the base
>     Jim> frequency as a simple square wave.
> 
> But the square wave is disturbed by the start/stop bits and the
> turnaround between bytes. So you can estimate the frequency, but not measure
> exact. 
> 
Well, yes, but... every UART I've ever tested will send the start bit
of an already-queued byte immediately at the end of the requested
number of stop bits. The ASCII value for 'U' is 0x55, so its bit
pattern is <start0>10101010<stop1>. If you set up no parity, 8 bit, one
stop and send UUUUUUUUU then this really does produce a perfect
square-wave. Of course, the scope will report the frequency in terms of
full cycles, so that's half the Baud rate.

Cheers,
Rob

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread