Go Down

Topic: How do I Interface arduino with these guys?!?!? (Read 2275 times) previous topic - next topic

vahakn

Sep 10, 2010, 09:53 pm Last Edit: Sep 11, 2010, 04:07 pm by vahakn Reason: 1
Hello fantastic people..

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

http://uk.farnell.com/jsp/search/productdetail.jsp?SKU=1216698



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

ArduiKu

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

vahakn


AWOL

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

Don't try powering from the Arduino's 5V.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

vahakn

#4
Sep 11, 2010, 01:16 pm Last Edit: Sep 11, 2010, 04:08 pm by vahakn Reason: 1
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?


Osgeld

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

shiftOut(data pin, clock pin, MSBFIRST / LSBFIRST, byte of data);
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL

vahakn

CAN I USE THIS GUY:
http://uk.farnell.com/jsp/search/productdetail.jsp?SKU=1647814

in the shift out tutorial?

Is there a example code I can start with ?

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

Mitch

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

http://arduino.cc/en/Reference/LiquidCrystal?from=Tutorial.LCDLibrary

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

http://www.sparkfun.com/commerce//categories.php?c=76

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 :

http://www.sparkfun.com/commerce/product_info.php?products_id=9066

They also sell the "serial backpack" separately.

vahakn

#8
Sep 14, 2010, 01:29 am Last Edit: Sep 14, 2010, 01:30 am by vahakn Reason: 1
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?   :-/



vahakn

#9
Sep 14, 2010, 11:49 am Last Edit: Sep 14, 2010, 01:30 pm by vahakn Reason: 1
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.


2. im getting error:

Quote
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");



 }
//}




a.d

#10
Sep 14, 2010, 12:44 pm Last Edit: Sep 14, 2010, 12:45 pm by a.d Reason: 1
This compiles for me -

Code: [Select]
...
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!

vahakn

#11
Sep 14, 2010, 01:07 pm Last Edit: Sep 14, 2010, 01:29 pm by vahakn Reason: 1
Yes, this compiles thanks!
but my display is doing nothing
The data sheet says:

Quote
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:

Quote
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:

Code: [Select]


//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');



 }
//}






a.d

Is the display actually turning on?

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

vahakn

#13
Sep 14, 2010, 03:47 pm Last Edit: Sep 14, 2010, 05:16 pm by vahakn Reason: 1
The Display is not showing ANY signs of life whatsoever except that its drawing 250mA and measures 5v accross the + and GND pins.

Quote
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:
http://github.com/rooreynolds/microprinter/blob/master/Microprinter.java

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



a.d

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!

Go Up