Connecting a display using the SPI interface

While the serial display is interesting, it has some limitations. It is difficult to display pictures or graphics, and it is somewhat slower than other interfaces available to you. So, let's add a display with a different communications interface. The following image shows a picture of a small, 1.8 inch LCD module with a micro SD card interface that can be connected to your Arduino:

Connecting a display using the SPI interface

This particular display is available from a company called SainSmart; it is available directly from the company or other online retailers such as Amazon.com. There are others that are very similar. Finding support for these displays can be difficult, as the interface is significantly more complex; so, check to make sure the libraries are also supplied with the display. To connect to this display, perform the following steps:

  1. The first step is to connect the display to your Arduino. The following image shows a picture of the back of the display that will help you connect to the SPI interface on your Arduino:
    Connecting a display using the SPI interface
  2. This display uses the SPI interface, so you'll be connecting to the top seven pins shown here. The SI interface is a serial interface but is synchronous, so it provides a more robust communication path. Here is the wiring table that shows which pins to connect to between your Arduino and the display:

    Arduino pin

    Display pin

    +5

    VCC

    GND

    GND

    Pin 13

    SCL

    Pin 11

    SDA

    Pin 9

    RS/DC

    Pin 8

    RESET

    Pin 10

    CS

  3. To make these connections, you'll want a different type of jumper wire, one with a female connection at one end and a male connection at the other. You can purchase these types of jumper wires at most electronics stores or online.
  4. Once the two devices are connected, you can plug your Arduino into the USB cable and the USB cable into your computer; once done, you should see the LCD light up. Now you're ready to add the code.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.227.82