#define DicePort PORTC #define DicePortDDR DDRC #define CntrlPortDDR DDRE #define CntrlPort PORTE #define CntrlPin PINE #define Dice1CntrlPin 0 #define Dice2CntrlPin 1 #define RollCntrlPin 2 #define F_CPU 4000000UL #include #include #include unsigned char seed = 0; unsigned char digit_to_7segval(unsigned char digit); void roll_dice(unsigned char times); void init(); ISR(TIMER0_OVF_vect); int main(void) { unsigned char digit = 6; unsigned char digit2 = 6; init(); while(1) { if(!(CntrlPin & (1<