Uno 32 Port programming, help?!

I'm somewhat a noob when it comes to Arduino coding and such which is why I really need help. In my project I am trying to multiplex 2 x 7Segment display using an Arduino (Uno 32 board, not an official Arduino board, I'm using MPIDE to program it).

I need to output parallel values to the display. Anyway...! What I am wanting to know is how to write to 7 pins as a port using binary values. So instead of individually assigning each pin a name, then digitalWrite to each pin, I would like to be able to just simply write an 8 bit value to a port and have it control 7 pins.
For example,
Pins 3,4,5,6,7,8,9 are all connected to LEDs. I want 3,5,7 and 9 to all be on. Can I write the value 1010101 to a single variable and it just... Work? Anyone any ideas.

I have tried DDRD; something or other? I'm really not sure. I tried this, but all I got was DDRD was not declared in this scope. So...?

Feel free to ask any questions because I'm sure that is very confusing to read.

using an Arduino (Uno 32 board, not an official Arduino board, I'm using MPIDE to program it).

Then you belong on some other forum asking for help.

Can I write the value 1010101 to a single variable and it just... Work?

Yes. Though the value you want is more likely 0b1010101 and you'll want to do something with the variable after you've written the value to it.

I have tried DDRD; something or other?

Well, that looks like a something or other that is specific to an Arduino.

Thanks for the reply, I'll be sure to build on that

For example,
Pins 3,4,5,6,7,8,9 are all connected to LEDs. I want 3,5,7 and 9 to all be on. Can I write the value 1010101 to a single variable and it just... Work? Anyone any ideas.

You have two problems:

  1. As PaulS implies, the core MCU chip on an UNO32 is NOT an Atmel AVR, so none of the tutorials about direct port access for the AVR are going to help you much. (It's a PIC32, and the equivalent of DDRB is going to be something like TRISB, and PORTB will (coincidentally) use PORTB. But they're 16bits wide on PIC32.) The Uno32 is discussed on the ChipKit Forums here:chipKIT.net - Index page

  2. It is essentially a "design principle" of Arduino-like boards (including MEGA, DUE, and UNO32) that IO pins on the board are connected in ways that are convenient to the PCB design, and/or group similar functionalities together (all the PWM-capable pins, for example, on the MEGA), which means that adjacent pins on the board ARE NOT particularly likely to be adjacent pins in a "port", and writing them "together" can be an impossible task. (here's the Uno32 pinout:

    (your example 3..9 pins are have bits not-in-order, spread across PORTD and PORTF. OTOH, PORTE0..7 is nearby - perhaps you could use that.)

If you want to have the freedom to pick your pins, and it DOESN'T need the best possible performance, you're better off defining a function or class that does individual pin Writes (digitalWrite or sped-up-versions thereof)