So finally i hooked up a 74HC595 Shift Register, to a 7 Segment display, but it is a common Anode type, i hooked it up like normal LEDs and used the following code to display the letter "A":
int dataPin = 2; //Define which pins will be used for the Shift Register control
int latchPin = 3;
int clockPin = 4;
void setup()
{
pinMode(dataPin, OUTPUT); //Configure each IO Pin
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
}
void loop()
{
digitalWrite(latchPin, LOW); //Pull latch LOW to start sending data
shiftOut(dataPin, clockPin, MSBFIRST, 0x11 ); //Send the data
digitalWrite(latchPin, HIGH); //Pull latch HIGH to stop sending data
delay (1000);
As you can see Hex 0x11 means 00010001, i had to invert in manually, is there anyway i can do it in software, ie the 0's will become 1's and vice versa.