Hi
Have now got my Nexus LED display driver up and running, and can now use it to display the output from my other projects... 
I've added the option to display or blank leading zeros.
My code works fine when the "blank leading zeros" option is selected.
The only glitch is that when operating in "display leading zeros" mode, the output from the display is sometimes unstable, with random LED segments illuminating until the Arduino "reset" button is pressed.
I think this is a hardware rather than coding problem: maybe because illuminating 4 digits worth of 7-segment displays showing 3 leading zeros (= 3 digits showing "0", each using 6 segments per "0" at around 20mA/segment) is drawing too much current from the USB cable to keep the Arduino ticking over reliably....
I'm attaching my code in case it is useful for anyone else.
I'm just getting started with Arduino, so I'm well aware that my sketch is not the most elegant or well written solution. I'd welcome any constructive criticism which would help me improve this routine in particular, and my coding skills in general.
Thanks in anticipation
Best wishes
Dave
// Title: Nexus B08M04N Synchronous Serial 4 Digit LED module data test
// Author: Dave Williams 12 May 2012
// Function: To send decimal value in range 0-9999 to to 4 segment LED display - "Brute force" bitwise method!
// Nexus Display Pin Connections: 3 = Enable (0v);4 = Data;5 = Clock; 6 = 5V; 8 = Gnd (0v)
// 500kHz max data transfer rate
void setup()
{
// Define Arduino output pins
#define DATA 10 //Data from Arduino pin 10 to Nexus Data In pin 4
#define CLOCK 11 // Serial Clock from Arduino pin 11 to Nexus pin 5
pinMode(DATA, OUTPUT); // Define Clock & Data pins as digital Outputs
pinMode(CLOCK, OUTPUT);
}
void loop(){
//Test loop: Count repeatedly from 0-9999
for (int digits=0;digits<=9999;digits++){
int blanking = 1;//1 = blank leading zeros; 0 = don't blank leading zeroes
int k;
k = LEDsend(digits, blanking);
delay(50);
}
}
//Convert value of "digits" variable to serial code & send to Nexus
int LEDsend(int digits, int blanking){
digits = constrain(digits,0,9999);
//Declare function variables
int buffer[4]; //declare array for 7-segment display codes
//Lookup array corresponds to LED segments a-g & decimal point to illuminate to represent digits 0 - 9
int Lookup[]={252,96,218,242,102,182,190,224,254,246};
//Extract 1000s(buffer[3]), 100s(buffer[2]), 10s(buffer(1), and units(buffer[0])
//and look up code corresponding to which segments of 7 segment display to illuminate
buffer[3] = Lookup[(digits/1000)];
digits %= 1000;
buffer[2] = Lookup[(digits/100)];
digits %= 100;
buffer[1] = Lookup[(digits/10)];
buffer[0] = Lookup[(digits%10)];
//Blank leading zeros (252 == decimal code for "zero" on LEDs)
//only if "Blanking" parameter is Non-Zero (i.e. Boolean True)
if (blanking == true){
if (buffer[3] == 252){
buffer[3] = 0;
if (buffer[2] == 252){
buffer[2] = 0;
if (buffer[1] == 252){
buffer[1] = 0;
}}}}
//Send Data
delayMicroseconds(100);//wait before sending next packet of data to allow Nexus time to respond
// send "START" bit "1"
digitalWrite(DATA,HIGH);
digitalWrite (CLOCK,HIGH); //start clock pulse
delayMicroseconds(2); //500KHz = 1 clock pulse every 2 microseconds
digitalWrite(CLOCK,LOW);//end clock pulse
// send all 4 data bytes in sequence to Nexus LED display, Least Sig Digit (units, buffer(0)) first
for(int I = 0;I <=3; I++){ // Look at each data byte in turn from byte 0 to 3
int(x) = buffer[I];
for(int y = 7;y >=0; y--){ // test bits in data from MSB (7) to LSB (0)
if (bitRead(x,y) == 1)
{
digitalWrite(DATA,HIGH); //If data bit 'y' set, then send a data pulse with clock pulse
}
else
{
digitalWrite(DATA,LOW); //If data bit 'y' clear, then send no data pulse with clock pulse
}
digitalWrite (CLOCK,HIGH); //start clock pulse
delayMicroseconds(2); //500KHz = 1 clock pulse every 2 microseconds
digitalWrite(CLOCK,LOW);//end clock pulse
} //loop to test next bit
} //loop to test next byte
// Send 2 LED bits & STOP bit "0 0 0"
for (int I=0;I<=2;I++){
digitalWrite(DATA,LOW);
digitalWrite (CLOCK,HIGH); //start clock pulse
delayMicroseconds(2); //500KHz = 1 clock pulse every 2 microseconds
digitalWrite(CLOCK,LOW);//end clock pulse
}
}