A temperature sensor is connected to AD AN5 in the PIC16F87
     A temperature sensor is connected to A/D (AN5) in the PIC16F87  The sensor has a range: 0 to 51.2 C and a resolution of 10 mV/C.  The AD in the PIC16F877 uses Vref+ of 2.048V  What is the resolution of the A/D in terms of V per bit?  What is the resolution of the A/D in terms of the C per bit?  Specify word to and store  in ADCON0 o setup the PIC to read from AN5  Write assembly instructions to read the temperature and store it in GFR  Specify the inputs and outputs used in Arduino UNO  Consider the following temperature control system where the average of four temperature sensors is used to active three actuators (heater, vent, and fan) according to the provided table  Write the C-program using Arduino Uno (include your comments).  Download the Arduino Compiler and test the program 
  
  Solution
PIE1 register - It control analog to digital convertor interrupt.
 PIR1 register - It control the interrupt flag for that analog to digital convertor
 TRIS A register - It control the direction of the PORT A pins even when they are being used as analog inputs.
 TRIS E register - It controls the Parallel Slave PORT operation. It also controls the direction of the RE pins, even when they are being used as analog inputs.

