Arduino Shield : Seven Segment + LCD Shield Together
by embpic in Circuits > Arduino
1126 Views, 1 Favorites, 0 Comments
Arduino Shield : Seven Segment + LCD Shield Together
Nowadays, Makers, Developers are preferring Arduino for the rapid development of the prototyping of projects.
Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino has a very good user community. Arduino board design uses variety of controllers which include (AVR Family, nRF5x Family, and fewer STM32 controllers and ESP8266/ESP32). Board has multiple Analog and Digital Input/Output pins. The board contains USB to Serial Converter as well which helps to program the controller.
It is very useful and time saving when there is availability of shields we need. In this post we will see about Seven segment and LCD shield. Seven Segment and LCD shield is very useful at many places. Most of the project and products requires display it can be Seven segment or 16x2 lcd and again require switches. So this shield is very much useful to them.
Shield Specification
1.Four Seven Segment Display
2. 16x2 LCD - https://www.banggood.in/custlink/GvmEej9ook
3. 6 Switches
4. 1 User Led
5. 1 Power Led
6. Easily Compatible with Arduino UNO and others like,
Arduino Nano - https://www.banggood.in/custlink/KKGygoIaOF
Arduino Uno - https://www.banggood.in/custlink/GvmyBlZaOo
Arduino Pro Mini - https://www.banggood.in/custlink/vvGy0Lijj0
Arduino Mega2560 - https://www.banggood.in/custlink/vKGY0lioLA
Schematic
This is a schematic of the shield. Schematic and board layout is done in the Kicad tool.
I am very much impressed with the Kicad tool for PCB designing. The community keeps on growing and enhancing the tool day by day.
Board Pictures
Code
Here are the Arduino source codes which are tested on the shield.
Keypad Interfacing
There are 6 keys/switches given to the user. So with the combination of switches, we can create most of the project.
Switches are connected in a resistor ladder manner to save the pins.
16x2 LCD
16×2 LCD is 16 characters and 2 rows LCD which has 16 pins of connection. This LCD requires data or text in ASCII format to display. First row Starts with 0x80 and 2nd row starts with 0xC0 address. LCD can work in 4-bit or 8-bit mode. In 4 bit mode, Data/Command is Sent in Nibble Format First Higher nibble and then lower Nibble.
For Example, to send 0x45 First 4 will be sent Then 5 will be sent.
There are 3 controlling pins that are RS, RW, E.
How to Use RS:
When Command is sent, then RS = 0
When Data is sent, then RS = 1
How to use RW:
RW pin is Read/Write.
where, RW=0 means Write Data on LCD
RW=1 means Read Data from LCD
When we are writing to LCD command/Data, we are setting pin as LOW.
When we are reading from LCD, we are setting pin as HIGH.
In our case, we have hardwired it to LOW level, because we will be writing to LCD always.
How to use E (Enable):
When we send data to LCD, we are giving pulse to lcd with the help of E pin.
This is high level flow we have to follow while sending COMMAND/DATA to LCD.
Following is the Sequence to Follow.
Higher Nibble
Enable Pulse,
Proper RS value, Based on COMMAND/DATA
Lower Nibble
Enable Pulse,
Proper RS value, Based on COMMAND/DATA
ADC on Shield
There is one POT is provided on the shield which is connected to PA1 of the Arduino.
Complete Tutorial
You can also check my git account. (Code not showing properly in the post).
For Beginners
Here is the tutorial for beginners,