OK, feeling really stupid. When I look at the Boarduino and see pin "D8" on the board, is that pin "8" for programming, or is it pin "14" (looking at schematic on http://ladyada.net/images/boarduino/boarduinosch.png)?
Thanks.
Example: a code snippet taken from one of my arduino projects, where I needed to read/write 8 pins as fast as possible. This leaves DigitalRead/DigitalWrite/PinMode out of the question.
unsigned char readdata(unsigned char address)
{
unsigned char data;
DDRB = 0x0F; //Data lines 0-1 from another device, are inputs.
// /WR, /RD, A0, A1 are outputs.
DDRD &= ~0xFC; //Data lines 2-7 from another device are outputs.
//TX/RX are left as they are.
PORTB &= ~0x03; //Clear A0/A1 value,
PORTB |= (address & 0x03); //And set it to the parameter.
PORTB &= ~0x04; // Activate /RD
delayMicroseconds(1); //Wait for data to be ready
data=((PINB&0x30)>>4) | (PIND&0xFC); //Now read the data
PORTB |= 0x04; //And deactivate /RD
return data;
}