Skip to content

UART Frame Timeline

Run the UART Frame Timeline MicroSim Fullscreen

You can include this MicroSim on your website using the following iframe:

<iframe src="https://dmccreary.github.io/robot-arm/sims/uart-frame-timeline/main.html"
        height="622px" width="100%" scrolling="no"></iframe>

Description

Choose a baud rate and a packet and see every byte laid out as a ten-bit frame on a time line, with the total time to send it. Then answer five timing problems with the formula bytes times 10 divided by baud. Used in Chapter 4.

Each frame is one byte on the wire with 8N1 framing: an orange start bit, eight blue data bits and a green stop bit. The two bars under the frames compare the same packet at 1,000,000 baud and at the baud rate you chose, on one time scale. The times are time on the wire only. USB and software delays are extra.

Lesson Plan

Grade level: Middle school and up (age 12+). Time: 10 to 15 minutes.

  1. Count first. In Explore mode, count the boxes in one frame. A byte has 8 data bits, so why are there 10 boxes?
  2. Explore. Pick a slower baud rate. The number of bits stays the same, but the lower bar grows. Each bit lasts longer.
  3. Problems. Five problems in a fixed order. Type the time in the unit shown and press Check. You get one try for each problem, and 4 of 5 is mastery.
  4. Think about it. Problem 5 shows that six position reads take 16.67 ms at 57,600 baud. A control loop that runs 50 times a second has 20 ms for each pass. Is that enough room for anything else?

The three packets are the ping request, the position-read request and the position-read reply from Chapter 4. The eight baud rates are the STS3215 baud rate codes 0 to 7 in the chapter's table.

Specification

The learning objective, evidence of mastery and content for this MicroSim are specified in Chapter 4: Serial and CAN Communication.