Interface specifications

Nathan Seidle edited this page Feb 14, 2015 · 4 revisions

Details on all three communication modes available to the Serial 7-Segment Display: TTL, SPI, and I2C.

TTL Level Serial Communication

When using this method of communication, only one wire is required to interface with the display - RX. RX is a serial, UART input on the display. By default the communication will occur at 9600 baud, with 8 data bits, no parity, and 1 stop bit. The baud rate is adjustable; see the special commands section for information on how to control this rate.

SPI Communication

When using SPI to communicate with the display three wires are used - SDI (slave data in, aka MOSI), SS (slave select), and SCK (serial clock). SS selects the display in a multiple slave SPI bus. SCK is the serial data clock, an input to the display. And SDI is the data input line, also an input on the display.

The Serial 7-Segment display is configured to act as a SPI slave device.

The maximum speed of the SPI clock input is 250kHz. The display is configured to work with SPI mode 0 (CPOL = 0, CPHA = 0); the clock line should idle low, and data is sampled on the rising edge of the clock.

I2C Communication

Also known as TWI, this communication method requires two wires: SDA (serial data) and SCL (serial clock).

A slightly more advanced serial communication method, I2C assigns the slave device a 7-bit address. Multiple slave devices can be linked together on a single I2C bus, and will only pay attention to a command if it is sent to their address.

The default address of the 7-Segment Serial display is 0x71. This value can be set using the I2C Address Configuration command. If multiple displays are tied to the same I2C bus, it may be necessary to set each of their addresses to a different 7-bit value (unless you want them to display the same data).

Please Note: 0x71 is the 7-bit I2C address. If you are using a different language than Arduino you will probably need to add the Read/Write bit to the end of the address. This means the default read address for the OpenSegment is 0b.1110.0011 or 0xE3 and the write address is 0b.1110.0010 or 0xE2. For more information see our I2C tutorial.

The Serial7Segment firmware and OpenSegment support standard 100kHz and fast 400kHz I2C SCL speeds. Use the following code in Arduino to enable 400kHz fast I2C speed:

Wire.begin(); //Join the bus as master
//By default .begin() will set I2C SCL to Standard Speed mode of 100kHz
Wire.setClock(400000); //Optional - set I2C SCL to High Speed Mode of 400kHz

Datasheet Links:

  • Datasheet Homepage
  • [Hardware-Specifications](Hardware Specifications) - Electrical characteristics, voltage ratings, current usage, timing
  • Basic Usage - Displaying Numbers and Characters, Clearing, Cursor Control
  • Special Commands - Reset, Decimal, Cursor, Brightness, Baud, TWI address, and Individual segment control
  • [Arduino-Examples](Arduino Examples) - Example Code for SPI and I2C
  • [Customizing-the-Display](Customizing the Display) - Uploading a custom Arduino Sketch