How do I Interface arduino with these guys?!?!?

Hello fantastic people..

does anyone know if i caninterface Arduio with 1 or 3 of these?

THANKS!!! ;D ;D ;D ;D ;D ;D ;D ;D ;D

Doesn't look to like it would be a problem. Nice to see a short datasheet for a change! :slight_smile:

any tips?
do you know how?

thanks

The datasheet shows the interface protocol.
It's 8 bit serial, clocked, LSB first.

Don't try powering from the Arduino's 5V.

cool

i say 'cool' but im not sure how to use 8 bit serial protocol that is clocked or what LSB is.....

do you know how i can hookup 3?
I have a mega and a 'classic' at my disposal.
Are there any example codes i can start with or libraries i should be using?

shiftOut() has a argument that is required for which end to send first

shiftOut(data pin, clock pin, MSBFIRST / LSBFIRST, byte of data);

CAN I USE THIS GUY:

in the shift out tutorial?

Is there a example code I can start with ?

i think im a bit out of my depth here.... ::slight_smile:

Unless you really need to use one of those, you'll have better luck finding tutorials and such for LCD that use Hitachi HD44780 chipset

Any 16x2 LCD from Sparkfun will work with that library:

If you're looking for something extremely easy (and you're not worried about a case of super overkill), the serial LCD from Sparkfun is pretty nice :

They also sell the "serial backpack" separately.

Hi thanks for your suggestions Mitch but i really need to have something a bit gorgeous like these starbursts.

I need a certain strictness and purity to the message that these things are gonna say.

Richard (or anyone), do you have any idea how i would wire the shift registers to the 4 pins on the back of my display?

And am I supposed to send hex codes to this thingto make it display letters?

AWOL said:
The datasheet shows the interface protocol.
It's 8 bit serial, clocked, LSB first.

Does that mean im sending something like
Serial.println ("lorem ipsum bla bla");
or something like that? :-/

  1. Do I need to connect the GND of my 5v power supply and the GND of the Arduino together?

When I measure with my multimeter accross the 5v going into the display and the GND of the Arduino, which is connected to Pin 6 on the Display, I get zilch.

  1. im getting error:

In function 'void loop()':
error: invalid conversion from 'const char*' to 'uint8_t'/Applications/Arduino.app/Contents/Resources/Java/hardware/cores/arduino/wiring.h:125: error: too few arguments to function 'void shiftOut(uint8_t, uint8_t, uint8_t, byte)'

At global scope:

when i try to upload:


//**************************************************************//
// Name : shiftOutCode, Hello World
// Author : Carlyn Maw,Tom Igoe, David A. Mellis
// Date : 25 Oct, 2006
// Modified: 23 Mar 2010
// Version : 2.0
// Notes : Code for using a 74HC595 Shift Register //
// : to count from 0 to 255
//****************************************************************

//Pin connected to ST_CP of 74HC595
int latchPin = 8;
//Pin connected to SH_CP of 74HC595
int clockPin = 12;
////Pin connected to DS of 74HC595
int dataPin = 11;

void setup() {
//set pins to output so you can control the shift register
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(dataPin, OUTPUT);
}

void loop() {

digitalWrite(latchPin, 1); // take the reset pin high
delay(3); //hold reset high for "long reset"
digitalWrite(latchPin, 0); // take the reset pin back low

shiftOut(dataPin, clockPin "H");

}
//}

This compiles for me -

...
shiftOut(dataPin, clockPin, LSBFIRST, 'H');
...

But you'll need to check it on your board. Note the change from the double quotes to single quotes, and the inclusion of LSBFIRST. Also, you have an extraneous } at the end, but that's easy to fix.

Let us know if it works!

Yes, this compiles thanks!
but my display is doing nothing
The data sheet says:

At power on reset Display On/Off is set as JP3 link JP3 open - Display Off JP3 closed - Display On

are we doing this?

Im NOT supposed to be using the shift chip for this test am I?
Because right now Im doing exactly what Richard Crowley advises:

  1. The data from Ardunio DigitalPin 11 (blue wire in the ShiftOut example) to display pin 4 ("DO")
  2. The clock from Ardunio DigitalPin 12 (yellow wire in the ShiftOut example) to display pin 2 ("CLK")
  3. Re-purpose the ShiftOut "latch" pin to be "Reset" for this display: Ardunio DigitalPin 8 (green wire) to display pin 5 ("RESET")
  4. Ground from Arduino "GND" to display pin 6 ("0V GND")

and my code looks like:

//Pin connected to Display PIN 5 RESET
int latchPin = 8;
//Pin connected to Display PIN 2 CLK
int clockPin = 12;
////Pin connected to Display PIN 4 D0
int dataPin = 11;



void setup() {
  //set pins to output so you can control the shift register
  pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
}

void loop() {
  
  
digitalWrite(latchPin, 1);   // take the reset pin high
delay(3);  //hold reset high for "long reset"
digitalWrite(latchPin, 0);   // take the reset pin back low

shiftOut(dataPin, clockPin, LSBFIRST, 'H');
shiftOut(dataPin, clockPin, LSBFIRST, 'E');
shiftOut(dataPin, clockPin, LSBFIRST, 'L');
shiftOut(dataPin, clockPin, LSBFIRST, 'L');
shiftOut(dataPin, clockPin, LSBFIRST, 'O');



  }
//}

Is the display actually turning on?

Maybe try sending the char values from the datasheet as hex? 0x08, 0x05, 0x0C, 0x0C, 0x0F?

The Display is not showing ANY signs of life whatsoever except that its drawing 250mA and measures 5v accross the + and GND pins.

Maybe try sending the char values from the datasheet as hex? 0x08, 0x05, 0x0C, 0x0C, 0x0F?

how would i code this?

