Hi, I'm a very inexperienced Arduino user and I'm trying to send data to a display driver to make a 4 segment display light up. Its not working at the moment and is most likely that I've coded something incorrectly. The display driver I'm using is a SAA1064, here's my code.
The text on the monitor and the flashing LED is just to tell me whether the program is going through the loop ok (and it does). I took the byte writing part from a guide on the playground. Any help or suggestions would be most welcome! Thanks.
Hi, I'm a very inexperienced Arduino user and I'm trying to send data to a display driver to make a 4 segment display light up. Its not working at the moment and is most likely that I've coded something incorrectly. The display driver I'm using is a SAA1064, here's my code.
I'm sorry but you are completely on the wrong track with your code...
The SAA1064 uses the I2C-bus (or TWI which is the same thing different branding)
But the arduino supports this too!
Read about the Wire-lib here Wire \ Libraries \ Wiring
I don't know if anybody used the SAA1064 with the arduino before
Check the arduino-pages for wire-lib and I2C or TI or IIC to find out more
Eberhard
Thanks for the help wayoda, have been looking at the wire library but is quite confusing! Unfortunately a search of TWI or I2C reveals nothing on the syntax and programs part of the forums.
Here's what I've got so far anyway, any help or links appreciated:
#include <Wire.h>
int led0Pin = 10; // select the pin for red 'test' LED
void setup() {
Wire.begin();
Serial.begin(9600); // set serial speed
Serial.println("Hello world!"); // check board setup ok
pinMode(led0Pin, OUTPUT); // declare the led0Pin as an OUTPUT
}
void loop() {
digitalWrite(led0Pin, HIGH); // turn the ledPin on
delay(1000);
Wire.beginTransmission(0x76);
Wire.send(0x76); //slave address
Wire.send(0x00); //instruction byte
Wire.send(0x0F); //control byte
Wire.send(0xE4); //data digit 1
Wire.send(0xE4); //data digit 2
Wire.send(0xE4); //data digit 3
Wire.send(0xE4); //data digit 4
Wire.endTransmission();
digitalWrite(led0Pin, LOW); // turn the ledPin on
delay(1000);
}
Did you get the Address right, (can be configured by the hardware to three other ones)
I guess you see nothing? (You know you send command : DisplayTest)
Did you get the wiring right? The SCL-Signal is on the Arduino AnalogIn 5 SDA AnalogIn 4 I think..
Add "arduino twi" "arduino i2c" to your search to see more examples of how to use the wiring library
Eberhard