Monday, September 21, 2015

INTERFACING LCD WITH ARDUINO IN PROTEUS SIMULATOR STEP BY STEP

Introduction 

Arduino is an open source development board which is very good research and learning platform for technical and non technical person. It is very easy and comfortable to use in most of the situation from school project to the professional job. So it gives us knowledge about electronics and help develop idea of all age students. Learning arduino is awesome with enough hardware but sometimes we can not have all the component and arduino to research and design a project due to money and many thing so there is a solution of this problem.. We can design and code and test the system even if we dont have enough hardware. Yes we can solve it with computer having arduino IDE and proteus simulator. 
WANT TO LEARN ABOUT ARDUINO AND ARDUINO BASED PROJECT,CLICK HERE..
So i tried here to present an idea about the same thing that how can we use arduino in proteus to design and code system. Here is a project LCD interfacing with arduino in proteus . Try it at once and it will help you in big practical projects cause basic is fundamental.



If you dont have arduino library in proteus and dont know how to use arduino in proteus simulator, then click here to install arduino proteus library.


When designing a circuit to learn electronics and programming it becomes difficult to buy hardware and assemble circuits due to many reasons. But due to the availability simulator and intigrated digital environment, it has been possible that we can design, test and debug most type of circuit in computer without any hardware. Also today Internet is the main teacher of any innovative and curious students. So this Article is based on the design and programming of circuit and microcontroller using computer. 

For this you will need two software.
1.  Proteus simulator 
2.  Arduino IDE
  

HARDWARE SETUP IN PROTEUS

=> Open proteus 
=>  Select arduino uno , 16*2 lcd and ground pin in new file by pressing 'p' and searching arduino uno , lcd display 
=>  Connect these component as shown below 
     connect   D2   from arduino to D7 of lcd
                    D3   from arduino to D6 of lcd
                    D4   from arduino to D5 of lcd
                    D5   from arduino to D4 of lcd
                    D11 from arduino to E of the lcd
                    D12 from arduino to Reset of the lcd
                    R/W to ground 

                      Note:-to glow you led inside the lcd to make high clearance connect  your lcd A pin to +5v through a 1k resistorconnect your lcd B pin to the gnd of the arduino power.



  So you finished the circuit assembling in proteus now lets move to the programming section, 

PROGRAMMING IN ARDUINO IDE 

=> Open arduino ide
=>  Copy and paste following code

  #include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  lcd.begin(16, 2);
  lcd.print("HELLO WORLD");
}

void loop() {
  lcd.setCursor(0, 1);
  lcd.print("CIRCUITSNEPAL");
}


PROGRAM DESCRIPTION 

#include <LiquidCrystal.h>    initializes the liquid crystal library to the program 
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);  / initialize the library with the numbers of the interface pins
lcd.begin(16, 2);     // set up the LCD's number of columns and rows:
lcd.print("HELLO WORLD");   // Print HELLO WORLD to the LCD.
lcd.setCursor(0, 1);      // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
lcd.print("CIRCUITSNEPAL");   // print the CIRCUITSNEPAL on LCD


=> Compile it but if you have not made your compiler setting to generate hex file and its name please follow the steps below..
                1. go to file => preference
                2. tick the option compilation as shown below


=> after compiling copy the .hex file from the compilation window as shown


   
=> then go to the proteus circuit diagram and click arduino until it becomes red and then click again and a new window comes  like this


=> Paste the copied .hex file to the empty section shown in the above red circled diagram and press ok

=> Then run the proteus by clicking play button on proteus window .. Then you can see the output as shown below.



Congratulation you it worked on you. Still if you are confused then please refer here and ask in a comment. 
Try modifying code and see different output.. If you have any question about the project above then feel free to comment below .

electronics is fun with arduino programming and its easy and interesting. If you love electronics and robotics with programming please visit continuously and if you love my projects and if you think that it can help students then please help other reach my blog by sharing and inviting them here. Knowledge and idea are for sharing and if it can help others then it gets real meaning.. Thank you. 
visit also 
  home 

No comments:

Post a Comment