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.
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.