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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access