Assessment 5

5 points each unless otherwise stated, total 100

1. Explain why hysteresis is useful in processing switched inputs.

2. Write two C statements that select analog input AN1 and read it, and explain briefly why the variable comes first in the read statement but is given as the function argument in the select statement.

3. Draw a block diagram of a simple temperature control system, consisting of a temperature sensor, heater, fan, start and stop buttons, and status indicators for “running” and “temperature OK.” (10 points)

4. Write a basic program outline for the system described in Question 3 which has a single fixed operating temperature and no hysteresis. A polling loop will wait for the start button to be operated, while the stop button ...

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.