This shows how the LCD Shield is wired in the SimulIDE electronic simulator program. It is an HD44780 LCD screen with 1602 sixteen characters printed per line and 2 lines of text and symbols.
Four display data lines with Register Select RS on pin11 of the Arduino. Enable is connected to pin10 of the Arduino. R/W Ready/Wait is not connected - we call this the hardware busy indication.
Reset button that restarts your sketch. Up, down, right, left and select buttons wired to input A0. Your code uses analog voltage level to read which button you have pressed. Same on the hardware shield modules like the DFRobot.
Not the DFRobot LCD ShieldNope! There is no standard and all the pins can work. More info, details and sketches in project LCD1602 DFRobot Shield. We have to change the connections used by the sketches for each display.
LiquidCrystal LibraryYour Arduino program comes with a library of extra code that gives you commands and example sketches. Menu File->Examples->LiquidCrystal. Open the first example sketch Autoscroll.
Scroll down and look for the line #include <LiquidCrystal.h>. This adds code from a library that adds commands you can use. It has default wire connections that we have to change.
Register Select RS goes to pin 11 of our Arduino. Enable is connected to pin 10. Carefully change the values. Compile the sketch to make sure we didn't delete the wrong stuff.
We can upload our sketch to the SimulIDE program a number of ways. The easiest is to generate a file called the hex file. This is also called machine code and is the way the processor knows its program.
Menu Sketch->Export compiled Binary creates a file with a .hex extension in the sketch folder. Different Arduino IDE may have other options.
Open SimulIDEWe have some projects using SimulIDE electronic simulator. Download a version, donations are welcome. It is a portable application and you run it from the simulide.exe file in the folder.
Search components and find Uno and LcdShield. Pull each onto the blank circuit.
Attach ShieldMove the shield over the Uno board. Right click directly on the display module. Attach.
Right click again and you should see a much more extended menu of options. We want Load firmware to locate the hex file we generated with the Arduino IDE program.
Your screen should look somewhat like this.
See the red On/Off button at the top? There's a pause button, too.
Go through the remainder of the examples in LiquidCrystal library. Remember you have to change the connection information in each sketch to work with this differently wired display module.
As a safety feature SimulIDE will turn off power when you change connections or software. Check the On/Off and pause buttons.
Learn C/C++ and assembly programming with Arduino Embedded Engineering LCD DevBoard. Once again, change the constructor inputs.
Comments
Please log in or sign up to comment.