Author Topic: Bit Timing Issues With a Software Bit-Banged UART  (Read 6228 times)

0 Members and 1 Guest are viewing this topic.

Offline Renate

  • Super Contributor
  • ***
  • Posts: 1460
  • Country: us
Re: Bit Timing Issues With a Software Bit-Banged UART
« Reply #25 on: May 09, 2021, 11:15:44 pm »
that still doesn't make sense to me.
If you want to get an idea how much an average tomato weighs, put 100 tomatoes on a scale, then divide by 100.

Yes, if you know that the data coming off is at full speed (no pauses) then measuring a full char or more chars will give you more accuracy.
You could send a MB of data and time it with a stop watch.
At 1200-8-n-1 it should take 2 hours, 25 minutes, 38 seconds. >:D
 

Offline MIS42N

  • Frequent Contributor
  • **
  • Posts: 512
  • Country: au
Re: Bit Timing Issues With a Software Bit-Banged UART
« Reply #26 on: May 10, 2021, 12:32:52 am »
that still doesn't make sense to me.
If you want to get an idea how much an average tomato weighs, put 100 tomatoes on a scale, then divide by 100.

Yes, if you know that the data coming off is at full speed (no pauses) then measuring a full char or more chars will give you more accuracy.
You could send a MB of data and time it with a stop watch.
At 1200-8-n-1 it should take 2 hours, 25 minutes, 38 seconds. >:D
Or I could set up a gated timer, send one SYN character, measure the time between the first two transitions to the nearest 21 nanoseconds (PIC processor with 16MHz clock and x3 PLL). At 1200 baud it takes a few milliseconds and gets the figure to better than 0.01%. Normally that's enough to settle on a standard baud rate (1200,2400,4800,9600,etc) but if the rate is truly unknown then send a few SYN characters and get the average. Measuring 2 hours, 25 minutes, 38 seconds to the nearest second is less accurate.

Like most things there are many ways to solve a problem. Your way works. My way works. I didn't think your way made sense but now I see it is a way of solving the problem. Thanks for the clarification.
 

Offline Renate

  • Super Contributor
  • ***
  • Posts: 1460
  • Country: us
Re: Bit Timing Issues With a Software Bit-Banged UART
« Reply #27 on: May 10, 2021, 12:40:28 am »
Yes, but measuring a single bit will tell you nothing.
The slew rate may be faster/slower going up than down.
So your zeroes are not going to be the same length as the ones anyway.
Throw in jitter and who knows what you're measuring.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf