PIC12F675 Timer0 ADC & LCD

Category: PIC12F675

Designer: RANA MUHAMMAD ADNAN KHALIL

Notes

The circuit is simulated in Proteus 7.10. While code is written in MpLab X IDE using XC8 compiler. The microcontroller used in this project is PIC12F675. In this project, you will learn how to interface alphanumeric LCD with PIC12F675. The working of this project is given below. 1. To understand the working of this circuit first see the previous project "PWM Generator With Duty Cycle Control" in PIC12F675. 2. The LCD can be interfaced with microcontroller in 8bit mode or 4bit mode. 3. To interface LCD in 8bit mode, at least 10 ouput pins of microcontroller are required. 4. To interfance the LCD in 4bit mode, at least 10 ouput pins of microcontroller are required. 5. The PIC12F675 has only 6 input output pins, but only 5 pins can be made output, the GP3/MCLR pin can only be made digital input. 6. Therefore we use serial to parallel shift register IC CD4094 is used to interface the LCD in 4bit mode. 7. Now only 3 pins of microcontroller are used to interface the LCD (clock and data of IC 4094 and Enable (E) pin of LCD). 8. The RS and upper 4 data pins of LCD are connected with shift register IC 4094. 9. The GP0 is made as analog input for taking duty cycle input from variable resistor. 10. The GP1 and GP2 pins are output and connected to data clock pin of IC 4094 respectively. 11. The GP3/MCLR pin is not used. 12. The GP4 pin output and is connected with Enable pin of LCD. 13. The GP5 pin is also output and used as bit bang PWM output, it is also connected with LED D1. 14. The code is given with comments. To view the code, click on view program files and click on the file which you want to read or view. Applications: 1. This circuit can be used as PWM generator. 2. You can convert this manual control of PWM to Auto control of PWM as a feedback. 3. Variable resistors (potentiometers) can be replaced with Op-Amps for feedback to control the duty cycle and time period. 4. It can be used in many ways, it depends on the application and how you use this circuit. You can view the program files in application to get the idea or you can download all the files to make further changes in it. All files are free! New circuits are added on daily basis. Come back daily to get new exciting and amazing circuits.

Back to all circuits