Review: Digilent Pmod OLED Display Part 1 - Overview

Authored By: Charles Gantt on 04/25/2012
Review Type: Development Module
Manufacturer: Digilent
Product Page: Digilent Pmod OLED
Product Version: OL1

Digilent Pmod OLED review

 

Digilent Inc

 

Digilent has become a common name in the DIY / Maker commuity in the last year with the introduction of their PIC32 based Arduino compatible development boards dubbed chipKIT. Recently they updated their CEREBOT line of development boards to be fully compatible with chipKIT and MPIDE. The CEREBOT cK design incorporates numerous 12 pin headers spaced evenly around the exterrior of the PCB. These headers are specfically designed to accept Digilents break out modules named Peripheral Modules or Pmod for short. Today we begin a series of reviews based around the Digilent Pmod line, so sit back, relax and get your geek on as we show you the ins and outs of the Digilent Pmod OLED.

 

Digilent Pmod OLED CEREBOT MX4 ck chipKIT Arduino Compatible

Digilent's Cerebot MX4 cK with Pmod OLED Attached to J2 Headers.

What are Pmods?

Pmods are small I/O interface boards that offer an ideal way to extend the capabilities of Digilent's FPGA/CPLD and embedded control boards such as the Cerebot CK boards. Pmods communicate with system boards using 6 or 12-pin connectors. Pmods include sensors, I/O, data acquisition & conversion, connectors, external memory, and more. Pmods can also be used with the Arduino Compatible chipKIT boards by using the Uno32 Pmod Shield.

Pmod OLED

The Pmod OLED features an SPI-controlled monochrome OLED display, perfect for embedded applications requiring small, complex visual output. Measuring in at just over two inches long by about three quarters of an inch wide and scarcely one quarter of an inch wide, the Pmod OLED would be perfect in any project requiring discrete placement.

The Pmod OLED uses a standard 12-pin connector to display output on a 128x32 pixel organic LED (OLED) panel. The graphic display panel uses the Solomon Systech SSD1306 display controller. An SPI interface is used to configure the display, as well as to send the bitmap data to the device. The PmodOLED displays the last image drawn on the screen until it is powered down or a new image is drawn to the display. Refreshing and updating is handled internally.

Technical Specifications

  • 128 by 32 pixel 0.9’’ OLED display
  • Standard SPI interface
  • Clock speeds of up to 10MHz
  • Internal display buffer
  • Ships with a 6" 12-pin cable, a 6" 2x6-pin to dual 6-pin cable, one 12-pin header, and two 6-pin headers

Pinout

Digilent Pmod OLED Pinout

This OLED screen is the same as the one Digilent placed on the chipKIT Basic I/O shield and will work with not only the chipKIT based boards but pretty much any microcontroller development board. We do reccomend the Cerebot cK boards from Digilent though.   We plan on using this display in an upcoming project we have been commissioned to build for a local Airsoft team. Below I have pasted some stock example code that was written by Digilent and  modified by us. This code is specifically written for MPIDE. In Part 2 of this review we will show you how to interface this module with all 3 of the Cerebot cK boards, as well as both Arduino form factor chipKit boards. We might even toss in a section on how to use it with an Arduino Uno and Mega.

Example Code

/************************************************************************/
/*									*/
/*  OLEDDemo  --  OLED Display demo                                     */
/*									*/
/************************************************************************/
/*  Author: 	Oliver Jones
/*  Modified by: Charles Gantt http://themakersworkbench.com						*/
/*  Copyright 2011, Digilent Inc.					*/
/************************************************************************/
/*
  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/
/************************************************************************/
/*  Module Description: 						*/
/*									*/
/*  This program demonstrates the basic operation of the OLED graphics  */
/*  display.  It illustrates the  initialization of the display and     */
/*  some basic character and graphic operations.                        */
/*									*/
/************************************************************************/
/*  Revision History:							*/
/*									*/
/*  06/01/2011(GeneA): created						*/
/*  08/04/2011(GeneA): prepare first release				*/
/*									*/
/************************************************************************/

/************************************************************************/
/*  Board Support:							*/
/*									*/
/*  chipKit Uno with Pmod Shield:     Header JC	                	*/
/*   (Note: To use this, download and deploy the Board Variant for      */
/*          chipKIT UNO32 W/Pmod Shield from the Digilent website)      */              
/*  Cerebot Mx3ck:                    Header JE                         */
/*  Cerebot Mx4ck:                    Header JB                         */
/*  Cerebot Mx7ck:                    Header JD                         */
/************************************************************************/

#include 
#include 

OledClass OLED;

void setup()
{
  OLED.begin();
}

