Chapter 3

Problems


1. Serial Communications Interface

Write a subroutine in assembler called putc() which will output an 8-bit character at 9600 baud via the serial communications interface SCI. Use your delay routine from a previous exercise to insert a delay between transmissions.

Observe and draw the waveforms of the output signal at the TxD pin of the SCI.

Compare the waveforms for different bytes or characters transmitted, such as "A", "0", "1", $00, $01, $55 etc.

Compare the waveforms for two different communications protocols, 8 bits and no parity, 7 bits and even parity, both with 1 stop bit.

 

2. Text output

Write a subroutine in assembler to output a text message via the SCI at 9600 baud, 8N1.

Display the message using HyperTerm or the LCD character display.

 

3. Numeric Display

(a) Write a subroutine in assembler to display a 16-bit unsigned integer using hexadecimal representation.

(b) Write a subroutine in assembler to display a 16-bit unsigned integer using decimal representation.

Display your results using HyperTerm or the LCD display.

 

4. External Interrupts

Write a short assembly language program to test the external interrupt input feature.

Use an external function generator to send a repetitive interrupt signal to the IRQ pin. Using your interrupt service routine (ISR) and an appropriate output pin, measure the interrupt latency and the interrupt service time.

What is the maximum freqency of external interrupt your system can handle?

 

5. Timer Interrupts

Write a an interrupt service routine (ISR) in assembly language program to process timer overflow events.

Use this feature to create a programmable delay function.