I spoke to a hardware guy at Itron UK (display manufacturers) [who doesnt know what an Arduino is?!?!?!] who said the jumpers a basically for selecting which kind of reset you can have..
BUT the datasheet is wrong and out of date for this device VAF169-233C and I now have the new one

http://vahakn.co.uk/x/VAF169-2SSD-02.pdf

does this shed any light?

I have linked LK1 (Sets Display to Full Brightness on Turn ON - default setting)
I have linked JP1 pins 2+3 (RESET via RESET line - default setting)

If I wanted to send HEX how would I do it
AND
On the side: Can I use some version of this sketch/library to send print commands:

Thanks for everyones help so far..... I really want this to work.

I would try replacing the 'H' in the shiftOut function call with 0x08, 'E' with 0x05 etc.

My reasoning behind this is that it is my understanding that 'H' returns an ASCII code, which is different to the code assigned to H on your screen.

I'm new to all this however, so I'm sure someone will correct me if I'm wrong!

Ok, i'll try that.

Im going to go to Hackspace London tonight armed with this thread to see if someone can help me.

I was asking about the Microprinter sketch because it sends HEX over Serial, and was hoping I might be able to do a similar thing if necessary/possible.

Yes indeed, but in the microprinter sketch I say:

print ("I love printing");

or

printer.println("Im a massive goober");

etc...

Let's totally ignore my question about the printer. I think I got excited. Will report back about how the next few hrs go.

Thanks again

Ive got it completely sorted thanks to Nneil. All Hail Nneil. A true saint.
Thanks to everyone so far...

Decipher this....

3 boards
1 arduino
No Shifters
No Shifting
Custom clock
And some pretty tricky C arrays of arrays.

void setMode(int latchPin){  //sets pins to be outputs, setspins high
  int clockPin=latchPin+1;
  int dataPin=latchPin+2;
  pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
  digitalWrite(latchPin, 1);
  digitalWrite(clockPin, 1);
  digitalWrite(dataPin, 1);
}

/*
void shortReset(int latchPin){
  int clockPin=latchPin+1;
  int dataPin=latchPin+2;
  digitalWrite(latchPin, 1);   // take the reset pin back hi
  delayMicroseconds(60);  
  digitalWrite(latchPin, 0);   // take the reset pin low
  delayMicroseconds(60);  
  digitalWrite(latchPin, 1);   // take the reset pin back hi
  delay(3);
}


void longReset(int latchPin){
  int clockPin=latchPin+1;
  int dataPin=latchPin+2;
  digitalWrite(latchPin, 1);   // take the reset pin back hi
  delayMicroseconds(60);  
  digitalWrite(latchPin, 0);   // take the reset pin low
  delayMicroseconds(60);  
  digitalWrite(latchPin, 1);   // take the reset pin back hi
  delay(3);
}
*/

void sendByte(int latchPin, unsigned int c){  // function sendByte send charactyer to board
  int clockPin=latchPin+1;
  int dataPin=latchPin+2;
  for(int i=7 ; i>=0 ; i--){  // steps thru bits in chars byte - MSB first
    digitalWrite(clockPin,1); // clock pin should already be high
    digitalWrite(dataPin,(c>>i)&1); // put out appropriate bit for char
    delayMicroseconds(100); // min 1 (barmy)
    digitalWrite(clockPin,0); // clockingdata into board
    delayMicroseconds(100);
    digitalWrite(clockPin,1);
  }
  delayMicroseconds(1000); //inter-byte delay 
}

const int d=2000;  //long reset (min 2000)

void sendStr(int latchPin, const char * p){  // 
  int clockPin=latchPin+1;            //
  int dataPin=latchPin+2;
  digitalWrite(latchPin, 0);   // take the reset pin low
  digitalWrite(dataPin, 0);    // & data pin low
  delayMicroseconds(d);  
  digitalWrite(latchPin, 1);   // take the reset pin back hi
  delayMicroseconds(d);
  digitalWrite(dataPin, 1);    // data back high
  delayMicroseconds(d);
  while(*p){ // while char is left in string - 
    unsigned char c=*p;
    if(c>='a' && c<='z') c-='a'-'A';
    if(c>='@') c-='@';
    //shiftOut(dataPin, clockPin, MSBFIRST, c);
    //delayMicroseconds(70);
    sendByte(latchPin,c);
    p++;
  }
  delayMicroseconds(d);
}

const int board1=22;

const int board[]={22,26,30};

#define numrows  4  // no of rows of messages MUST MATCH no of rows

const int rowdelay=3;  // edit this number for delay time eg 3600 = 1hr

const char * text[numrows][3]=  // array of arrays of strings
{
  {"a","b","c"}
  ,{"dog","cat","pig"}
  ,{"aaa","bbb","ccc"}
  ,{"doggie","cato","piggy"}
};

void setup(){
  setMode(board[0]);
  setMode(board[1]);
  setMode(board[2]);
}

void loop() {
  sendStr(board[0],"BOARD 0");   // board itenitfier sequence
  delay(100);
  sendStr(board[1],"BOARD 1");
  delay(100);
  sendStr(board[2],"BOARD 2");
  delay(100);
  for(int i=0 ; i<=2 ; i++){
    sendStr(board[i],"");
    delay(100);
  }
  for(int i=0 ; i< 1; i++){
    char str[20];
    sprintf(str,"I=%d",i);
    sendStr(board[i%3],str);
    delay(500);                 // board itenitfier sequence
  }
  
  /////////////////
  
  for(int i=0; i<numrows ; i++){
    for(int j=0 ; j<3; j++){
      sendStr(board[j],text[i][j]);
    }
    for(int d=0 ; d<rowdelay ;d++){
      delay(1000);
    }
  }
  
  ////////////////////
}

Super, glad you got it working!