/* * Digital I/O (dual 7-segment display board) lab sketch. * * This sketch displays the number "5" on the right-hand digit on the * display board using only PORT-style programming. * * Segment "a" is connected to PORTB:0, and "b" through "g" are connected to * PORTD:7 through PORTD:2, respectively. We are avoiding using PORTD:1-0 * because the serial port is connected to them, and using them can prevent * the Serial Console or code download from working. * * Remember that the display is a common-anode type unit, so each segment is active-low. * * PORTB PORTD <- PORT * --543210 76543210 <- bit number * -------a bcdefg-- <- segment letter * * v1.00 */ void setup() { DDRB = FIXME; DDRD = FIXME; } void loop() { PORTB = FIXME; PORTD = FIXME; }