August 2008
Beginner to intermediate
304 pages
6h 2m
English
• Light switch application
• Temperature display application
The mechatronics board is fitted with a light and temperature sensor, each of which produces an analog output in the range of 0–5 V. In common with many sensors now available, a signal conditioning amplifier is built in, so that no additional components are needed to interface with an MCU.
The light sensor can be tested using the analog comparator inputs of the 16F917, which allow two input voltages to be compared. An output bit in a status register is set if the positive input (C+) is at a higher voltage than the negative input (C−) or a reference voltage. A range of setup options are defined in the header file.
The block diagram in Figure 4.11 ...
Read now
Unlock full access