8. How to add a LCD Peripheral?
Firstly, an LCD peripheral needs to be present. For my side, I will be using the LCM1602C LCD display that looks like this.
Next, we will connect the LCD peripheral to our 1SJ board using bread board and wires. The picture below shows the connection diagram between the LCD and our 1SJ board. Since we are using 4-bit mode, pins D0-D3 can be ignored.
Next, we will define the pins used and connect it using wires to the 1SJ board as follows:
|
Pin from LCD → Port to 1SJ Board
VSS → GND
VCC → 5V
VEE → GND
Reset Pin → PA0
R/W Pin → GND (Low - Write to LCD, High - Read from LCD)
Enable Pin → PA1
D4 → PA4
D5 → PA5
D6 → PA6
D7 → PA8
LED+ → 5V
LED- → GND |