Unable to powerup a VFD via I2Cish

I really want to make a simple alarm clock(for my girlfriend's birthday, day after thanksgiving :/). I have been trying to get this to work for about three days now.I first tried using a MSP430F, but decided to switch to arduino for ease of use.
Please check my code and tell me if I am doing this right. As of right now I got a Arduino Diecimila board, a VFD screen (2 pin power, 2 pin I/O) and a very nice power supply which tells me I am using 5V and 0.05Amps.

Details about the VFD screen.
*NEC D16314AGJ-011 controller, supposed to be the same as HD44780.
*HC 164 - 8 Bit register
*some chip HC00A PAS839. Motorolla symbol. Same size as register.
Datasheet at http://pacerpdfs.s3.amazonaws.com/20T202DA5EB.pdf
The important part of the datasheet:

Now, here is the problem. My VFD displays nothing. I connect everything, I initialize VFD, I write AAAAAAA and BBBBBBB to the VFD, then I tell it to GO, and it is just blank. No backlight, no symbols, nothing.

Can someone please help me with this? I checked everything by now...

Here is my source code:

#define SDA 3 
#define CLK 2

#define Both_On PORTD=PORTD & B11110011; // pin 2,3 to 0
#define Both_Off PORTD=PORTD | B00001100; // pin 2,3 to 1
#define Both_Toggle PORTD=PORTD ^ B00001100;

#define SDA_Off PORTD=PORTD & B11110111; //PIN 3 to 0
#define CLK_Off PORTD=PORTD & B11111011; //PIN 2 to 0

#define SDA_On PORTD=PORTD | B00001000; //PIN 3 to 1
#define CLK_On PORTD=PORTD | B00000100; //PIN 2 to 1

#define SDA_Toggle PORTD=PORTD^B00001000;
#define CLK_Toggle PORTD=PORTD^B00000100;



void setup()
{
pinMode(SDA,OUTPUT);
pinMode(CLK,OUTPUT);
}

void sendNibble(byte one, byte two)
{
shiftOut(SDA,CLK,MSBFIRST,one);
CLK_Off 
SDA_On 
asm volatile("nop\n\t nop\n\t nop\n\t nop\n\t "); //wait for 120+ nS
SDA_Off 
asm volatile("nop\n\t nop\n\t nop\n\t nop\n\t "); //120 ns+more
shiftOut(SDA,CLK,MSBFIRST,B00000000);   //DUMMY
asm volatile("nop\n\t nop\n\t nop\n\t nop\n\t ");asm volatile("nop\n\t nop\n\t nop\n\t nop\n\t ");
shiftOut(SDA,CLK,MSBFIRST,two);
CLK_Off 
SDA_On 
asm volatile("nop\n\t nop\n\t nop\n\t nop\n\t "); 
SDA_Off 
asm volatile("nop\n\t nop\n\t nop\n\t nop\n\t "); 

}

void loop()  // 0   0      1    r/s 
             // RST Dummy  E    r/s
{
delayMicroseconds(100);
sendNibble(B00100011,B00101100); // 0011 1100 Function Set

sendNibble(B00101000,B00100000); // Select top row
for(int i=0;i<16;i++)
sendNibble(B00110100,B00110001); // WRITE AAAAAA 16 times

sendNibble(B00101100,B00100000); // Select Bottom Row
for(int i=0;i<16;i++)
sendNibble(B00110100,B00110010); // Write BBBBBB 16 times

sendNibble(B00100000,B00101100); // Power me ON baby.

// that's it.
delay(10000); // sleep for 10 seconds
sendNibble(B10000000,B10000000); // reset this thing :(
}

Can anyone please give me any hint as to what could be the problem? Shouldn't this be the same as using a LCD with 8bit register?

How do you have the arduino connected to the display and how are you powering the display? The data sheet says you need to have a supply that can supply at least 450ma at startup, do you?

Yep, the power supply should be up to the job. It's a big DC thingy with two knobs, and it can supply up to 3Amps @ 25V.
As for connections, I have pin 2/3 on the VFD connected to pin 2/3 on my dear arduino. The power pins are connected to the breadboard for both the VFD and the arduino. I'd take a picture but I don't have a camera better than 2megapixels :confused:

Is there a ground connection shared between the two?

Just curious, why bit-bang it instead of using the Wire library that handles I2C? (I'll guess that's ported MSP430 code...)

-j

Yep, they share the same ground and the same + connection as well :slight_smile:

As for Wire and I2C, the problem is the screen is not strictly I2C, it's more of a I2C ripoff, thus I'd either have to modify the library or bit bang it...

I managed to get an oscilloscope today. (yay!!)
Now I want to check if my board is on, so how would I go about checking for that? Should I check if there is a signal from the register to the controller or the controller to the LCD? What time interval?

To test with an oscilloscope (one channel or two?) first look at the clock signals are they there?
Then look at the data, does it waggle about. If you can look at two signals at the same time does the data waggling only occur when the clock is going. Are the levels good? Does it pull down to earth (ground) and up to the rail (5V).

If so it's down to the software either in the way you are sending it or what you are sending.
I notice your comments say send AAA and you are sending a bit pattern that I can't interpret as A in any way. I would have expected to see either ASCII (0x41) B01000001 or the hex A B10101010
The same goes for the other things you are sending.