Skip to Content
Programming 8-bit PIC Microcontrollers in C
book

Programming 8-bit PIC Microcontrollers in C

by Martin P. Bates
August 2008
Beginner to intermediate
304 pages
6h 2m
English
Newnes
Content preview from Programming 8-bit PIC Microcontrollers in C

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.
Start your free trial

You might also like

Programming 16-Bit PIC Microcontrollers in C, 2nd Edition

Programming 16-Bit PIC Microcontrollers in C, 2nd Edition

Lucio Di Jasio

Publisher Resources

ISBN: 9780750689601