IBridge Lite - help with schematic

Hi, I'm going to connect an IBridge Lite (Datasheet at http://iteadstudio.com/store/images/produce/Shield/IbridgeLite/IBridge-Lite_v1.0DS.pdf, schematic at http://iteadstudio.com/store/images/produce/Shield/IbridgeLite/sch-IBridge-lite-V1.0.pdf) to my Duemilanove. Being new at reading schematics, I'm not sure about button connections. The sample code uses something like

  //Column 0 scan

  
  digitalWrite(IBridge_Column_Pin1, LOW);
  digitalWrite(IBridge_Column_Pin2, LOW);
  digitalWrite(IBridge_Column_Pin0, HIGH);

  delay(1);

  if((digitalRead(IBridge_Row_Pin0)) &&
    !(digitalRead(IBridge_Row_Pin1))  &&
    !(digitalRead(IBridge_Row_Pin2)))
    return (1);

  if(!(digitalRead(IBridge_Row_Pin0)) &&
      (digitalRead(IBridge_Row_Pin1))  &&
     !(digitalRead(IBridge_Row_Pin2)))
    return (2);

  if(!(digitalRead(IBridge_Row_Pin0)) &&
     !(digitalRead(IBridge_Row_Pin1))  &&
      (digitalRead(IBridge_Row_Pin2)))
    return (3);

for every column to get the pressed button.

My question is:

if one presses two buttons like B1 and B2 at the same time, is it going to directly connect IBridge_Column_Pin0 (OUTPUT, HIGH) and IBridge_Column_Pin1 (OUTPUT, LOW) and thus fry them? If so, is there a way to avoid it?

Thanks

Is there any other information I may add? I just would like to avoid frying my Arduino...

That depends - they may be something like 10k resistors in the IBridge to protect against this - give each column a series resistor to prevent it shorting out the relavent drive pin and all is safe. I would suggest doing this in your version.

Actually I've a better idea - the row pins can have the built-in pull-ups enabled, and the column pins are never driven HIGH. So the column driving code is like:

  //Column 0 scan

  
  pinMode (IBridge_Column_Pin1, INPUT);
  pinMode (IBridge_Column_Pin2, INPUT);
  digitalWrite (IBridge_Column_Pin0, LOW);
  pinMode (IBridge_Column_Pin0, OUTPUT);

Thus all but one column is floating, the active one is pulled down by its pin. Any buttons pressed will pull down the relevant row pins (against the built-in pull-up resistors). Since columns are either floating or LOW, not shorting out can happen.

Brilliant! Just to be sure: I have to add

digitalWrite(IBridge_Row_Pin0, HIGH);
digitalWrite(IBridge_Row_Pin1, HIGH);
digitalWrite(IBridge_Row_Pin2, HIGH);

to the init code to enable the pull-ups, then use your code for each column and keep the digitalRead code as it is. Correct? Thanks!

So long as the rows remain INPUTs, yes.