#include "suryaa.h"
#include <avr/interrupt.h>
//see if you press any digits other than number then at serial monitor it shows
// random integer value,dont consider it.
//i have stored the random character value for A,B,C,D,#,*,in the array.
//while scanning numbers in keypad it wont consider non-digits number.
//so number scanning will be easier.
//press "A" for addition.
//press "B" for subraction.
//press "C" for multiplication.
//press "D" for division.
//press "#" to clear display after calculation ...........
//press "*" for = operator.............
void setup()
{
sei();//enabling the global interrupt
//cli();//disabling the global interrupt.
dirf(0xFF);//make portf pins as output for keypad row.
dirk(0x00);//make portk pins as input for keypad output.
dira(0xFF);//make porta pins as output for seven segment display.
dirc(0xFF);//make portc pins as output for each seven segment digit
Serial.begin(9600);
}
void loop()
{
perform_calculator_Operation_with_overflow_indicator();
//perform_any_digit_division_display_remainder_with_overflow_indicator();
//perform_any_digit_division_display_quotient_with_overflow_indicator();
//perform_any_digit_mltiplication_with_overflow_indicator();
//perform_any_digit_addition_with_overflow_indication();
//perform_triple_digit_addition();
//perform_double_digit_addition();//press "#" to clear display after calculation .
//perfrom_single_digit_addition();//press "#" to clear display after calculation
}