void loop()
{
  int irow;
  int ib;

  //Clear the virtual buffer
  OLED.clearBuffer();
  
  //Chosing Fill pattern 0
  OLED.setFillPattern(OLED.getStdPattern(0));
  //Turn automatic updating off
  OLED.setCharUpdate(0);
  
  //Draw a rectangle over wrting then slide the rectagle
  //down slowly displaying all writing
  for (irow = 1; irow < OLED.rowMax; irow++)
    {
    OLED.clearBuffer();
    OLED.setCursor(0, 0);
    OLED.putString("chipKIT");
    OLED.setCursor(0, 1);
    OLED.putString("CEREBOT MX4 cK");
    OLED.setCursor(0, 2);
    OLED.putString("by Digilent");
    
    OLED.moveTo(0, irow);
    OLED.drawFillRect(127,31);
    OLED.moveTo(0, irow);
    OLED.drawLine(127,irow);
    OLED.updateDisplay();
    delay(100);
  }
  
  delay(2000);
  
  // Blink the display a bit.
  OLED.displayOff();
  delay(500);
  OLED.displayOn();
  delay(500);
  
  OLED.displayOff();
  delay(500);
  OLED.displayOn();
  delay(500);

  OLED.displayOff();
  delay(500);
  OLED.displayOn();
  delay(500);

  delay(2000);
  
    //Draw a rectangle over wrting then slide the rectagle
  //down slowly displaying all writing
  for (irow = 1; irow < OLED.rowMax; irow++)
  {
    OLED.clearBuffer();
    OLED.setCursor(0, 0);
    OLED.putString("A Review By");
    OLED.setCursor(0, 1);
    OLED.putString("TheMakers");
    OLED.setCursor(0, 2);
    OLED.putString("Workbench.com");
    OLED.setCursor(0, 3);
    OLED.putString("@Makersworkbench");
    
    OLED.moveTo(0, irow);
    OLED.drawFillRect(127,31);
    OLED.moveTo(0, irow);
    OLED.drawLine(127,irow);
    OLED.updateDisplay();
    delay(100);
  }
  
  delay(2000);
  
  // Blink the display a bit.
  OLED.displayOff();
  delay(500);
  OLED.displayOn();
  delay(500);
  
  OLED.displayOff();
  delay(500);
  OLED.displayOn();
  delay(500);

  OLED.displayOff();
  delay(500);
  OLED.displayOn();
  delay(500);

  delay(2000);
  
  // Now erase the characters from the display
  for (irow = OLED.rowMax-1; irow >= 0; irow--) {
    OLED.setDrawColor(1);
    OLED.setDrawMode(OLED.modeSet);
    OLED.moveTo(0,irow);
    OLED.drawLine(127,irow);
    OLED.updateDisplay();
    delay(25);
    OLED.setDrawMode(OLED.modeXor);
    OLED.moveTo(0, irow);
    OLED.drawLine(127, irow);
    OLED.updateDisplay();
  }
  
  delay(1000);  

  // Draw a rectangle in center of screen
  // Display the 8 different patterns availible
  OLED.setDrawMode(OLED.modeSet);

  for(ib = 1; ib < 8; ib++)
  {
    OLED.clearBuffer();
    
    OLED.setFillPattern(OLED.getStdPattern(ib));
    OLED.moveTo(55, 1);
    OLED.drawFillRect(75, 27);
    OLED.drawRect(75, 27);
    OLED.updateDisplay();
    
    delay(1000);
  }
}

About Digilent

Digilent Inc. is a leading electrical engineering products company serving students, universities, and OEM's worldwide with technology-based educational design tools. Based in Pullman Washington USA, Digilent designs, manufactures, and distributes its electronic design tools on a worldwide basis. Since its founding in 2000, Digilent products can now be found in over 2000 universities in more than 70 countries throughout the world. As a multinational company with offices in the US, Taiwan, China and Romania, Digilent is able to provide low-cost, expert quality solutions for a variety of customer needs. In addition to its own products, Digilent has OEM design and manufacturing services for leading technology companies including Xilinx, Analog Devices, and Cypress Semiconductor.

Other Articles You Might Like

Review: Lulzbot AO-100 3D Printer part 1Lulzbot AO-100 / AO-101 reviewed

Tutorial: DIY Telescope to PC CableDIY Telescope to PC Cable

Project: LED Strip Bench LightingDIY RGB LED Strip Bench lighting

Review: ISO-TIP Portable  Soldering KitISO-Tip Portable Soldering Kit Review

Article: Arduino Due Overview

Project: 3D Printed Balloon Powered CarPrint a Balloon powered Jet Car with your 3D printer