PIC16F84_Direction Indicator
This project is based on Microcontroller PIC16F84. The system Direction Indicator gives the direction where the sensor/device points. Direction is indicated using a LCD display. To simulate this circuit, initially activate Mixed Mode simulator from the Schematic Editor window. Simulation can be performed by selecting Transient analysis from Simulation menu.
This project includes microcontroller PIC16F84,
LCD unit (controller and display), ADC 0800, Buffer (74ALS245A) and potentiometer.
A variable resistor is used for sensing the change in direction. The analog voltage value from the potentiometer is given to an ADC. The ADC gives the digital input to the PIC. The ADC 0800 is used here to convert the analog voltage value from the potentiometer. The working of the ADC depends on the pulse received from PIC. PIC gives high/low voltage to the start of conversion pin of ADC when desired, and when an end of conversion is detected from the ADC it reads the output. The value received is compared and the corresponding direction is indicated in the LCD.
PIC16F84 have only 13 I/0 pins there fore buffers are used for multiplexing data and controls to LCD and ADC.
The source code written in assembly language and can be viewed from the
code editor window.
Algorithm
1. Start
2. Initialization of LCD.
3. Display on LCD ‘Direction Indicator’.
4. Give start of conversion for ADC.
5. Check for End of conversion, and wait till EOC.
6. Read the digital output of ADC.
7. Compare it with the range.
8. Display the direction on LCD.
9. Go to step 4 to check if the direction have changed or not.
10. Stop.
The source code in the
code editor window
has to be
compiled
after making any modifications
(editing).
Also the code can be
debugged
during
simulation.