Tuesday, January 29, 2013

Signature Electronic Sign to Arduino Part 3

Several people have asked for more information on the Arduino to Cadaces/Signature Electronics Sign interface. So I am posting a third time on the interface.

This is the schematic for a single line interface. It can run three cadaces modules, perhaps four. If you get garbage in your display, use shorter ribbon cables.This schematic is from the top side looking down at the adapter board.
This is a picture of the bottom of the interface board.
Here is a front view showing the adapter plugged into the left side of the Arduino.
This is a top view of the adapter board.
Here is the code for running two cadaces modules:
//****************************************************//
//  Name    : Cadaces Driver                          //
//  Author  : Bob Davis                               //
//  Date    : 4 January, 2013                         //
//  Version : 1.0                                     //
//****************************************************//
// Pins for the row drivers
int row1Pin = 1;
int row2Pin = 2;
int row3Pin = 3;
int rowEnable = 4;

// Pins for column shift registers
int rclockPin = 5;
int clockPin = 6;
int dataPin = 7;

// Set the pins to output to the sign
void setup() {
  pinMode(row1Pin, OUTPUT);
  pinMode(row2Pin, OUTPUT);
  pinMode(row3Pin, OUTPUT);
  pinMode(rowEnable, OUTPUT);
  pinMode(rclockPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
}

//=== Character Array ===
// Characters are A, B, C, etc.  Only upper case, no symbols.
byte alphabets[][8] = {
  {0, 04, 10, 17, 17, 31, 17, 17}, //A
  {0, 30, 17, 17, 30, 17, 17, 30}, //B
  {0, 14, 17, 16, 16, 16, 17, 14}, //C
  {0, 28, 18, 17, 17, 17, 18, 28}, //D
  {0, 31, 16, 16, 31, 16, 16, 31}, //E
  {0, 31, 16, 16, 31, 16, 16, 16}, //F
  {0, 14, 17, 16, 16, 19, 17, 14}, //G
  {0, 17, 17, 17, 31, 17, 17, 17}, //H
  {0, 14, 04, 04, 04, 04, 04, 14}, //I
  {0, 07, 02, 02, 02, 02, 10, 14}, //J
  {0, 17, 18, 20, 24, 20, 18, 17}, //K
  {0, 16, 16, 16, 16, 16, 16, 31}, //L
  {0, 10, 21, 21, 21, 17, 17, 17}, //M
  {0, 17, 25, 25, 21, 19, 19, 17}, //N
  {0, 14, 17, 17, 17, 17, 17, 14}, //O
  {0, 30, 17, 17, 30, 16, 16, 16}, //P
  {0, 14, 17, 17, 17, 17, 19, 15}, //Q
  {0, 30, 17, 17, 30, 20, 18, 17}, //R
  {0, 14, 17, 16, 14, 01, 17, 14}, //S
  {0, 31, 04, 04, 04, 04, 04, 04}, //T
  {0, 17, 17, 17, 17, 17, 17, 14}, //U
  {0, 17, 17, 17, 10, 10, 10, 04}, //V
  {0, 17, 17, 17, 21, 21, 21, 10}, //W
  {0, 17, 17, 10, 04, 10, 17, 17}, //X
  {0, 17, 10, 10, 04, 04, 04, 04}, //Y
  {0, 31, 8, 04, 02, 04, 8, 31}, //Z
};
byte bitmap[][8] = {
  {0, 0,0,0,0,0,0,0},
  {0, 0,0,0,0,0,0,0},
  {0,  4, 10, 17, 17, 31, 17, 17}, //A
  {0, 30, 17, 17, 30, 20, 18, 17}, //R
  {0, 28, 18, 17, 17, 17, 18, 28}, //D
  {0, 17, 17, 17, 17, 17, 17, 14}, //U
  {0, 14, 04, 04, 04, 04, 04, 14}, //I
  {0, 17, 25, 25, 21, 19, 19, 17}, //N
  {0, 14, 17, 17, 17, 17, 17, 14}, //O
  {0, 0,0,0,0,0,0,0},
  {0, 0,0,0,0,0,0,0},
};

void RunSign()
{
  for (int row = 7; row > 0; row--)
  {
    // turn off display
    digitalWrite(rowEnable, HIGH);
    // send serial data to display 10 = number of led arrays
    for (int character = 0; character < 11; character++)
    {
    shiftOut(dataPin, clockPin, MSBFIRST, bitmap[character][row]);
    }
    //latch the data
    digitalWrite(rclockPin, LOW); digitalWrite(rclockPin, HIGH);
    // set up 74138 row sesection and turn display back on
    digitalWrite(row1Pin, LOW);
    digitalWrite(row2Pin, LOW);
    digitalWrite(row3Pin, LOW);
    if (row==1 or row==3 or row==5 or row==7) digitalWrite (row1Pin, HIGH);
    if (row==2 or row==3 or row==6 or row==7) digitalWrite (row2Pin, HIGH);
    if (row >= 4) digitalWrite (row3Pin, HIGH);
    digitalWrite(rowEnable, LOW);
    // Wait to see what we sent to the display ;
    delayMicroseconds(500);
  }
}

//=== L O O P ===
void loop() {
  RunSign();


4 comments:

  1. Did you ever manage to reverse engineer the original rs-485 protocol?

    ReplyDelete
  2. Nope, I have read where others have tried and failed.

    ReplyDelete
  3. Where would i get hold of say 13 or 26 of those modules ... would double width work and how does it handle scrolling .... just a query as have been tasked with building 13 displays fora warehouse environment .... i think the displays will be the easy bit as they also have to be capable of being independently powered and receive message updates from a central server wirelessly

    ReplyDelete
  4. You can get 12 of these in one signature electronic sign on eBay

    ReplyDelete