Lab + Quiz: Asynchronous Serial Communication


After reading all of the materials, I'm not sure what this lab is for and why we need to learn it... I feel like a zombie when doing the lab... I also did the Serial Input to P5.js but didn't manage making the dots' size adjust based on the knob. I'll debug it after the class. I'll post that lab with a p5.js sketch created by myself later this week.


Quiz Answers: 

1. When two computers communicate using asynchronous serial communication, there are properties that they must both agree upon in order to communicate. What are those properties?

data rate, voltage of pulses, and true or invert logic

2. How many applications can access a given serial port on your computer at a time?


3. The following error messages are from three different programs that can access a computer's serial port. They all indicate the same problem. What's wrong?

Only one application can access a serial port

4. What are the two most common ways to interpret incoming asynchronous serial data?

ASCII and binary?

5. What are the relative advantages and disadvantages of these two methods?

For binary: the full range can fit into a byte, but there's not other value of the value besides 0 and 1. Good for simple message. For more complicated data, using binary will make you hard to tell which represents which.

For ASCII: much larger range and much readable, but it takes more bytes to send the data.

6. The Arduino IDE's serial monitor, like most serial terminal programs, uses one of these two methods to interpret incoming bytes. Which does it use?

Binary protocol.

7. Here's the output from a serial terminal program (Coolterm). What might you assume about the format that the sending device is using?


8. When sending data from one computer to another, what is the maximum range of values that you can fit into a single byte?


9. How would you serially transmit a value that’s larger than the maximum value that can fit in a byte?

Use another byte?