banner banner
News Details
Created with Pixso. Home Created with Pixso. News Created with Pixso.

Guide Connecting Newhaven Lcds to Arduino Via SPIRS232

Guide Connecting Newhaven Lcds to Arduino Via SPIRS232

2025-12-30

LCD displays serve as the "eyes" of Arduino projects, transforming code into visible text and graphics. For makers and engineers alike, integrating a display can elevate projects from abstract concepts to interactive experiences. This guide explores how to connect Newhaven's 16×2 character LCD to an Arduino UNO board using both SPI and RS232 TTL serial communication methods.

Why Use an LCD Display with Arduino?

Character LCDs remain popular for Arduino projects due to their simplicity and effectiveness in conveying information. The 16×2 format (16 characters across 2 lines) provides sufficient space for status messages, sensor readings, or simple user interfaces. Newhaven's NHD-0216K3Z-NSW-BBW-V3 model offers particular advantages with built-in serial interfaces that reduce wiring complexity.

Required Components
  • 16×2 LCD display (Newhaven NHD-0216K3Z-NSW-BBW-V3 recommended)
  • Single-row pin header connectors
  • Arduino UNO board
  • Breadboard and jumper wires
  • Soldering equipment (iron and solder)
  • USB A-to-B cable
  • Arduino IDE software
  • 0-ohm resistor (optional, for SPI communication)
Understanding the LCD Pin Configuration

The Newhaven display features two communication ports:

P1 Port (RS232 TTL Communication)
Pin Number Symbol Function
1 RX RS-232 (TTL) serial input
2 VSS Ground
3 VDD Power supply (+5.0V)
P2 Port (SPI and I2C Communication)
Pin Number Symbol Function
1 SPISS SPI slave select (NC in I2C mode)
2 SDO Not connected
3 SCK/SCL Serial clock
4 SDI/SDA Serial data input (SPI)/Serial data (I2C)
5 VSS Ground
6 VDD Power supply (+5.0V)
SPI Communication Method

SPI (Serial Peripheral Interface) offers high-speed synchronous communication ideal for short-distance connections between Arduino (master) and LCD (slave). The connection requires five wires:

Arduino LCD Connection Type
5V pin Pin 6: VDD Power
Ground pin Pin 5: Ground Ground
Pin 10: Slave Select Pin 1: SPISS SPI slave select
Pin 11: MOSI Pin 4: SDI/SDA Serial data input
Pin 12: MISO Pin 3: SCK/SCL Serial clock

Note: Enabling SPI requires opening R1 and shorting R2 on the display PCB as specified in the datasheet.

Key Programming Functions for SPI

The Arduino code for SPI communication includes several essential functions:

  • SPI_Out() - Transmits commands and data to the LCD
  • Set_Pins() - Configures SPI pins as outputs
  • Set_Contrast() - Adjusts display contrast
  • Set_Backlight() - Controls backlight intensity
  • Clear_Display() - Clears the LCD screen
  • Set_Cursor() - Manages cursor visibility
RS232 TTL Communication Method

For simpler setups, RS232 TTL requires only three connections:

Arduino LCD Connection Type
5V pin Pin 3: VDD Power
Ground pin Pin 2: Ground Ground
Pin 7: Digital I/O Pin 1: RX RS-232 TTL input

Note: Both R1 and R2 must be open on the display PCB to enable RS232 TTL mode.

Troubleshooting Common Issues

When encountering problems with your Arduino-LCD setup, consider these diagnostic steps:

  1. Verify wiring connections: Cross-check all connections against the provided diagrams.
  2. Inspect components: Look for physical damage on the Arduino, LCD, or connecting wires.
  3. Validate code: Ensure uploaded sketches are error-free and properly configured.
  4. Check power supply: Confirm adequate power for both Arduino and LCD.
  5. Test with known-good LCD: Isolate the problem by trying a different display.
  6. Adjust contrast: Use Set_Contrast() to optimize visibility.
  7. Update Arduino IDE: Ensure you're using the latest software version.
  8. Test individual functions: Start with basic "Hello World" examples to isolate issues.

By following these guidelines and understanding both communication methods, makers can effectively integrate LCD displays into their Arduino projects for enhanced functionality and user interaction.