#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
}
mega:SCL
mega:SDA
mega:AREF
mega:GND.1
mega:13
mega:12
mega:11
mega:10
mega:9
mega:8
mega:7
mega:6
mega:5
mega:4
mega:3
mega:2
mega:1
mega:0
mega:14
mega:15
mega:16
mega:17
mega:18
mega:19
mega:20
mega:21
mega:5V.1
mega:5V.2
mega:22
mega:23
mega:24
mega:25
mega:26
mega:27
mega:28
mega:29
mega:30
mega:31
mega:32
mega:33
mega:34
mega:35
mega:36
mega:37
mega:38
mega:39
mega:40
mega:41
mega:42
mega:43
mega:44
mega:45
mega:46
mega:47
mega:48
mega:49
mega:50
mega:51
mega:52
mega:53
mega:GND.4
mega:GND.5
mega:IOREF
mega:RESET
mega:3.3V
mega:5V
mega:GND.2
mega:GND.3
mega:VIN
mega:A0
mega:A1
mega:A2
mega:A3
mega:A4
mega:A5
mega:A6
mega:A7
mega:A8
mega:A9
mega:A10
mega:A11
mega:A12
mega:A13
mega:A14
mega:A15
sevseg1:A
sevseg1:B
sevseg1:C
sevseg1:D
sevseg1:E
sevseg1:F
sevseg1:G
sevseg1:DP
sevseg1:DIG1
sevseg1:DIG2
sevseg1:DIG3
sevseg1:DIG4
sevseg1:COM
sevseg1:CLN
keypad1:R1
keypad1:R2
keypad1:R3
keypad1:R4
keypad1:C1
keypad1:C2
keypad1:C3
keypad1:C4
r1:1
r1:2
r2:1
r2:2
r3:1
r3:2
r4:1
r4:2
r5:1
r5:2
r6:1
r6:2
r7:1
r7:2
r8:1
r8:2