Exercises

The goal is to write a program which is able to perform tasks described below.

Warm up exercise

  • To the computer is sent a number with grows once in a second. The number must be in a form of text and end with a row changing sign (\n).

For beginner

  1. For the commands (letter signs) which are coming through RS-232 interface from a computer are being waited. Command “R” lights green LED, “K” lights yellow LED and “P” red LED. “R” is switching all LEDs off.
  2. If a button is pressed, the name of the corresponding button (S1, S2, S3) is received in the computer through the RS-232 interface.

For advanced

  1. The communication between two RS-232 controllers. If a button is pressed, the controller transmits to the controller the number of the button. When the number is received the status of a corresponding LED is changed. '1' → green, '2' → yellow, '3' → red. Requires two sets of controllers, but the software is identical for both controllers.
  2. Make a “teletype” – device, which allows changing text messages between two controllers through RS-232 interface. Use LCD for displaying the messages. On the first row must be seen inserted message and on the second the last received message. For inserting the message a potentiometer and/or buttons may be used.

Questions

  1. Describe the UART package.
  2. What is the baud rate?
  3. What is the difference between full- and half duplexes.
  4. Find at least 5 different sensors which are using serial interface.
  5. What is the difference between UART and USART interfaces? Which is faster?
  6. How is the SPI interface working?
  7. Name interfaces, which enable connecting at least 100 devices to a single bus.
  8. Name different topologies and explain their differences.
  9. On what voltage level are RS-232 and UART connections happening?
  10. How long time takes to transmit 1 MiB at the baud rate of 9600 bps, when there is 8 data-bits, 1 stop-bit and not parity control?
en/exercises/communication.txt · Last modified: 2020/07/20 09:00 by 127.0.0.1
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0