CMPE 401 - Computer Interfacing

Assignment #2

Due: In the CMPE 401 assignment box by 15:45 on Monday, Oct. 6, 2003


  1. Consider the following list of potential real-time control applications. Classify each one as either hard real time or soft real time. Carefully justify your answer in each case: (a) a controller for a microwave oven; (b) a controller for a car ignition timing system; (c) a controller for an automated teller machine (ATM); (d) a controller for an assembly line robot; (e) a controller for a consumer video game console.

  2. Briefly explain when it is acceptable to protect critical sections by disabling interrupts. What are the potential disadvantages of protecting critical sections in this way? Could the same protection be provided for critical sections if, instead of disabling interrupts, one just disabled multitasking for a time? Explain your answer.

  3. Briefly evaluate MicroC/OS-II with respect to portability, scalability, and determinism in real-time applications.

  4. Consider an asynchronous serial interface (not RS232C). To maximize the efficiency of the proposed communication port, it is desirable to maximize the length of the data frames. Each data frame is to consist of one start bit, 1.5 stop bits, and some as yet undetermined number of data bits. The transmitter and receiver clocks are each accurate to about 0.03% of the nominal 32.056 KHz frequency. In addition, the clock frequencies are assumed to be relatively stable over time (although their frequencies are likely to be different from each other and different from the nominal frequency). Assume that the frames are received with sufficient reliability if the sampling point for each bit is within the middle 66% of the bit width. Determine how long (including framing bits) the bit frames can be and still have reliable communications.

  5. In the RS323C standard, signals are provided that permit hardware flow control. For example, the clear to send (CTS) input to a DTE can be used to temporarily stop the flow of data from the DTE to the DCE (or another DTE). This would be helpful if ever the DCE (or the second DTE) were being overwhelmed with too much data. An alternative means of flow control is software flow control. An X-OFF ASCII character can be transmitted in the reverse data direction if the data flow in the forward direction needs to be halted temporarily. The flow of data can be restarted later by sending the X-ON ASCII character in the reverse direction. Briefly explain what would be some of the major potential advantages and disadvantages of hardware flow control versus software flow control.

  6. Each of the two serial channels in the DUART has a double buffer in the transmit direction and a quadruple buffer in the receive direction. What would be a reasonable explanation for making the buffer depth greater in the receive direction than in the transmit direction?