Assessment 2

5 points each, total 100

1. List the syntax features that a minimal C program must contain if compiled for the PIC 16F877A MCU.

2. List the steps required to create and test a C program for a PIC MCU prior to downloading to hardware.

3. Write a C statement that outputs the 8-bit value 6410 to Port C. Write an alternative 1-bit output statement that has the same effect, assuming all the port bits are initially 0.

4. Describe briefly the difference between a WHILE loop, a DO.WHILE loop, and a FOR loop.

5. Describe the effect of the following statements on active high LEDs connected to Port D, assuming an active low switch circuit is connected to pin RC7:

output_D(255); delay_ms(1000);

while(!input(PIN_C7)){output_D(15);}

output_D(0);

6. Calculate ...

Get Programming 8-bit PIC Microcontrollers in C now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.