Answers
1. Include header file using #directive.
Main program statement block enclosed in braces.
I/O functions/sec within main.
2. Create MPLAB project.
Edit program using correct syntax.
Build program and correct syntax errors.
Test program in simulator and debug.
Optional—test in cosimulation mode.
3. output_C(64);
output_high(PIN_C6);
4. The WHILE loop tests the control condition before the loop statements are executed. The DO..WHILE tests after they have been executed at least once. The FOR loop executes a loop a fixed number of times.
5. Port D bits initially go on for 1 sec. If the switch is active, the high 4 bits then go off, and the program waits until the switch goes inactive, at which point all the outputs go off. If the switch is inactive, all ...
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